Neos\Neos\EventLog\Domain\Service\EventEmittingService::getCurrentContext PHP Method

getCurrentContext() protected method

The current context-event or NULL if none exists currently.
protected getCurrentContext ( ) : Event | null
return Neos\Neos\EventLog\Domain\Model\Event | null
    protected function getCurrentContext()
    {
        if (count($this->eventContext) > 0) {
            return end($this->eventContext);
        } else {
            return null;
        }
    }