Class that manages modules in a Drupal installation.
Hierarchy
- class \Drupal\Core\Extension\ModuleHandler implements ModuleHandlerInterface
File
- core/lib/Drupal/Core/Extension/ModuleHandler.php, line 12
Namespace
Drupal\Core\Extension
Members
Name | Modifiers | Type | Description |
---|---|---|---|
ModuleHandler::$alterFunctions | protected | property | List of alter hook implementations keyed by hook name(s). |
ModuleHandler::$cacheBackend | protected | property | Cache backend for storing module hook implementation information. |
ModuleHandler::$cacheNeedsWriting | protected | property | Whether the cache needs to be written. |
ModuleHandler::$hookInfo | protected | property | Information returned by hook_hook_info() implementations. |
ModuleHandler::$implementations | protected | property | List of hook implementations keyed by hook name. |
ModuleHandler::$includeFileKeys | protected | property | A list of module include file keys. |
ModuleHandler::$loaded | protected | property | Boolean indicating whether modules have been loaded. |
ModuleHandler::$loadedFiles | protected | property | List of loaded files. |
ModuleHandler::$moduleList | protected | property | List of installed modules. |
ModuleHandler::$root | protected | property | The app root. |
ModuleHandler::$verified | protected | property | List of hooks where the implementations have been "verified". |
ModuleHandler::add | protected | function | Adds a module or profile to the list of currently active modules. |
ModuleHandler::addModule | public | function | Adds a module to the list of currently active modules. Overrides ModuleHandlerInterface::addModule |
ModuleHandler::addProfile | public | function | Adds an installation profile to the list of currently active modules. Overrides ModuleHandlerInterface::addProfile |
ModuleHandler::alter | public | function | Passes alterable variables to specific hook_TYPE_alter() implementations. Overrides ModuleHandlerInterface::alter |
ModuleHandler::buildHookInfo | protected | function | Builds hook_hook_info() information. |
ModuleHandler::buildImplementationInfo | protected | function | Builds hook implementation information for a given hook name. |
ModuleHandler::buildModuleDependencies | public | function | Determines which modules require and are required by each module. Overrides ModuleHandlerInterface::buildModuleDependencies |
ModuleHandler::getHookInfo | public | function | Retrieves a list of hooks that are declared through hook_hook_info(). Overrides ModuleHandlerInterface::getHookInfo |
ModuleHandler::getImplementationInfo | protected | function | Provides information about modules' implementations of a hook. |
ModuleHandler::getImplementations | public | function | Determines which modules are implementing a hook. Overrides ModuleHandlerInterface::getImplementations |
ModuleHandler::getModule | public | function | Returns a module extension object from the currently active modules list. Overrides ModuleHandlerInterface::getModule |
ModuleHandler::getModuleDirectories | public | function | Returns an array of directories for all enabled modules. Useful for tasks such as finding a file that exists in all module directories. Overrides ModuleHandlerInterface::getModuleDirectories |
ModuleHandler::getModuleList | public | function | Returns the list of currently active modules. Overrides ModuleHandlerInterface::getModuleList |
ModuleHandler::getName | public | function | Gets the human readable name of a given module. Overrides ModuleHandlerInterface::getName |
ModuleHandler::implementsHook | public | function | Returns whether a given module implements a given hook. Overrides ModuleHandlerInterface::implementsHook |
ModuleHandler::invoke | public | function | Invokes a hook in a particular module. Overrides ModuleHandlerInterface::invoke |
ModuleHandler::invokeAll | public | function | Invokes a hook in all enabled modules that implement it. Overrides ModuleHandlerInterface::invokeAll |
ModuleHandler::isLoaded | public | function | Returns whether all modules have been loaded. Overrides ModuleHandlerInterface::isLoaded |
ModuleHandler::load | public | function | Includes a module's .module file. Overrides ModuleHandlerInterface::load |
ModuleHandler::loadAll | public | function | Loads all enabled modules. Overrides ModuleHandlerInterface::loadAll |
ModuleHandler::loadAllIncludes | public | function | Loads an include file for each enabled module. Overrides ModuleHandlerInterface::loadAllIncludes |
ModuleHandler::loadInclude | public | function | Loads a module include file. Overrides ModuleHandlerInterface::loadInclude |
ModuleHandler::moduleExists | public | function | Determines whether a given module is enabled. Overrides ModuleHandlerInterface::moduleExists |
ModuleHandler::parseDependency | public static | function | Parses a dependency for comparison by drupal_check_incompatibility(). |
ModuleHandler::reload | public | function | Reloads all enabled modules. Overrides ModuleHandlerInterface::reload |
ModuleHandler::resetImplementations | public | function | Resets the cached list of hook implementations. Overrides ModuleHandlerInterface::resetImplementations |
ModuleHandler::setModuleList | public | function | Sets an explicit list of currently active modules. Overrides ModuleHandlerInterface::setModuleList |
ModuleHandler::verifyImplementations | protected | function | Verifies an array of implementations loaded from the cache, by including the lazy-loaded $module.$group.inc, and checking function_exists(). |
ModuleHandler::writeCache | public | function | Write the hook implementation info to the cache. Overrides ModuleHandlerInterface::writeCache |
ModuleHandler::__construct | public | function | Constructs a ModuleHandler object. |
Please login to continue.