class TestEventSubscriber

Hierarchy

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

Expanded class hierarchy of TestEventSubscriber

File

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

Namespace

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

}

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