public function ImmutableEventDispatcher::hasListeners

Checks whether an event has any registered listeners.

Parameters

string $eventName The name of the event:

Return value

Boolean true if the specified event has any listeners, false otherwise

Overrides EventDispatcherInterface::hasListeners

File

drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php, line 88

Class

ImmutableEventDispatcher
A read-only proxy for an event dispatcher.

Namespace

Symfony\Component\EventDispatcher

Code

public function hasListeners($eventName = null) {
  return $this->dispatcher
    ->hasListeners($eventName);
}