Neos\Neos\ViewHelpers\ContentElement\WrapViewHelper::render PHP Метод

render() публичный Метод

For logged in users with access to the Backend this also adds the attributes for the RTE to work.
public render ( Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface The node of the content element. Optional, will be resolved from the TypoScript context by default.
Результат string The rendered property with a wrapping tag. In the user workspace this adds some required attributes for the RTE to work
    public function render(NodeInterface $node = null)
    {
        $view = $this->viewHelperVariableContainer->getView();
        if (!$view instanceof TypoScriptAwareViewInterface) {
            throw new ViewHelperException('This ViewHelper can only be used in a TypoScript content element. You have to specify the "node" argument if it cannot be resolved from the TypoScript context.', 1385737102);
        }
        $typoScriptObject = $view->getTypoScriptObject();
        $currentContext = $typoScriptObject->getTsRuntime()->getCurrentContext();
        if ($node === null) {
            $node = $currentContext['node'];
        }
        return $this->contentElementWrappingService->wrapContentObject($node, $this->renderChildren(), $typoScriptObject->getPath());
    }
WrapViewHelper