public ModuleHandler::load($name)
Includes a module's .module file.
This prevents including a module more than once.
Parameters
string $name: The name of the module to load.
Return value
bool TRUE if the item is loaded or has already been loaded.
Overrides ModuleHandlerInterface::load
File
- core/lib/Drupal/Core/Extension/ModuleHandler.php, line 121
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\Core\Extension
Code
public function load($name) { if (isset($this->loadedFiles[$name])) { return TRUE; } if (isset($this->moduleList[$name])) { $this->moduleList[$name]->load(); $this->loadedFiles[$name] = TRUE; return TRUE; } return FALSE; }
Please login to continue.