本文整理汇总了PHP中Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::append方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayNodeDefinition::append方法的具体用法?PHP ArrayNodeDefinition::append怎么用?PHP ArrayNodeDefinition::append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
的用法示例。
在下文中一共展示了ArrayNodeDefinition::append方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: appendDataNodes
/**
* @param ArrayNodeDefinition $dataNode
*/
protected function appendDataNodes($dataNode)
{
$treeBuilder = new TreeBuilder();
$assetsNode = $treeBuilder->root('assets');
$assetsNode->useAttributeAsKey('asset-identifier')->normalizeKeys(false)->prototype('array')->children()->arrayNode('inputs')->info('Input assets list')->prototype('scalar')->end()->end()->arrayNode('filters')->info('Filters to manipulate input assets')->prototype('scalar')->end()->end()->scalarNode('output')->info('Output asset')->end()->end()->end();
$dataNode->append($assetsNode);
}
示例2: appendThemingNodes
/**
* Appends config nodes for "themes"
*
* @param ArrayNodeDefinition $parentNode
*/
protected function appendThemingNodes(ArrayNodeDefinition $parentNode)
{
$treeBuilder = new TreeBuilder();
$node = $treeBuilder->root('themes');
$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('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()->end()->end();
$parentNode->append($node)->children()->scalarNode('active_theme')->info('The identifier of the theme that should be used by default')->end()->end();
}
示例3: appendChordsNodes
/**
* @param ArrayNodeDefinition $rootNode
*/
private function appendChordsNodes(ArrayNodeDefinition $rootNode)
{
foreach ($this->repertoires as $repertoire) {
$builder = new TreeBuilder();
$repNode = $builder->root($repertoire->getName());
$chords = $repertoire->getChords();
foreach ($chords as $chord) {
$repNode->append($chord->getConfigNode());
}
$rootNode->append($repNode);
}
}
示例4: setDefaults
protected function setDefaults(ArrayNodeDefinition $node, array $configs = array())
{
$configs = array_replace_recursive(array('driver' => SyliusResourceBundle::DRIVER_DOCTRINE_ORM, 'resources' => array()), $configs);
$node->append($this->createDriverNode($configs['driver']));
$node->append($this->createResourcesSection($configs['resources']));
}
示例5: appendTo
/**
* {@inheritDoc}
*/
public function appendTo(ArrayNodeDefinition &$rootNode)
{
$rootNode->append($this->addCommonNode());
}
示例6: configure
/**
* Setups default configuration for the extension and provides validation
* for this configuration. Usually this configuration will be provided with
* behat.yml file.
*
* @param ArrayNodeDefinition $nodeBuilder
*
* @throws \InvalidArgumentException
* @throws \RuntimeException
*/
public function configure(ArrayNodeDefinition $nodeBuilder)
{
$builder = new ConfigBuilder();
$auth = $builder->buildAuthArrayNode();
$nodeBuilder->append($auth);
}
示例7: appendPrototypedConfiguration
private function appendPrototypedConfiguration(ArrayNodeDefinition $node)
{
$node->append($this->getAllowCredentials())->append($this->getAllowOrigin())->append($this->getOriginRegex())->append($this->getAllowHeaders())->append($this->getAllowMethods())->append($this->getExposeHeaders())->append($this->getMaxAge())->append($this->getHosts());
}