Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents PHP Method

getSubscribedEvents() static public method

The array keys are event names and the value can be: * The method name to call (priority defaults to 0) * An array composed of the method name to call and the priority For instance: * array('eventName' => 'methodName') * array('eventName' => array('methodName', $priority))
static public getSubscribedEvents ( ) : array
return array The event names to listen to
    static function getSubscribedEvents();

Usage Example

Example #1
0
 public function removeSubscriber(EventSubscriberInterface $subscriber)
 {
     foreach ($subscriber->getSubscribedEvents() as $eventName => $listener) {
         $this->removeListener($eventName, [$subscriber, $listener[0]]);
     }
 }
All Usage Examples Of Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents
EventSubscriberInterface