Neos\Neos\EventLog\Domain\Model\NodeEvent::getNode PHP Method

getNode() public method

It might happen that, if this event refers to a node contained in a site which is not available anymore, Doctrine's proxy class of the Site domain model will fail with an EntityNotFoundException. We catch this case and return NULL.
public getNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
return Neos\ContentRepository\Domain\Model\NodeInterface
    public function getNode()
    {
        try {
            $context = $this->contextFactory->create(array('workspaceName' => $this->userService->getUserWorkspace()->getName(), 'dimensions' => $this->dimension, 'currentSite' => $this->getCurrentSite(), 'invisibleContentShown' => true));
            return $context->getNodeByIdentifier($this->nodeIdentifier);
        } catch (EntityNotFoundException $e) {
            return null;
        }
    }