public function ModuleHandler::addModule in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::addModule()
- 10 core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::addModule()
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'.
Overrides ModuleHandlerInterface::addModule
File
- core/
lib/ Drupal/ Core/ Extension/ ModuleHandler.php, line 192
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\Core\ExtensionCode
public function addModule($name, $path) {
$this
->add('module', $name, $path);
}