public function Psr14Bridge::__construct in Search API Solr 8
Same name and namespace in other branches
- 4.x src/Solarium/EventDispatcher/Psr14Bridge.php \Drupal\search_api_solr\Solarium\EventDispatcher\Psr14Bridge::__construct()
Constructs a container aware event dispatcher.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container.
array $listeners: A nested array of listener definitions keyed by event name and priority. The array is expected to be ordered by priority. A listener definition is an associative array with one of the following key value pairs:
- callable: A callable listener
- service: An array of the form [service id, method]
A service entry will be resolved to a callable only just before its invocation.
Overrides ContainerAwareEventDispatcher::__construct
File
- src/
Solarium/ EventDispatcher/ Psr14Bridge.php, line 19
Class
- Psr14Bridge
- A helper to decorate the legacy EventDispatcherInterface::dispatch().
Namespace
Drupal\search_api_solr\Solarium\EventDispatcherCode
public function __construct() {
$this->dispatcher = \Drupal::service('event_dispatcher');
}