Bundle/FormBundle/DependencyInjection/Configuration.php
protected function addIconsConfig(ArrayNodeDefinition $rootNode)
    {
        $iconSets = ['glyphicons', 'fontawesome', 'fontawesome4'];

        $rootNode
            ->children()
                ->arrayNode('icons')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('icon_set')
                            ->info('Icon set to use: '.json_encode($iconSets))
                            ->defaultValue('glyphicons')
                            ->validate()
                                ->ifNotInArray($iconSets)
                                ->thenInvalid('Must choose one of '.json_encode($iconSets))
                            ->end()
                        ->end()
                        ->scalarNode('shortcut')
                            ->info('Alias for vic_mopa_bootstrap_icon()')
                            ->defaultValue('icon')
                        ->end()
                    ->end()
                ->end()
            ->end();
    }
protected function addIconsConfig(ArrayNodeDefinition $rootNode)
    {
        $iconSets = ['glyphicons', 'fontawesome', 'fontawesome4'];

        $rootNode
            ->children()
                ->arrayNode('icons')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('icon_set')
                            ->info('Icon set to use: '.json_encode($iconSets))
                            ->defaultValue('glyphicons')
                            ->validate()
                                ->ifNotInArray($iconSets)
                                ->thenInvalid('Must choose one of '.json_encode($iconSets))
                            ->end()
                        ->end()
                        ->scalarNode('shortcut')
                            ->info('Alias for vic_mopa_bootstrap_icon()')
                            ->defaultValue('icon')
                        ->end()
                    ->end()
                ->end()
            ->end();
    }
protected function addIconsConfig ( ArrayNodeDefinition $ rootNode ) { $ iconSets = [ 'glyphicons' , 'fontawesome' , 'fontawesome4' ] ; $ rootNode -> children ( ) -> arrayNode ( 'icons' ) -> addDefaultsIfNotSet ( ) -> children ( ) -> scalarNode ( 'icon_set' ) -> info ( 'Icon set to use: ' . json_encode ( $ iconSets ) ) -> defaultValue ( 'glyphicons' ) -> validate ( ) -> ifNotInArray ( $ iconSets ) -> thenInvalid ( 'Must choose one of ' . json_encode ( $ iconSets ) ) -> end ( ) -> end ( ) -> scalarNode ( 'shortcut' ) -> info ( 'Alias for vic_mopa_bootstrap_icon()' ) -> defaultValue ( 'icon' ) -> end ( ) -> end ( ) -> end ( ) -> end ( ) ; }
Add icon configuration.

@param ArrayNodeDefinition $rootNode The root node
Add icon configuration .