You are here

function HookSystem::moduleInvokeAll in X Autoload 7.5

Parameters

string $hook:

File

tests/src/VirtualDrupal/HookSystem.php, line 27

Class

HookSystem

Namespace

Drupal\xautoload\Tests\VirtualDrupal

Code

function moduleInvokeAll($hook) {
  $args = func_get_args();
  assert($hook === array_shift($args));
  foreach ($this
    ->moduleImplements($hook) as $extension) {
    $function = $extension . '_' . $hook;
    if (function_exists($function)) {
      call_user_func_array($function, $args);
    }
  }
}