protected function WardenManager::getModuleDetails in Warden 8
Same name and namespace in other branches
- 8.2 src/Service/WardenManager.php \Drupal\warden\Service\WardenManager::getModuleDetails()
- 3.x src/Service/WardenManager.php \Drupal\warden\Service\WardenManager::getModuleDetails()
Gets an array of the module information that is used on the site.
Parameters
string $module: The name of the module
string $filename: A full path to an info yml file.
Return value
array key is a project name or module name, value is an array of its details.
1 call to WardenManager::getModuleDetails()
- WardenManager::generateSiteData in src/
Service/ WardenManager.php - Generate all the site's data for Warden.
File
- src/
Service/ WardenManager.php, line 253
Class
- WardenManager
- Default controller for the warden module.
Namespace
Drupal\warden\ServiceCode
protected function getModuleDetails($module, $filename) {
$details = $this
->getInfoParser()
->parse($filename);
if (!empty($details['project'])) {
return [
$details['project'] => [
'version' => isset($details['version']) ? $details['version'] : '',
],
];
}
else {
return [
$module => [
'version' => isset($details['version']) ? $details['version'] : '',
],
];
}
}