class Event

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/EventDispatcher/Event.php \Drupal\Component\EventDispatcher\Event
  2. 11.x core/lib/Drupal/Component/EventDispatcher/Event.php \Drupal\Component\EventDispatcher\Event

Provides a forward-compatibility layer for the Symfony 5 event class.

Symfony 5 relies on the Symfony\Contracts\EventDispatcher\Event class. In order to prepare for updates, code that wishes to extend Symfony's Event class should extend this intermediary class, which will handle switching from Symfony\Component to Symfony\Contracts without a further change.

Hierarchy

  • class \Drupal\Component\EventDispatcher\Event implements \Symfony\Contracts\EventDispatcher\Event

Expanded class hierarchy of Event

18 files declare their use of Event
AccountSetEvent.php in core/lib/Drupal/Core/Session/AccountSetEvent.php
ConfigCollectionInfo.php in core/lib/Drupal/Core/Config/ConfigCollectionInfo.php
ConfigCrudEvent.php in core/lib/Drupal/Core/Config/ConfigCrudEvent.php
ConfigImporterEvent.php in core/lib/Drupal/Core/Config/ConfigImporterEvent.php
ConfigModuleOverridesEvent.php in core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php

... See full list

5 string references to 'Event'
DatabaseBackend::schemaDefinition in core/lib/Drupal/Core/Flood/DatabaseBackend.php
Defines the schema for the flood table.
InstallerPerformanceTest::testInstaller in core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php
Ensures that the user page is available after installation.
InstallerRouterTest::testInstalled in core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php
Confirms that the installation succeeded.
InstallerTest::testInstaller in core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
Ensures that the user page is available after installation.
PerformanceTestRecorder::onRouteBuilderFinish in core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
Records a router rebuild.

File

core/lib/Drupal/Component/EventDispatcher/Event.php, line 15

Namespace

Drupal\Component\EventDispatcher
View source
class Event extends SymfonyEvent {

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.