public function render($property, $tag = 'div', NodeInterface $node = null)
{
$this->tag->setTagName($tag);
$this->tag->forceClosingTag(true);
$content = $this->renderChildren();
if ($node === null) {
$node = $this->getNodeFromTypoScriptContext();
}
if ($node === null) {
throw new ViewHelperException('A node is required, but one was not supplied and could not be found in the TypoScript context.', 1408521638);
}
if ($content === null) {
if (!$this->templateVariableContainer->exists($property)) {
throw new ViewHelperException(sprintf('The property "%1$s" was not set as a template variable. If you use this ViewHelper in a partial, make sure to pass the node property "%1$s" as an argument.', $property), 1384507046);
}
$content = $this->templateVariableContainer->get($property);
}
$this->tag->setContent($content);
return $this->contentElementEditableService->wrapContentProperty($node, $property, $this->tag->render());
}