public function WebformLibrariesManager::getLibraries in Webform 6.x
Same name and namespace in other branches
- 8.5 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 261
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;
foreach ($libraries as $library_name => $library) {
if ($included !== NULL && $this
->isIncluded($library_name) !== $included) {
unset($libraries[$library_name]);
}
if (isset($library['core']) && $library['core'] !== intval(\Drupal::VERSION) && !Settings::get('webform_libraries_ignore_core', FALSE)) {
unset($libraries[$library_name]);
}
}
return $libraries;
}