protected function WebformLibrariesManager::initExcludedLibraries in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformLibrariesManager.php \Drupal\webform\WebformLibrariesManager::initExcludedLibraries()
Initialize excluded libraries.
Return value
array A key array containing excluded libraries.
1 call to WebformLibrariesManager::initExcludedLibraries()
- WebformLibrariesManager::getExcludedLibraries in src/
WebformLibrariesManager.php - Get excluded libraries.
File
- src/
WebformLibrariesManager.php, line 581
Class
- WebformLibrariesManager
- Webform libraries manager.
Namespace
Drupal\webformCode
protected function initExcludedLibraries() {
// Get excluded optional libraries.
if ($excluded_libraries = $this->configFactory
->get('webform.settings')
->get('libraries.excluded_libraries')) {
$excluded_libraries = array_combine($excluded_libraries, $excluded_libraries);
}
else {
$excluded_libraries = [];
}
// Get excluded libraries based on excluded (element) types.
$libraries = $this
->getLibraries();
foreach ($libraries as $library_name => $library) {
if (!empty($library['elements']) && $this
->areElementsExcluded($library['elements'])) {
$excluded_libraries[$library_name] = $library_name;
}
}
return $excluded_libraries;
}