You are here

public function ContainerAwareEventDispatcher::hasListeners in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::hasListeners()

File

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\EventDispatcher

Code

public function hasListeners($event_name = NULL) {
  return (bool) count($this
    ->getListeners($event_name));
}