vendor/goksagun/scheduler-bundle/DependencyInjection/Configuration.php line 21

Open in your IDE?
  1. <?php
  2. namespace Goksagun\SchedulerBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  4. use Symfony\Component\Config\Definition\ConfigurationInterface;
  5. /**
  6.  * This is the class that validates and merges configuration from your app/config files.
  7.  *
  8.  * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
  9.  */
  10. class Configuration implements ConfigurationInterface
  11. {
  12.     /**
  13.      * {@inheritdoc}
  14.      */
  15.     public function getConfigTreeBuilder()
  16.     {
  17.         $treeBuilder = new TreeBuilder();
  18.         $rootNode $treeBuilder->root('scheduler');
  19.         $rootNode
  20.             ->children()
  21.                 ->booleanNode('enable')->defaultValue(true)->end()
  22.             ->end()
  23.             ->children()
  24.                 ->scalarNode('async')->defaultValue(null)->end()
  25.             ->end()
  26.             ->children()
  27.                 ->scalarNode('log')->defaultValue(null)->end()
  28.             ->end()
  29.             ->children()
  30.                 ->arrayNode('tasks')
  31.                     ->prototype('array')
  32.                         ->children()
  33.                             ->scalarNode('name')->end()
  34.                             ->scalarNode('expression')->end()
  35.                             ->scalarNode('times')->defaultNull()->end()
  36.                             ->scalarNode('start')->defaultNull()->end()
  37.                             ->scalarNode('end')->defaultNull()->end()
  38.                         ->end()
  39.                     ->end()
  40.                 ->end()
  41.             ->end()
  42.         ;
  43.         return $treeBuilder;
  44.     }
  45. }