public function WebformLibrariesManager::getLibraries in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformLibrariesManager.php \Drupal\webform\WebformLibrariesManager::getLibraries()
Get libraries.
Parameters
bool|null $included: Optionally filter by include (TRUE) or excluded (FALSE)
Return value
array An associative array of libraries.
Overrides WebformLibrariesManagerInterface::getLibraries
3 calls to WebformLibrariesManager::getLibraries()
- WebformLibrariesManager::getLibrary in src/
WebformLibrariesManager.php - Get library information.
- WebformLibrariesManager::initExcludedLibraries in src/
WebformLibrariesManager.php - Initialize excluded libraries.
- WebformLibrariesManager::requirements in src/
WebformLibrariesManager.php - Get third party libraries status for hook_requirements and drush.
File
- src/
WebformLibrariesManager.php, line 221
Class
- WebformLibrariesManager
- Webform libraries manager.
Namespace
Drupal\webformCode
public function getLibraries($included = NULL) {
// Initialize libraries.
if (!isset($this->libraries)) {
$this->libraries = $this
->initLibraries();
}
$libraries = $this->libraries;
if ($included !== NULL) {
foreach ($libraries as $library_name => $library) {
if ($this
->isIncluded($library_name) !== $included) {
unset($libraries[$library_name]);
}
}
}
return $libraries;
}