DependencyInjection/Configuration.php
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('apy_data_grid');

        $rootNode
            ->children()
                ->arrayNode('limits')
                    ->performNoDeepMerging()
                    ->beforeNormalization()
                        ->ifTrue(function ($v) { return !is_array($v); })
                        ->then(function ($v) { return [$v]; })
                    ->end()
                    ->defaultValue([20 => '20', 50 => '50', 100 => '100'])
                    ->prototype('scalar')->end()
                ->end()
                ->booleanNode('persistence')->defaultFalse()->end()
                ->scalarNode('theme')->defaultValue('APYDataGridBundle::blocks.html.twig')->end()
                ->scalarNode('no_data_message')->defaultValue('No data')->end()
                ->scalarNode('no_result_message')->defaultValue('No result')->end()
                ->scalarNode('actions_columns_size')->defaultValue(-1)->end()
                ->scalarNode('actions_columns_title')->defaultValue('Actions')->end()
                ->scalarNode('actions_columns_separator')->defaultValue('<br />')->end() // deprecated
                ->arrayNode('pagerfanta')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('enable')->defaultFalse()->end()
                        ->scalarNode('view_class')->defaultValue('Pagerfanta\View\DefaultView')->end()
                        ->arrayNode('options')
                            ->defaultValue(['prev_message' => '«', 'next_message' => '»'])
                            ->useAttributeAsKey('options')
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                ->end()
             ->end();

        return $treeBuilder;
    }
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('apy_data_grid');

        $rootNode
            ->children()
                ->arrayNode('limits')
                    ->performNoDeepMerging()
                    ->beforeNormalization()
                        ->ifTrue(function ($v) { return !is_array($v); })
                        ->then(function ($v) { return [$v]; })
                    ->end()
                    ->defaultValue([20 => '20', 50 => '50', 100 => '100'])
                    ->prototype('scalar')->end()
                ->end()
                ->booleanNode('persistence')->defaultFalse()->end()
                ->scalarNode('theme')->defaultValue('APYDataGridBundle::blocks.html.twig')->end()
                ->scalarNode('no_data_message')->defaultValue('No data')->end()
                ->scalarNode('no_result_message')->defaultValue('No result')->end()
                ->scalarNode('actions_columns_size')->defaultValue(-1)->end()
                ->scalarNode('actions_columns_title')->defaultValue('Actions')->end()
                ->scalarNode('actions_columns_separator')->defaultValue('<br />')->end() // deprecated
                ->arrayNode('pagerfanta')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('enable')->defaultFalse()->end()
                        ->scalarNode('view_class')->defaultValue('Pagerfanta\View\DefaultView')->end()
                        ->arrayNode('options')
                            ->defaultValue(['prev_message' => '«', 'next_message' => '»'])
                            ->useAttributeAsKey('options')
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                ->end()
             ->end();

        return $treeBuilder;
    }
{@inheritdoc}