Twig/Extension/DataSourceExtension.php
private function resolveMaxResultsOptions(array $options, DataSourceViewInterface $dataSource)
    {
        $optionsResolver = new OptionsResolver();
        $optionsResolver
            ->setDefaults([
                'route' => $this->getCurrentRoute($dataSource),
                'active_class' => 'active',
                'additional_parameters' => [],
                'results' => [5, 10, 20, 50, 100]
            ])
            ->setAllowedTypes('route', 'string')
            ->setAllowedTypes('active_class', 'string')
            ->setAllowedTypes('additional_parameters', 'array')
            ->setAllowedTypes('results', 'array');

        return $optionsResolver->resolve($options);
    }
private function resolveMaxResultsOptions(array $options, DataSourceViewInterface $dataSource)
    {
        $optionsResolver = new OptionsResolver();
        $optionsResolver
            ->setDefaults([
                'route' => $this->getCurrentRoute($dataSource),
                'active_class' => 'active',
                'additional_parameters' => [],
                'results' => [5, 10, 20, 50, 100]
            ])
            ->setAllowedTypes('route', 'string')
            ->setAllowedTypes('active_class', 'string')
            ->setAllowedTypes('additional_parameters', 'array')
            ->setAllowedTypes('results', 'array');

        return $optionsResolver->resolve($options);
    }
private function resolveMaxResultsOptions ( array $ options , DataSourceViewInterface $ dataSource ) { $ optionsResolver = new OptionsResolver ( ) ; $ optionsResolver -> setDefaults ( [ 'route' => $ this -> getCurrentRoute ( $ dataSource ) , 'active_class' => 'active' , 'additional_parameters' => [ ] , 'results' => [ 5 , 10 , 20 , 50 , 100 ] ] ) -> setAllowedTypes ( 'route' , 'string' ) -> setAllowedTypes ( 'active_class' , 'string' ) -> setAllowedTypes ( 'additional_parameters' , 'array' ) -> setAllowedTypes ( 'results' , 'array' ) ; return $ optionsResolver -> resolve ( $ options ) ; }
Validate and resolve options passed in Twig to datasource_results_per_page_widget

@param array $options
@return array
Validate and resolve options passed in Twig to datasource_results_per_page_widget