Neos\Neos\ViewHelpers\Rendering\InEditModeViewHelper::render PHP Метод

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

public render ( Neos\ContentRepository\Domain\Model\NodeInterface $node = null, string $mode = null ) : boolean
$node Neos\ContentRepository\Domain\Model\NodeInterface Optional Node to use context from
$mode string Optional rendering mode name to check if this specific mode is active
Результат boolean
    public function render(NodeInterface $node = null, $mode = null)
    {
        $context = $this->getNodeContext($node);
        $renderingMode = $context->getCurrentRenderingMode();
        if ($mode !== null) {
            $result = $renderingMode->getName() === $mode && $renderingMode->isEdit();
        } else {
            $result = $renderingMode->isEdit();
        }
        return $result;
    }
InEditModeViewHelper