class TestEventListener

Hierarchy

Expanded class hierarchy of TestEventListener

File

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

Namespace

Drupal\Tests\Component\EventDispatcher
View source
class TestEventListener {
  public $preFooInvoked = FALSE;
  public $postFooInvoked = FALSE;
  
  /**
   * Listener methods
   */
  public function preFoo(Event $e) {
    $this->preFooInvoked = TRUE;
  }
  public function postFoo(Event $e) {
    $this->postFooInvoked = TRUE;
    $e->stopPropagation();
  }

}

Members

Title Sort descending Modifiers Object type Summary
TestEventListener::$postFooInvoked public property
TestEventListener::$preFooInvoked public property
TestEventListener::postFoo public function
TestEventListener::preFoo public function Listener methods

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