function ImplementationList::iterateByModule
Iterates over listeners, using module names as keys.
Return value
\Iterator<string, callable> Iterator of listeners by module. This allows the same module to occur more than once.
File
-
core/
lib/ Drupal/ Core/ Hook/ ImplementationList.php, line 43
Class
- ImplementationList
- Contains the ordered list of implementations for a hook.
Namespace
Drupal\Core\HookCode
public function iterateByModule() : \Iterator {
foreach ($this->listeners as $index => $listener) {
yield $this->modules[$index] => $listener;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.