You are here

class TestEventSubscriber in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php \Drupal\Tests\Component\EventDispatcher\TestEventSubscriber

Hierarchy

  • class \Drupal\Tests\Component\EventDispatcher\TestEventSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of TestEventSubscriber

File

core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php, line 572

Namespace

Drupal\Tests\Component\EventDispatcher
View source
class TestEventSubscriber implements EventSubscriberInterface {
  public static function getSubscribedEvents() {
    return [
      'pre.foo' => 'preFoo',
      'post.foo' => 'postFoo',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestEventSubscriber::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to.