DependencyInjection/Configuration.php
/**
     * Appends config nodes for "themes"
     *
     * @param ArrayNodeDefinition $parentNode
     */
Appends config nodes for "themes"
@param ArrayNodeDefinition $parentNode
Appends config nodes for " themes " @param ArrayNodeDefinition $parentNode
protected function appendThemingNodes(ArrayNodeDefinition $parentNode)
    {
        $treeBuilder = new TreeBuilder();
        $node        = $treeBuilder->root('themes');
        $configTreeBuilder = new TreeBuilder();
        $configNode = $configTreeBuilder->root('config');
        $configNode->info('Layout theme additional config')->end();
        $node
            ->useAttributeAsKey('theme-identifier')
            ->normalizeKeys(false)
            ->prototype('array')
                ->children()
                    ->scalarNode('label')
                        ->info('The label is displayed in the theme management UI. Can be empty for "hidden" themes')
                        ->isRequired()
                    ->end()
                    ->scalarNode('description')
                        ->info('The description is displayed in the theme selection UI. Can be empty')
                    ->end()
                    ->scalarNode('icon')
                        ->info('The icon is displayed in the UI')
                    ->end()
                    ->scalarNode('logo')
                        ->info('The logo image is displayed in the UI')
                    ->end()
                    ->scalarNode('screenshot')
                        ->info('The screenshot image is used in theme management UI for the theme preview')
                    ->end()
                    ->scalarNode('directory')
                        ->info('The directory name where to look up for layout updates. By default theme identifier')
                    ->end()
                    ->scalarNode('parent')
                        ->info('The identifier of the parent theme')
                    ->end()
                    ->arrayNode('groups')
                        ->info('Layout groups for which the theme is applicable')
                        ->example('[main, embedded_forms, frontend]')
                        ->prototype('scalar')->end()
                        ->cannotBeEmpty()
                    ->end()
                    ->append($configNode)
                ->end()
            ->end();
        $this->appendConfigNodes($configNode);
        $parentNode
            ->append($node)
            ->children()
                ->booleanNode('debug')
                    ->info('Enable layout debug mode. Allows to switch theme using request parameter _theme.')
                    ->defaultValue('%kernel.debug%')
                ->end()
                ->scalarNode('active_theme')
                    ->info('The identifier of the theme that should be used by default')
                ->end()
            ->end();
    }
protected function appendThemingNodes ( ArrayNodeDefinition $ parentNode ) { $ treeBuilder = new TreeBuilder ( ) ; $ node = $ treeBuilder -> root ( 'themes' ) ; $ configTreeBuilder = new TreeBuilder ( ) ; $ configNode = $ configTreeBuilder -> root ( 'config' ) ; $ configNode -> info ( 'Layout theme additional config' ) -> end ( ) ; $ node -> useAttributeAsKey ( 'theme-identifier' ) -> normalizeKeys ( false ) -> prototype ( 'array' ) -> children ( ) -> scalarNode ( 'label' ) -> info ( 'The label is displayed in the theme management UI. Can be empty for "hidden" themes' ) -> isRequired ( ) -> end ( ) -> scalarNode ( 'description' ) -> info ( 'The description is displayed in the theme selection UI. Can be empty' ) -> end ( ) -> scalarNode ( 'icon' ) -> info ( 'The icon is displayed in the UI' ) -> end ( ) -> scalarNode ( 'logo' ) -> info ( 'The logo image is displayed in the UI' ) -> end ( ) -> scalarNode ( 'screenshot' ) -> info ( 'The screenshot image is used in theme management UI for the theme preview' ) -> end ( ) -> scalarNode ( 'directory' ) -> info ( 'The directory name where to look up for layout updates. By default theme identifier' ) -> end ( ) -> scalarNode ( 'parent' ) -> info ( 'The identifier of the parent theme' ) -> end ( ) -> arrayNode ( 'groups' ) -> info ( 'Layout groups for which the theme is applicable' ) -> example ( '[main, embedded_forms, frontend]' ) -> prototype ( 'scalar' ) -> end ( ) -> cannotBeEmpty ( ) -> end ( ) -> append ( $ configNode ) -> end ( ) -> end ( ) ; $ this -> appendConfigNodes ( $ configNode ) ; $ parentNode -> append ( $ node ) -> children ( ) -> booleanNode ( 'debug' ) -> info ( 'Enable layout debug mode. Allows to switch theme using request parameter _theme.' ) -> defaultValue ( '%kernel.debug%' ) -> end ( ) -> scalarNode ( 'active_theme' ) -> info ( 'The identifier of the theme that should be used by default' ) -> end ( ) -> end ( ) ; }
Appends config nodes for "themes"
 @param ArrayNodeDefinition $parentNode
Appends config nodes for " themes " @param ArrayNodeDefinition $parentNode