function ImplementationList::getForModule

Gets listeners for a specific module.

Parameters

string $module: Module name.

Return value

list<callable> Listeners for that module.

File

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

Class

ImplementationList
Contains the ordered list of implementations for a hook.

Namespace

Drupal\Core\Hook

Code

public function getForModule(string $module) : array {
  return array_values(array_intersect_key($this->listeners, array_intersect($this->modules, [
    $module,
  ])));
}

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