protected function visitChildNodes(AbstractRenderNode $node) { $children = $node->getChildren(); foreach ($children as $childNode) { $childNode->accept($this); } }
/** * @param AbstractRenderNode $node */ protected function visitChildNodes(AbstractRenderNode $node) { $currentContent = $this->content; $children = $node->getChildren(); foreach ($children as $childNode) { $childNode->accept($this); // calls visitDynamicHTMLNode | visitLegacyNode -> createNodeContent-> set this->content $currentContent['children'][] = $this->content; } $this->content = $currentContent; }
public function &createChildren() { $childNodes = $this->unitNode->getChildren(); $childAPIs = new LegacyRenderList(); foreach ($childNodes as $childNode) { $unitId = $childNode->getUnitId(); if ($childNode instanceof LegacyNode) { $childAPI = $childNode->getModuleAPI($this->defaultVisitor, $this->newRenderContext); } else { // This is a dirty hack !!! // It allows the old root module the rendering of new modules. $childAPI = new LegacyModuleAPI($this->defaultVisitor, $childNode, $this->newRenderContext); } $childAPIs->add($unitId, $childAPI); } return $childAPIs; }