eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\View::addSemanticConfig PHP 메소드

addSemanticConfig() 공개 메소드

Adds semantic configuration definition.
public addSemanticConfig ( Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder )
$nodeBuilder Symfony\Component\Config\Definition\Builder\NodeBuilder Node just under ezpublish.system.
    public function addSemanticConfig(NodeBuilder $nodeBuilder)
    {
        $nodeBuilder->arrayNode(static::NODE_KEY)->info(static::INFO)->useAttributeAsKey('key')->normalizeKeys(false)->prototype('array')->useAttributeAsKey('key')->normalizeKeys(false)->info("View selection rulesets, grouped by view type. Key is the view type (e.g. 'full', 'line', ...)")->prototype('array')->children()->scalarNode('template')->info('Your template path, as MyBundle:subdir:my_template.html.twig')->end()->scalarNode('controller')->info(<<<EOT
Use custom controller instead of the default one to display a content matching your rules.
You can use the controller reference notation supported by Symfony.
EOT
)->example('MyBundle:MyControllerClass:view')->end()->arrayNode('match')->info('Condition matchers configuration')->isRequired()->useAttributeAsKey('key')->prototype('variable')->end()->end()->arrayNode('params')->info(<<<EOT
Arbitrary params that will be passed in the ContentView object, manageable by ViewProviders.
Those params will NOT be passed to the resulting view template by default.
EOT
)->example(array('foo' => '%some.parameter.reference%', 'osTypes' => array('osx', 'linux', 'windows')))->useAttributeAsKey('key')->prototype('variable')->end()->end()->end()->end()->end()->end();
    }