<?php/* * This file is part of the PEC Platform Bundle. * * (c) PEC project engineers & consultants * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */namespace Pec\Bundle\PlatformBundle\DependencyInjection;use Symfony\Component\Config\Definition\Builder\TreeBuilder;use Symfony\Component\Config\Definition\ConfigurationInterface;use Symfony\Component\HttpKernel\Kernel;/** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */class Configuration implements ConfigurationInterface { /** * * {@inheritDoc} * */ public function getConfigTreeBuilder() { // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. // $treeBuilder = new TreeBuilder('pec_platform'); $pecPlatformRoot = $treeBuilder->getRootNode(); // @formatter:off $pecPlatformRoot ->children() ->scalarNode('default_theme') ->defaultValue('@PecKeenAdminTheme/Layout/base.html.twig') ->end() ->scalarNode('default_locale') ->defaultValue('en') ->end() ->booleanNode('allow_registration') ->defaultFalse() ->end() ->booleanNode('allow_theme_change') ->defaultTrue() ->end() ->scalarNode('show_sidebar') ->defaultValue(1) ->end() ->booleanNode('allow_password_reset') ->defaultFalse() ->end() ->booleanNode('show_impersonate') ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, please set the configuration in the PecMenuBundle') ->defaultFalse() ->end() ->booleanNode('render_registration_agreement_checkbox') ->defaultFalse() ->end() ->arrayNode('locales') ->prototype('scalar') ->end() ->end() ->scalarNode('homepage_route') ->defaultValue('pec_platform_dashboard_old') ->end() ->booleanNode('disable_deprecated_dashboard') ->defaultFalse() ->end() ->booleanNode('enable_pec_font_in_form') ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, configure the option in the PecFormBundle configuration instead') ->defaultFalse() ->end() ->booleanNode('enable_pec_font_v2_in_form') ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, configure the option in the PecFormBundle configuration instead') ->defaultFalse() ->end() ->booleanNode('show_aggrid_totals_status') ->defaultTrue() ->end() ->arrayNode('fixtures') ->children() ->booleanNode('ignore_skipper_classes') ->defaultFalse() ->end() ->arrayNode('skip_namespaces') ->prototype('scalar') ->end() ->end() ->end() ->end() ->arrayNode('menu') ->children() ->booleanNode('show_username') ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, please set the configuration in the PecMenuBundle') ->end() ->end() ->end() ->end() ->end(); // Authoriztaion Cache $pecPlatformRoot ->children() ->arrayNode('authorization_cache')->addDefaultsIfNotSet() ->children() ->booleanNode('enabled')->defaultFalse()->end() ->integerNode('ttl')->defaultValue(60)->end() ->end() ->end() ->end(); // Disabled Debug VoteListener $pecPlatformRoot ->children() ->booleanNode('disable_vote_listener') ->defaultFalse() ->end() ->end(); // Whitelisted Access Groups Configuration for the Platform $pecPlatformRoot ->children() ->arrayNode('access_groups') ->prototype('scalar') ->end() ->end() ->end(); // Whitelisted Access Roles Configuration for the Platform $pecPlatformRoot ->children() ->arrayNode('access_roles') ->prototype('scalar') ->end() ->end() ->end(); // @formatter:on // return $treeBuilder; }}