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

        $node
            ->treatFalseLike(array('js' => false, 'css' => false))
            ->treatNullLike(array('js' => false, 'css' => false))
            ->treatTrueLike(array(
                'js' => '%kernel.root_dir%/../vendor/select2/select2/dist/js/select2.full.min.js',
                'css' => '%kernel.root_dir%/../vendor/select2/select2/dist/css/select2.min.css',
            ))
            ->children()
                ->scalarNode('js')
                    ->cannotBeEmpty()
                    ->defaultValue('%kernel.root_dir%/../vendor/select2/select2/dist/js/select2.full.min.js')
                ->end()
                ->scalarNode('css')
                    ->cannotBeEmpty()
                    ->defaultValue('%kernel.root_dir%/../vendor/select2/select2/dist/css/select2.min.css')
                ->end()
            ->end()
        ;

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

        $node
            ->treatFalseLike(array('js' => false, 'css' => false))
            ->treatNullLike(array('js' => false, 'css' => false))
            ->treatTrueLike(array(
                'js' => '%kernel.root_dir%/../vendor/select2/select2/dist/js/select2.full.min.js',
                'css' => '%kernel.root_dir%/../vendor/select2/select2/dist/css/select2.min.css',
            ))
            ->children()
                ->scalarNode('js')
                    ->cannotBeEmpty()
                    ->defaultValue('%kernel.root_dir%/../vendor/select2/select2/dist/js/select2.full.min.js')
                ->end()
                ->scalarNode('css')
                    ->cannotBeEmpty()
                    ->defaultValue('%kernel.root_dir%/../vendor/select2/select2/dist/css/select2.min.css')
                ->end()
            ->end()
        ;

        return $node;
    }
protected function addSelect2ParameterNode ( ) { $ builder = new TreeBuilder ( ) ; $ node = $ builder -> root ( 'select2' ) ; $ node -> treatFalseLike ( array ( 'js' => false , 'css' => false ) ) -> treatNullLike ( array ( 'js' => false , 'css' => false ) ) -> treatTrueLike ( array ( 'js' => '%kernel.root_dir%/../vendor/select2/select2/dist/js/select2.full.min.js' , 'css' => '%kernel.root_dir%/../vendor/select2/select2/dist/css/select2.min.css' , ) ) -> children ( ) -> scalarNode ( 'js' ) -> cannotBeEmpty ( ) -> defaultValue ( '%kernel.root_dir%/../vendor/select2/select2/dist/js/select2.full.min.js' ) -> end ( ) -> scalarNode ( 'css' ) -> cannotBeEmpty ( ) -> defaultValue ( '%kernel.root_dir%/../vendor/select2/select2/dist/css/select2.min.css' ) -> end ( ) -> end ( ) ; return $ node ; }
Get Select2 Configuration.
Get Select2 Configuration .