function ImplementationList::hasImplementations

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Hook/ImplementationList.php \Drupal\Core\Hook\ImplementationList::hasImplementations()

Checks whether the list has any implementations.

Return value

bool TRUE if it has implementations, FALSE if it is empty.

File

core/lib/Drupal/Core/Hook/ImplementationList.php, line 71

Class

ImplementationList
Contains the ordered list of implementations for a hook.

Namespace

Drupal\Core\Hook

Code

public function hasImplementations() : bool {
  return $this->listeners !== [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.