public function EventDispatcherInterface::addSubscriber

Adds an event subscriber.

The subscriber is asked for all the events he is interested in and added as a listener for these events.

@api

Parameters

EventSubscriberInterface $subscriber The subscriber.:

2 methods override EventDispatcherInterface::addSubscriber()

File

drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php, line 62

Class

EventDispatcherInterface
The EventDispatcherInterface is the central point of Symfony's event listener system. Listeners are registered on the manager and events are dispatched through the manager.

Namespace

Symfony\Component\EventDispatcher

Code

public function addSubscriber(EventSubscriberInterface $subscriber);