/** * @test * @author Sebastian Kurfürst <*****@*****.**> */ public function viewHelperChildNodesCanBeReadAgain() { $viewHelperChildNodes = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_RootNode'); $renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContextInterface'); $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext); $this->assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes()); $this->assertSame($renderingContext, $this->widgetContext->getViewHelperChildNodeRenderingContext()); }
/** * Stores the syntax tree child nodes in the Widget Context, so they can be * rendered with <f:widget.renderChildren> lateron. * * @param array $childNodes The SyntaxTree Child nodes of this ViewHelper. * @return void * @author Sebastian Kurfürst <*****@*****.**> */ public function setChildNodes(array $childNodes) { $rootNode = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_RootNode'); foreach ($childNodes as $childNode) { $rootNode->addChildNode($childNode); } $this->widgetContext->setViewHelperChildNodes($rootNode, $this->getRenderingContext()); }