You are here

public function Query::getEventDispatcher in Search API 8

Retrieves the event dispatcher.

Return value

\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher The event dispatcher.

File

src/Query/Query.php, line 262

Class

Query
Provides a standard implementation for a Search API query.

Namespace

Drupal\search_api\Query

Code

public function getEventDispatcher() {
  return $this->eventDispatcher ?: \Drupal::service('event_dispatcher');
}