class SubscriberService

Hierarchy

Expanded class hierarchy of SubscriberService

File

drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php, line 243

Namespace

Symfony\Component\EventDispatcher\Tests
View source
class SubscriberService implements EventSubscriberInterface {
  public static function getSubscribedEvents() {
    return array(
      'onEvent' => 'onEvent',
      'onEvent' => array(
        'onEvent',
        10,
      ),
      'onEvent' => array(
        'onEvent',
      ),
    );
  }
  public function onEvent(Event $e) {
  }

}

Members

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