public function ModuleHandler::getModuleList in Service Container 7
Same name and namespace in other branches
- 7.2 src/Extension/ModuleHandler.php \Drupal\service_container\Extension\ModuleHandler::getModuleList()
Returns the list of currently active modules.
Return value
\Drupal\Core\Extension\Extension[] An associative array whose keys are the names of the modules and whose values are Extension objects.
Overrides ModuleHandlerInterface::getModuleList
1 call to ModuleHandler::getModuleList()
- ModuleHandler::getModuleDirectories in src/
Extension/ ModuleHandler.php - Returns an array of directories for all enabled modules. Useful for tasks such as finding a file that exists in all module directories.
File
- src/
Extension/ ModuleHandler.php, line 84 - Contains Drupal\service_container\Extension\ModuleHandler.
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\service_container\ExtensionCode
public function getModuleList() {
$module_list = array();
foreach ($this->drupal7
->module_list() as $module) {
$module_list[$module] = $this
->getModule($module);
}
return $module_list;
}