ModuleHandler::implementsHook

public ModuleHandler::implementsHook($module, $hook) Returns whether a given module implements a given hook. Parameters string $module: The name of the module (without the .module extension). string $hook: The name of the hook (e.g. "help" or "menu"). Return value bool TRUE if the module is both installed and enabled, and the hook is implemented in that module. Overrides ModuleHandlerInterface::implementsHook File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 366 Class ModuleHand

ModuleHandler::getName

public ModuleHandler::getName($module) Gets the human readable name of a given module. Parameters string $module: The machine name of the module which title should be shown. Return value string Returns the human readable name of the module or the machine name passed in if no matching module is found. Overrides ModuleHandlerInterface::getName File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 719 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace

ModuleHandler::getModuleList

public ModuleHandler::getModuleList() Returns the list of currently active modules. Return value \Drupal\Core\Extension\Extension[] An associative array whose keys are the names of the modules and whose values are Extension objects. Overrides ModuleHandlerInterface::getModuleList File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 164 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace Drupal\Core\Extension Code public function getModuleList() {

ModuleHandler::getModuleDirectories

public ModuleHandler::getModuleDirectories() Returns an array of directories for all enabled modules. Useful for tasks such as finding a file that exists in all module directories. Return value array Overrides ModuleHandlerInterface::getModuleDirectories File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 708 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace Drupal\Core\Extension Code public function getModuleDirectories() { $dirs = array();

ModuleHandler::getModule

public ModuleHandler::getModule($name) Returns a module extension object from the currently active modules list. Parameters string $name: The name of the module to return. Return value \Drupal\Core\Extension\Extension An extension object. Throws \InvalidArgumentException Thrown when the requested module does not exist. Overrides ModuleHandlerInterface::getModule File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 171 Class ModuleHandler Class that manages modules in a Drupal ins

ModuleHandler::getImplementations

public ModuleHandler::getImplementations($hook) Determines which modules are implementing a hook. Parameters string $hook: The name of the hook (e.g. "help" or "menu"). Return value array An array with the names of the modules which are implementing this hook. Overrides ModuleHandlerInterface::getImplementations File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 326 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace Drupal\Core\Extension Code

ModuleHandler::getImplementationInfo

protected ModuleHandler::getImplementationInfo($hook) Provides information about modules' implementations of a hook. Parameters string $hook: The name of the hook (e.g. "help" or "menu"). Return value mixed[] An array whose keys are the names of the modules which are implementing this hook and whose values are either a string identifying a file in which the implementation is to be found, or FALSE, if the implementation is in the module file. File core/lib/Drupal/Core/Extension/ModuleHandler.p

ModuleHandler::getHookInfo

public ModuleHandler::getHookInfo() Retrieves a list of hooks that are declared through hook_hook_info(). Return value array An associative array whose keys are hook names and whose values are an associative array containing a group name. The structure of the array is the same as the return value of hook_hook_info(). Overrides ModuleHandlerInterface::getHookInfo See also hook_hook_info() File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 289 Class ModuleHandler Class that manage

ModuleHandler::buildModuleDependencies

public ModuleHandler::buildModuleDependencies(array $modules) Determines which modules require and are required by each module. Parameters array $modules: An array of module objects keyed by module name. Each object contains information discovered during a Drupal\Core\Extension\ExtensionDiscovery scan. Return value The same array with the new keys for each module: requires: An array with the keys being the modules that this module requires. required_by: An array with the keys being the modu

ModuleHandler::buildImplementationInfo

protected ModuleHandler::buildImplementationInfo($hook) Builds hook implementation information for a given hook name. Parameters string $hook: The name of the hook (e.g. "help" or "menu"). Return value mixed[] An array whose keys are the names of the modules which are implementing this hook and whose values are either a string identifying a file in which the implementation is to be found, or FALSE, if the implementation is in the module file. Throws \RuntimeException Exception thrown when an