append() public method

$node = new ArrayNodeDefinition() ->children() ->scalarNode('foo')->end() ->scalarNode('baz')->end() ->end() ->append($this->getBarNodeDefinition()) ;
public append ( Symfony\Component\Config\Definition\Builder\NodeDefinition $node ) : ArrayNodeDefinition
$node Symfony\Component\Config\Definition\Builder\NodeDefinition A NodeDefinition instance
return ArrayNodeDefinition This node
Esempio n. 1
0
 /**
  * @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);
 }
Esempio n. 2
0
 /**
  * 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();
 }
 /**
  * @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);
     }
 }
 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']));
 }
Esempio n. 5
0
 /**
  * {@inheritDoc}
  */
 public function appendTo(ArrayNodeDefinition &$rootNode)
 {
     $rootNode->append($this->addCommonNode());
 }
 /**
  * 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);
 }
 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());
 }