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

getCurrentSite() protected method

Prevents invalid calls to the site respository in case the site data property is not available.
protected getCurrentSite ( ) : null | object
return null | object
    protected function getCurrentSite()
    {
        if (!isset($this->data['site']) || $this->data['site'] === null) {
            return null;
        }
        return $this->siteRepository->findByIdentifier($this->data['site']);
    }