public function ContainerAwareEventDispatcher::hasListeners in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php \Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::hasListeners()
- 8.0 core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::hasListeners()
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::hasListeners()
Checks whether an event has any registered listeners.
Parameters
string $eventName The name of the event:
Return value
bool true if the specified event has any listeners, false otherwise
Overrides EventDispatcherInterface::hasListeners
File
- core/
lib/ Drupal/ Component/ EventDispatcher/ ContainerAwareEventDispatcher.php, line 167 - Contains \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.
Class
- ContainerAwareEventDispatcher
- A performance optimized container aware event dispatcher.
Namespace
Drupal\Component\EventDispatcherCode
public function hasListeners($event_name = NULL) {
return (bool) count($this
->getListeners($event_name));
}