You are here

protected function WardenManager::getLibraryDetails in Warden 8

Same name and namespace in other branches
  1. 8.2 src/Service/WardenManager.php \Drupal\warden\Service\WardenManager::getLibraryDetails()
  2. 3.x src/Service/WardenManager.php \Drupal\warden\Service\WardenManager::getLibraryDetails()

Gets an array of the third party library information on the site.

Parameters

string $filename: A full path to the file that contains the version information.

Return value

array key is a third party library name, value is an array of its details.

1 call to WardenManager::getLibraryDetails()
WardenManager::generateSiteData in src/Service/WardenManager.php
Generate all the site's data for Warden.

File

src/Service/WardenManager.php, line 280

Class

WardenManager
Default controller for the warden module.

Namespace

Drupal\warden\Service

Code

protected function getLibraryDetails($filename) {
  $details = Json::decode(file_get_contents($filename));
  return [
    $details['name'] => isset($details['version']) ? $details['version'] : '',
  ];
}