You are here

public function ModuleHandler::invoke in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/Extension/ModuleHandler.php \Drupal\service_container\Extension\ModuleHandler::invoke()

Invokes a hook in a particular module.

Parameters

string $module: The name of the module (without the .module extension).

string $hook: The name of the hook to invoke.

...: Arguments to pass to the hook implementation.

Return value

mixed The return value of the hook implementation.

Overrides ModuleHandlerInterface::invoke

File

src/Extension/ModuleHandler.php, line 199
Contains Drupal\service_container\Extension\ModuleHandler.

Class

ModuleHandler
Class that manages modules in a Drupal installation.

Namespace

Drupal\service_container\Extension

Code

public function invoke($module, $hook, array $args = array()) {
  return $this->drupal7
    ->module_invoke($module, $hook, $args);
}