public setViewHelperChildNodes ( TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes, TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $viewHelperChildNodeRenderingContext ) : void | ||
$viewHelperChildNodes | TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode | |
$viewHelperChildNodeRenderingContext | TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface | |
리턴 | void |
/** * @test */ public function viewHelperChildNodesCanBeReadAgain() { $viewHelperChildNodes = $this->createMock(RootNode::class); $renderingContext = $this->createMock(RenderingContextInterface::class); $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 */ public function setChildNodes(array $childNodes) { $rootNode = new RootNode(); foreach ($childNodes as $childNode) { $rootNode->addChildNode($childNode); } $this->widgetContext->setViewHelperChildNodes($rootNode, $this->renderingContext); }