You are here

protected function EventDispatcherTrait::getEventDispatcher in Feeds 8.3

Returns the event dispatcher service.

Return value

\Symfony\Component\EventDispatcher\EventDispatcherInterface The event dispatcher service.

2 calls to EventDispatcherTrait::getEventDispatcher()
FeedQueueWorkerBase::switchAccount in src/Plugin/QueueWorker/FeedQueueWorkerBase.php
Safely switches to another account.
FeedsExecutable::switchAccount in src/FeedsExecutable.php
Safely switches to another account.

File

src/Event/EventDispatcherTrait.php, line 47

Class

EventDispatcherTrait
Wrapper methods for the event dispatcher interface.

Namespace

Drupal\feeds\Event

Code

protected function getEventDispatcher() {
  if (!isset($this->_eventDispatcher)) {
    $this->_eventDispatcher = \Drupal::service('event_dispatcher');
  }
  return $this->_eventDispatcher;
}