当前位置: 首页>>代码示例>>PHP>>正文


PHP ArrayNodeDefinition::append方法代码示例

本文整理汇总了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);
 }
开发者ID:ramunasd,项目名称:platform,代码行数:10,代码来源:Configuration.php

示例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();
 }
开发者ID:northdakota,项目名称:platform,代码行数:12,代码来源:Configuration.php

示例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);
     }
 }
开发者ID:lexcast,项目名称:fminor-core,代码行数:15,代码来源:ChordsConfiguration.php

示例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']));
 }
开发者ID:liverbool,项目名称:dos-resource-bundle,代码行数:6,代码来源:AbstractResourceConfiguration.php

示例5: appendTo

 /**
  * {@inheritDoc}
  */
 public function appendTo(ArrayNodeDefinition &$rootNode)
 {
     $rootNode->append($this->addCommonNode());
 }
开发者ID:uecode,项目名称:common-bundle,代码行数:7,代码来源:Configuration.php

示例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);
 }
开发者ID:kyvour,项目名称:basic-http-auth-extension,代码行数:16,代码来源:BasicHttpAuthExtension.php

示例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());
 }
开发者ID:alchemy-fr,项目名称:symfony-cors,代码行数:4,代码来源:CorsConfiguration.php


注:本文中的Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。