Methods summary
public
|
|
public
|
|
public
Symfony\Component\Config\Definition\Builder\NodeBuilder
|
#
children( )
Returns a builder to add children nodes.
Returns a builder to add children nodes.
Returns
Implementation of
|
public
Symfony\Component\Config\Definition\Builder\NodeDefinition
|
#
prototype( string $type )
Sets a prototype for child nodes.
Sets a prototype for child nodes.
Parameters
- $type
string $type the type of node
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
addDefaultsIfNotSet( )
Adds the default value if the node is not set in the configuration.
Adds the default value if the node is not set in the configuration.
This method is applicable to concrete nodes only (not to prototype nodes). If
this function has been called and the node is not set during the finalization
phase, it's default value will be derived from its children default values.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
addDefaultChildrenIfNoneSet( integer|string|array|null $children = null )
Adds children with a default value when none are defined.
Adds children with a default value when none are defined.
Parameters
- $children
integer|string|array|null $children The number of children|The child name|The children names to be added
This method is applicable to prototype nodes only.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
requiresAtLeastOneElement( )
Requires the node to have at least one element.
Requires the node to have at least one element.
This method is applicable to prototype nodes only.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
disallowNewKeysInSubsequentConfigs( )
Disallows adding news keys in a subsequent configuration.
Disallows adding news keys in a subsequent configuration.
If used all keys have to be defined in the same configuration file.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
fixXmlConfig( string $singular, string $plural = null )
Sets a normalization rule for XML configurations.
Sets a normalization rule for XML configurations.
Parameters
- $singular
string $singular The key to remap
- $plural
string $plural The plural of the key for irregular plurals
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
useAttributeAsKey( string $name, Boolean $removeKeyItem = true )
Sets the attribute which value is to be used as key.
Sets the attribute which value is to be used as key.
This is useful when you have an indexed array that should be an associative
array. You can select an item from within the array to be the key of the
particular item. For example, if "id" is the "key", then:
array( array('id' => 'my_name', 'foo' => 'bar'), );
becomes
array( 'my_name' => array('foo' => 'bar'), );
If you'd like "'id' => 'my_name'" to still be present in the resulting
array, then you can set the second argument of this method to false.
This method is applicable to prototype nodes only.
Parameters
- $name
string $name The name of the key
- $removeKeyItem
Boolean $removeKeyItem Whether or not the key item should be removed.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
canBeUnset( Boolean $allow = true )
Sets whether the node can be unset.
Sets whether the node can be unset.
Parameters
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
canBeEnabled( )
Adds an "enabled" boolean to enable the current section.
Adds an "enabled" boolean to enable the current section.
By default, the section is disabled. If any configuration is specified then
the node will be automatically enabled:
enableableArrayNode: {enabled: true, ...} # The config is enabled &
default values get overridden enableableArrayNode: ~ # The config is enabled
& use the default values enableableArrayNode: true # The config is enabled
& use the default values enableableArrayNode: {other: value, ...} # The
config is enabled & default values get overridden enableableArrayNode:
{enabled: false, ...} # The config is disabled enableableArrayNode: false # The
config is disabled
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
canBeDisabled( )
Adds an "enabled" boolean to enable the current section.
Adds an "enabled" boolean to enable the current section.
By default, the section is enabled.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
performNoDeepMerging( )
Disables the deep merging of the node.
Disables the deep merging of the node.
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
#
normalizeKeys( Boolean $bool )
Sets key normalization.
Parameters
- $bool
Boolean $bool Whether to enable key normalization
Returns
|
public
Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
|
|
protected
Symfony\Component\Config\Definition\Builder\NodeBuilder
|
#
getNodeBuilder( )
Returns a node builder to be used to add children and prototype
Returns a node builder to be used to add children and prototype
Returns
|
protected
NodeInterface
|
#
createNode( )
Instantiate and configure the node according to this definition
Instantiate and configure the node according to this definition
Returns
NodeInterface $node The node instance
Throws
|
protected
|
|
protected
|
|