ModuleHandlerInterface::buildModuleDependencies

public ModuleHandlerInterface::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

ModuleHandlerInterface::alter

public ModuleHandlerInterface::alter($type, &$data, &$context1 = NULL, &$context2 = NULL) Passes alterable variables to specific hook_TYPE_alter() implementations. This dispatch function hands off the passed-in variables to type-specific hook_TYPE_alter() implementations in modules. It ensures a consistent interface for all altering operations. A maximum of 2 alterable arguments is supported. In case more arguments need to be passed and alterable, modules provide additional variable

ModuleHandlerInterface::addProfile

public ModuleHandlerInterface::addProfile($name, $path) Adds an installation profile to the list of currently active modules. Parameters string $name: The profile name; e.g., 'standard'. string $path: The profile path; e.g., 'core/profiles/standard'. File core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php, line 96 Class ModuleHandlerInterface Interface for classes that manage a set of enabled modules. Namespace Drupal\Core\Extension Code public function addProfile($name, $path)

ModuleHandlerInterface::addModule

public ModuleHandlerInterface::addModule($name, $path) Adds a module to the list of currently active modules. Parameters string $name: The module name; e.g., 'node'. string $path: The module path; e.g., 'core/modules/node'. File core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php, line 86 Class ModuleHandlerInterface Interface for classes that manage a set of enabled modules. Namespace Drupal\Core\Extension Code public function addModule($name, $path);

ModuleHandlerInterface

Interface for classes that manage a set of enabled modules. Classes implementing this interface work with a fixed list of modules and are responsible for loading module files and maintaining information about module dependencies and hook implementations. Hierarchy interface \Drupal\Core\Extension\ModuleHandlerInterface File core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php, line 12 Namespace Drupal\Core\Extension Members Name Modifiers Type Description ModuleHandlerInt

ModuleHandler::__construct

public ModuleHandler::__construct($root, array $module_list = array(), CacheBackendInterface $cache_backend) Constructs a ModuleHandler object. Parameters string $root: The app root. array $module_list: An associative array whose keys are the names of installed modules and whose values are Extension class parameters. This is normally the %container.modules% parameter being set up by DrupalKernel. \Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend for storing module hook imp

ModuleHandler::writeCache

public ModuleHandler::writeCache() Write the hook implementation info to the cache. Overrides ModuleHandlerInterface::writeCache File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 334 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace Drupal\Core\Extension Code public function writeCache() { if ($this->cacheNeedsWriting) { $this->cacheBackend->set('module_implements', $this->implementations); $this->cacheNeedsWriting = F

ModuleHandler::verifyImplementations

protected ModuleHandler::verifyImplementations(&$implementations, $hook) Verifies an array of implementations loaded from the cache, by including the lazy-loaded $module.$group.inc, and checking function_exists(). Parameters string[] $implementations: Implementation "group" by module name. string $hook: The hook name. Return value bool TRUE, if all implementations exist. FALSE, if one or more implementations don't exist and need to be removed from the cache. File core/lib/Drupal/Core/Exte

ModuleHandler::setModuleList

public ModuleHandler::setModuleList(array $module_list = array()) Sets an explicit list of currently active modules. Parameters \Drupal\Core\Extension\Extension[] $module_list: An associative array whose keys are the names of the modules and whose values are Extension objects. Overrides ModuleHandlerInterface::setModuleList File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 181 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace Drupal\Core\Exten

ModuleHandler::resetImplementations

public ModuleHandler::resetImplementations() Resets the cached list of hook implementations. Overrides ModuleHandlerInterface::resetImplementations File core/lib/Drupal/Core/Extension/ModuleHandler.php, line 344 Class ModuleHandler Class that manages modules in a Drupal installation. Namespace Drupal\Core\Extension Code public function resetImplementations() { $this->implementations = NULL; $this->hookInfo = NULL; $this->alterFunctions = NULL; // We maintain a persiste