Neos\Neos\Controller\Frontend\NodeController::showAction PHP Method

showAction() public method

Shows the specified node and takes visibility and access restrictions into account.
public showAction ( Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
return string View output for the specified node
    public function showAction(NodeInterface $node = null)
    {
        if ($node === null) {
            throw new NodeNotFoundException('The requested node does not exist or isn\'t accessible to the current user', 1430218623);
        }
        $inBackend = $node->getContext()->isInBackend();
        if ($node->getNodeType()->isOfType('Neos.Neos:Shortcut') && !$inBackend) {
            $this->handleShortcutNode($node);
        }
        $this->view->assign('value', $node);
        if ($inBackend) {
            $this->overrideViewVariablesFromInternalArguments();
            /** @var UserInterfaceMode $renderingMode */
            $renderingMode = $node->getContext()->getCurrentRenderingMode();
            $this->response->setHeader('Cache-Control', 'no-cache');
            if ($renderingMode !== null) {
                // Deprecated TypoScript context variable from version 2.0.
                $this->view->assign('editPreviewMode', $renderingMode->getTypoScriptPath());
            }
            if (!$this->view->canRenderWithNodeAndPath()) {
                $this->view->setTypoScriptPath('rawContent');
            }
        }
        if ($this->session->isStarted() && $inBackend) {
            $this->session->putData('lastVisitedNode', $node->getContextPath());
        }
    }