interface EventDispatcherInterface
Same name in this branch
- 11.1.x vendor/symfony/event-dispatcher/EventDispatcherInterface.php \Symfony\Component\EventDispatcher\EventDispatcherInterface
- 11.1.x vendor/psr/event-dispatcher/src/EventDispatcherInterface.php \Psr\EventDispatcher\EventDispatcherInterface
Allows providing hooks on domain-specific lifecycles by dispatching events.
Hierarchy
- interface \Psr\EventDispatcher\EventDispatcherInterface
- interface \Symfony\Contracts\EventDispatcher\EventDispatcherInterface extends \Psr\EventDispatcher\EventDispatcherInterface
Expanded class hierarchy of EventDispatcherInterface
All classes that implement EventDispatcherInterface
41 files declare their use of EventDispatcherInterface
- AccountProxy.php in core/
lib/ Drupal/ Core/ Session/ AccountProxy.php - Application.php in vendor/
symfony/ console/ Application.php - BigPipe.php in core/
modules/ big_pipe/ src/ Render/ BigPipe.php - BlockContentAccessControlHandler.php in core/
modules/ block_content/ src/ BlockContentAccessControlHandler.php - Config.php in core/
lib/ Drupal/ Core/ Config/ Config.php
File
-
vendor/
symfony/ event-dispatcher-contracts/ EventDispatcherInterface.php, line 19
Namespace
Symfony\Contracts\EventDispatcherView source
interface EventDispatcherInterface extends PsrEventDispatcherInterface {
/**
* Dispatches an event to all registered listeners.
*
* @template T of object
*
* @param T $event The event to pass to the event handlers/listeners
* @param string|null $eventName The name of the event to dispatch. If not supplied,
* the class of $event should be used instead.
*
* @return T The passed $event MUST be returned
*/
public function dispatch(object $event, ?string $eventName = null) : object;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
EventDispatcherInterface::dispatch | public | function | Dispatches an event to all registered listeners. | Overrides EventDispatcherInterface::dispatch | 3 |