Event.php

Same filename and directory in other branches
  1. 9 core/lib/Drupal/Component/EventDispatcher/Event.php
  2. 10 core/lib/Drupal/Component/EventDispatcher/Event.php

Namespace

Drupal\Component\EventDispatcher

File

core/lib/Drupal/Component/EventDispatcher/Event.php

View source
<?php

namespace Drupal\Component\EventDispatcher;

use Symfony\Contracts\EventDispatcher\Event as SymfonyEvent;

/**
 * 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.
 */
class Event extends SymfonyEvent {

}

Classes

Title Deprecated Summary
Event Provides a forward-compatibility layer for the Symfony 5 event class.

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