/** * Helper method which triggers the rendering of everything between the * opening and the closing tag. * * @return mixed The finally rendered child nodes. * @api */ public function renderChildren() { if ($this->renderChildrenClosure !== null) { $closure = $this->renderChildrenClosure; return $closure(); } return $this->viewHelperNode->evaluateChildNodes($this->renderingContext); }
/** * @param string $argumentsName * @param string $closureName * @param string $initializationPhpCode * @param ViewHelperNode $node * @param TemplateCompiler $compiler */ public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler) { $renderedString = $node->evaluateChildNodes($this->renderingContext); $stopCompilingChildrenException = new StopCompilingChildrenException(); $stopCompilingChildrenException->setReplacementString($renderedString); throw $stopCompilingChildrenException; }