function getModuleNames in Demonstration site (Sandbox / Snapshot) 8
To get module directories.
1 call to getModuleNames()
- demo_set_info in ./
demo.module
File
- ./
demo.module, line 644
Code
function getModuleNames() {
$dirs = [];
foreach (\Drupal::moduleHandler()
->getModuleList() as $module => $filename) {
$dirs[$module] = $filename
->getExtensionFilename();
}
return $dirs;
}