function ModuleHandlerInterface::addModule

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php \Drupal\Core\Extension\ModuleHandlerInterface::addModule()
  2. 8.9.x core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php \Drupal\Core\Extension\ModuleHandlerInterface::addModule()
  3. 11.x core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php \Drupal\Core\Extension\ModuleHandlerInterface::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'.

File

core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php, line 88

Class

ModuleHandlerInterface
Interface for classes that manage a set of enabled modules.

Namespace

Drupal\Core\Extension

Code

public function addModule($name, $path);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.