protected function addTwitterBootstrapParameterNode()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('twbs');

        $defaults = array(
            'twbs_dir' => self::COMPONENTS_DIR.'/bootstrap',
            'js' => array('js/bootstrap.min.js'),
            'less' => array(
                'less/bootstrap.less',
                'less/theme.less',
            ),
            'css' => array(),
            'icon_prefix' => 'glyphicon',
            'fonts_dir' => '%kernel.root_dir%/../web/fonts',
            'icon_tag' => 'span',
            'form_theme' => 'ASFLayoutBundle:form:fields.html.twig',
        );

        $node
           ->treatTrueLike($defaults)
           ->treatFalseLike(array(
               'twbs_dir' => false,
           ))
           ->addDefaultsIfNotSet()
           ->children()
               ->scalarNode('twbs_dir')
                   ->cannotBeEmpty()
                   ->info('Fill this value if you do not use the package "component/bootstrap".')
                   ->defaultValue(self::COMPONENTS_DIR.'/bootstrap')
               ->end()
               ->arrayNode('js')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search js files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('js')
                   ->prototype('scalar')->end()
                   ->defaultValue(array(
                       'js/bootstrap.min.js',
                   ))
               ->end()
               ->arrayNode('less')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search less files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('less')
                   ->prototype('scalar')->end()
                   ->defaultValue(array(
                       'less/bootstrap.less',
                       'less/theme.less',
                   ))
               ->end()
               ->arrayNode('css')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search css files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('css')
                   ->prototype('scalar')->end()
               ->end()
               ->scalarNode('icon_prefix')
                   ->defaultValue('glyphicon')
               ->end()
               ->scalarNode('icon_tag')
                   ->defaultValue('span')
               ->end()
               ->scalarNode('fonts_dir')
                   ->defaultValue('%kernel.root_dir%/../web/fonts')
               ->end()
               ->scalarNode('form_theme')
                   ->defaultValue('ASFLayoutBundle:form:fields.html.twig')
               ->end()
               ->arrayNode('customize')
                   ->children()
                       ->arrayNode('less')
                           ->children()
                               ->scalarNode('dest_dir')->end()
                               ->arrayNode('files')
                                   ->fixXmlConfig('less_files')
                                   ->prototype('scalar')->end()
                               ->end()
                           ->end()
                       ->end()
                   ->end()
               ->end()
           ->end()
        ;

        return $node;
    }
protected function addTwitterBootstrapParameterNode()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('twbs');

        $defaults = array(
            'twbs_dir' => self::COMPONENTS_DIR.'/bootstrap',
            'js' => array('js/bootstrap.min.js'),
            'less' => array(
                'less/bootstrap.less',
                'less/theme.less',
            ),
            'css' => array(),
            'icon_prefix' => 'glyphicon',
            'fonts_dir' => '%kernel.root_dir%/../web/fonts',
            'icon_tag' => 'span',
            'form_theme' => 'ASFLayoutBundle:form:fields.html.twig',
        );

        $node
           ->treatTrueLike($defaults)
           ->treatFalseLike(array(
               'twbs_dir' => false,
           ))
           ->addDefaultsIfNotSet()
           ->children()
               ->scalarNode('twbs_dir')
                   ->cannotBeEmpty()
                   ->info('Fill this value if you do not use the package "component/bootstrap".')
                   ->defaultValue(self::COMPONENTS_DIR.'/bootstrap')
               ->end()
               ->arrayNode('js')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search js files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('js')
                   ->prototype('scalar')->end()
                   ->defaultValue(array(
                       'js/bootstrap.min.js',
                   ))
               ->end()
               ->arrayNode('less')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search less files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('less')
                   ->prototype('scalar')->end()
                   ->defaultValue(array(
                       'less/bootstrap.less',
                       'less/theme.less',
                   ))
               ->end()
               ->arrayNode('css')
                   ->treatNullLike(array())
                   ->treatFalseLike(array())
                   ->info('By default, the bundle search css files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.')
                   ->fixXmlConfig('css')
                   ->prototype('scalar')->end()
               ->end()
               ->scalarNode('icon_prefix')
                   ->defaultValue('glyphicon')
               ->end()
               ->scalarNode('icon_tag')
                   ->defaultValue('span')
               ->end()
               ->scalarNode('fonts_dir')
                   ->defaultValue('%kernel.root_dir%/../web/fonts')
               ->end()
               ->scalarNode('form_theme')
                   ->defaultValue('ASFLayoutBundle:form:fields.html.twig')
               ->end()
               ->arrayNode('customize')
                   ->children()
                       ->arrayNode('less')
                           ->children()
                               ->scalarNode('dest_dir')->end()
                               ->arrayNode('files')
                                   ->fixXmlConfig('less_files')
                                   ->prototype('scalar')->end()
                               ->end()
                           ->end()
                       ->end()
                   ->end()
               ->end()
           ->end()
        ;

        return $node;
    }
protected function addTwitterBootstrapParameterNode ( ) { $ builder = new TreeBuilder ( ) ; $ node = $ builder -> root ( 'twbs' ) ; $ defaults = array ( 'twbs_dir' => self :: COMPONENTS_DIR . '/bootstrap' , 'js' => array ( 'js/bootstrap.min.js' ) , 'less' => array ( 'less/bootstrap.less' , 'less/theme.less' , ) , 'css' => array ( ) , 'icon_prefix' => 'glyphicon' , 'fonts_dir' => '%kernel.root_dir%/../web/fonts' , 'icon_tag' => 'span' , 'form_theme' => 'ASFLayoutBundle:form:fields.html.twig' , ) ; $ node -> treatTrueLike ( $ defaults ) -> treatFalseLike ( array ( 'twbs_dir' => false , ) ) -> addDefaultsIfNotSet ( ) -> children ( ) -> scalarNode ( 'twbs_dir' ) -> cannotBeEmpty ( ) -> info ( 'Fill this value if you do not use the package "component/bootstrap".' ) -> defaultValue ( self :: COMPONENTS_DIR . '/bootstrap' ) -> end ( ) -> arrayNode ( 'js' ) -> treatNullLike ( array ( ) ) -> treatFalseLike ( array ( ) ) -> info ( 'By default, the bundle search js files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.' ) -> fixXmlConfig ( 'js' ) -> prototype ( 'scalar' ) -> end ( ) -> defaultValue ( array ( 'js/bootstrap.min.js' , ) ) -> end ( ) -> arrayNode ( 'less' ) -> treatNullLike ( array ( ) ) -> treatFalseLike ( array ( ) ) -> info ( 'By default, the bundle search less files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.' ) -> fixXmlConfig ( 'less' ) -> prototype ( 'scalar' ) -> end ( ) -> defaultValue ( array ( 'less/bootstrap.less' , 'less/theme.less' , ) ) -> end ( ) -> arrayNode ( 'css' ) -> treatNullLike ( array ( ) ) -> treatFalseLike ( array ( ) ) -> info ( 'By default, the bundle search css files in folder fill in "asf_layout.assets.twbs.twbs_dir" parameter.' ) -> fixXmlConfig ( 'css' ) -> prototype ( 'scalar' ) -> end ( ) -> end ( ) -> scalarNode ( 'icon_prefix' ) -> defaultValue ( 'glyphicon' ) -> end ( ) -> scalarNode ( 'icon_tag' ) -> defaultValue ( 'span' ) -> end ( ) -> scalarNode ( 'fonts_dir' ) -> defaultValue ( '%kernel.root_dir%/../web/fonts' ) -> end ( ) -> scalarNode ( 'form_theme' ) -> defaultValue ( 'ASFLayoutBundle:form:fields.html.twig' ) -> end ( ) -> arrayNode ( 'customize' ) -> children ( ) -> arrayNode ( 'less' ) -> children ( ) -> scalarNode ( 'dest_dir' ) -> end ( ) -> arrayNode ( 'files' ) -> fixXmlConfig ( 'less_files' ) -> prototype ( 'scalar' ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) ; return $ node ; }
Get Twitter Bootstrap Configuration.
Get Twitter Bootstrap Configuration .