W3cubDocs

/Symfony 4.1

ParentNodeDefinitionInterface

interface ParentNodeDefinitionInterface implements BuilderAwareInterface

An interface that must be implemented by nodes which can have children.

Methods

setBuilder(NodeBuilder $builder)

Sets a custom children builder.

from BuilderAwareInterface
NodeBuilder children()

Returns a builder to add children nodes.

$this append(NodeDefinition $node)

Appends a node definition.

Details

setBuilder(NodeBuilder $builder)

Sets a custom children builder.

Parameters

NodeBuilder $builder

NodeBuilder children()

Returns a builder to add children nodes.

Return Value

NodeBuilder

$this append(NodeDefinition $node)

Appends a node definition.

Usage:

$node = $parentNode
    ->children()
        ->scalarNode('foo')->end()
        ->scalarNode('baz')->end()
        ->append($this->getBarNodeDefinition())
    ->end()
;

Parameters

NodeDefinition $node

Return Value

$this