function drush_module_invoke

8.0.x environment_7.inc drush_module_invoke($module, $hook)
8.0.x environment_6.inc drush_module_invoke($module, $hook)
8.0.x environment.inc drush_module_invoke($module, $hook)
7.x environment_7.inc drush_module_invoke($module, $hook)
7.x environment_6.inc drush_module_invoke($module, $hook)
7.x environment.inc drush_module_invoke($module, $hook)
master environment_7.inc drush_module_invoke($module, $hook)
master environment.inc drush_module_invoke($module, $hook)

Invokes a hook in a particular module.

1 call to drush_module_invoke()

File

commands/core/drupal/environment.inc, line 237
Specific functions for a drupal 8+ environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal Drush is called from.

Code

function drush_module_invoke($module, $hook) {
  $args = func_get_args();
  // Remove $module and $hook from the arguments.
  unset($args[0], $args[1]);
  return \Drupal::moduleHandler()->invoke($module, $hook, $args);
}