static function PureFunctions::moduleInvoke in X Autoload 7.5
@todo Do this in a injectable object instead?
Parameters
string $module:
string $hook:
Return value
mixed|null
See also
HookSystem::moduleInvoke()
4 calls to PureFunctions::moduleInvoke()
- DrupalBootstrap::bootstrapInvokeAll in tests/
src/ VirtualDrupal/ DrupalBootstrap.php - LibrariesInfo::getLibrariesInfo in tests/
src/ VirtualDrupal/ LibrariesInfo.php - MockDrupalSystem::moduleInvoke in tests/
src/ Mock/ MockDrupalSystem.php - ModuleEnable::enableModule in tests/
src/ VirtualDrupal/ ModuleEnable.php
File
- tests/
src/ VirtualDrupal/ PureFunctions.php, line 20
Class
Namespace
Drupal\xautoload\Tests\VirtualDrupalCode
static function moduleInvoke($module, $hook) {
$args = func_get_args();
assert($module === array_shift($args));
assert($hook === array_shift($args));
$function = $module . '_' . $hook;
if (function_exists($function)) {
return call_user_func_array($function, $args);
}
return NULL;
}