vendor/pec-platform/platform-bundle/DependencyInjection/Configuration.php line 61

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the PEC Platform Bundle.
  4.  *
  5.  * (c) PEC project engineers &amp; consultants
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Pec\Bundle\PlatformBundle\DependencyInjection;
  11. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  12. use Symfony\Component\Config\Definition\ConfigurationInterface;
  13. use Symfony\Component\HttpKernel\Kernel;
  14. /**
  15.  * This is the class that validates and merges configuration from your app/config files
  16.  *
  17.  * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
  18.  */
  19. class Configuration implements ConfigurationInterface {
  20.     /**
  21.      *
  22.      * {@inheritDoc}
  23.      *
  24.      */
  25.     public function getConfigTreeBuilder() {
  26.         // Here you should define the parameters that are allowed to
  27.         // configure your bundle. See the documentation linked above for
  28.         // more information on that topic.
  29.         //
  30.         $treeBuilder = new TreeBuilder('pec_platform');
  31.         $pecPlatformRoot $treeBuilder->getRootNode();
  32.         // @formatter:off
  33.         $pecPlatformRoot
  34.             ->children()
  35.                 ->scalarNode('default_theme')
  36.                     ->defaultValue('@PecKeenAdminTheme/Layout/base.html.twig')
  37.                 ->end()
  38.                 ->scalarNode('default_locale')
  39.                     ->defaultValue('en')
  40.                 ->end()
  41.                 ->booleanNode('allow_registration')
  42.                     ->defaultFalse()
  43.                 ->end()
  44.                 ->booleanNode('allow_theme_change')
  45.                     ->defaultTrue()
  46.                 ->end()
  47.                 ->scalarNode('show_sidebar')
  48.                     ->defaultValue(1)
  49.                 ->end()
  50.                 ->booleanNode('allow_password_reset')
  51.                     ->defaultFalse()
  52.                 ->end()
  53.                 ->booleanNode('show_impersonate')
  54.                     ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, please set the configuration in the PecMenuBundle')
  55.                     ->defaultFalse()
  56.                 ->end()
  57.                 ->booleanNode('render_registration_agreement_checkbox')
  58.                     ->defaultFalse()
  59.                 ->end()
  60.                 ->arrayNode('locales')
  61.                     ->prototype('scalar')
  62.                     ->end()
  63.                 ->end()
  64.                 ->scalarNode('homepage_route')
  65.                     ->defaultValue('pec_platform_dashboard_old')
  66.                 ->end()
  67.                 ->booleanNode('disable_deprecated_dashboard')
  68.                     ->defaultFalse()
  69.                 ->end()
  70.                 ->booleanNode('enable_pec_font_in_form')
  71.                     ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, configure the option in the PecFormBundle configuration instead')
  72.                     ->defaultFalse()
  73.                 ->end()
  74.                 ->booleanNode('enable_pec_font_v2_in_form')
  75.                     ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, configure the option in the PecFormBundle configuration instead')
  76.                     ->defaultFalse()
  77.                 ->end()
  78.                 ->booleanNode('show_aggrid_totals_status')
  79.                     ->defaultTrue()
  80.                 ->end()
  81.                 ->arrayNode('fixtures')
  82.                     ->children()
  83.                         ->booleanNode('ignore_skipper_classes')
  84.                             ->defaultFalse()
  85.                         ->end()
  86.                         ->arrayNode('skip_namespaces')
  87.                             ->prototype('scalar')
  88.                             ->end()
  89.                         ->end()
  90.                     ->end()
  91.                 ->end()
  92.                 ->arrayNode('menu')
  93.                     ->children()
  94.                         ->booleanNode('show_username')
  95.                         ->setDeprecated('The child node "%node%" at path "%path%" is deprecated, please set the configuration in the PecMenuBundle')
  96.                         ->end()
  97.                     ->end()
  98.                 ->end()
  99.             ->end()
  100.         ->end();
  101.         // Authoriztaion Cache
  102.         $pecPlatformRoot
  103.             ->children()
  104.                 ->arrayNode('authorization_cache')->addDefaultsIfNotSet()
  105.                     ->children()
  106.                         ->booleanNode('enabled')->defaultFalse()->end()
  107.                         ->integerNode('ttl')->defaultValue(60)->end()
  108.                     ->end()
  109.                 ->end()
  110.             ->end();
  111.         // Disabled Debug VoteListener
  112.         $pecPlatformRoot
  113.             ->children()
  114.                 ->booleanNode('disable_vote_listener')
  115.                     ->defaultFalse()
  116.                 ->end()
  117.             ->end();
  118.         
  119.         // Whitelisted Access Groups Configuration for the Platform
  120.         $pecPlatformRoot
  121.             ->children()
  122.                 ->arrayNode('access_groups')
  123.                     ->prototype('scalar')
  124.                     ->end()
  125.                 ->end()
  126.             ->end();
  127.         // Whitelisted Access Roles Configuration for the Platform
  128.         $pecPlatformRoot
  129.             ->children()
  130.                 ->arrayNode('access_roles')
  131.                     ->prototype('scalar')
  132.                     ->end()
  133.                 ->end()
  134.             ->end();
  135.         // @formatter:on
  136.         //
  137.         return $treeBuilder;
  138.     }
  139. }