當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。