Пример #1
0
 public function updateNodeFromExisting(NodeInterface $node, Context $context)
 {
     $builder = new ArrayTreeBuilder();
     foreach ($builder->parseWithoutRoot(variable_get($node->getName())) as $child) {
         $node->addChild($child);
     }
 }
Пример #2
0
 public function updateNodeFromExisting(NodeInterface $node, Context $context)
 {
     /* @var $node ViewNode */
     $data = $this->getExistingObject($node, $context);
     $builder = new ArrayTreeBuilder();
     foreach ($builder->parseWithoutRoot($data) as $child) {
         $node->addChild($child);
     }
 }