protected function WardenManager::getLibraries in Warden 8
Same name and namespace in other branches
- 8.2 src/Service/WardenManager.php \Drupal\warden\Service\WardenManager::getLibraries()
- 3.x src/Service/WardenManager.php \Drupal\warden\Service\WardenManager::getLibraries()
Return value
\stdClass[]
1 call to WardenManager::getLibraries()
- WardenManager::generateSiteData in src/
Service/ WardenManager.php - Generate all the site's data for Warden.
File
- src/
Service/ WardenManager.php, line 391
Class
- WardenManager
- Default controller for the warden module.
Namespace
Drupal\warden\ServiceCode
protected function getLibraries() {
if (!isset($this->libraries)) {
// Scan the libraries directory for libraries which have been added.
$libraryDir = \Drupal::root() . '/libraries';
if (file_exists($libraryDir)) {
// Scan for package.json files for libraries that have this.
$listing = file_scan_directory($libraryDir, '/^package.json/');
$this
->setLibraries($listing);
}
}
return $this->libraries;
}