vendor/lifo/typeahead-bundle/Lifo/TypeaheadBundle/DependencyInjection/Configuration.php line 22

Open in your IDE?
  1. <?php
  2. namespace Lifo\TypeaheadBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  4. use Symfony\Component\Config\Definition\ConfigurationInterface;
  5. class Configuration implements ConfigurationInterface
  6. {
  7.     const DEFAULT_BSJS_FILE  '%kernel.root_dir%/../vendor/lifo/typeahead-bundle/Lifo/TypeaheadBundle/Resources/public/js/bootstrap-typeahead.js';
  8.     const DEFAULT_JS_FILE    '%kernel.root_dir%/../vendor/lifo/typeahead-bundle/Lifo/TypeaheadBundle/Resources/public/js/typeaheadbundle.js';
  9.     const DEFAULT_JS_OUTPUT  'js/lifo_typeahead.js';
  10.     const DEFAULT_CSS_FILE   '%kernel.root_dir%/../vendor/lifo/typeahead-bundle/Lifo/TypeaheadBundle/Resources/public/css/typeaheadbundle.css';
  11.     const DEFAULT_CSS_OUTPUT 'css/lifo_typeahead.css';
  12.     /**
  13.      * {@inheritDoc}
  14.      */
  15.     public function getConfigTreeBuilder()
  16.     {
  17.         $treeBuilder = new TreeBuilder();
  18.         $rootNode $treeBuilder->root('lifo_typeahead');
  19.         $rootNode
  20.             ->children()
  21.                 ->arrayNode('auto_configure')
  22.                     ->info('Automatically configure subsystems?')
  23.                     ->addDefaultsIfNotSet()
  24.                     ->children()
  25.                         ->booleanNode('assetic')->defaultTrue()->end()
  26.                         ->booleanNode('twig')->defaultTrue()->end()
  27.                     ->end()
  28.                 ->end()
  29.                 ->scalarNode('typeahead_js_file')
  30.                     ->defaultValue(self::DEFAULT_JS_FILE)
  31.                     ->info('(for assetic) Location of the typeaheadbundle.js file (normally the file that comes with lifo/typeahead-bundle')
  32.                 ->end()
  33.                 ->scalarNode('typeahead_bsjs_file')
  34.                     ->defaultValue(self::DEFAULT_BSJS_FILE)
  35.                     ->info('(for assetic) Location of the bootstrap-typeahead.js file (normally the file that comes with lifo/typeahead-bundle')
  36.                 ->end()
  37.                 ->scalarNode('typeahead_js_output')
  38.                     ->defaultValue(self::DEFAULT_JS_OUTPUT)
  39.                     ->info('(for assetic) Output location for typeahead JS code. Should be relative to your web directory.')
  40.                 ->end()
  41.                 ->scalarNode('typeahead_css_file')
  42.                     ->defaultValue(self::DEFAULT_CSS_FILE)
  43.                     ->info('(for assetic) Location of the typeaheadbundle.css file (normally the file that comes with lifo/typeahead-bundle')
  44.                 ->end()
  45.                 ->scalarNode('typeahead_css_output')
  46.                     ->defaultValue(self::DEFAULT_CSS_OUTPUT)
  47.                     ->info('(for assetic) Output location for typeahead CSS styles. Should be relative to your web directory.')
  48.                 ->end()
  49.             ->end()
  50.         ;
  51.         return $treeBuilder;
  52.     }
  53. }