Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EventDispatcherInterface.php

function EventDispatcherInterface::addSubscriber

Adds an event subscriber.

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

3 methods override EventDispatcherInterface::addSubscriber()
EventDispatcher::addSubscriber in vendor/symfony/event-dispatcher/EventDispatcher.php
Adds an event subscriber.
ImmutableEventDispatcher::addSubscriber in vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
Adds an event subscriber.
TraceableEventDispatcher::addSubscriber in vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
Adds an event subscriber.

File

vendor/symfony/event-dispatcher/EventDispatcherInterface.php, line 39

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) : void;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal