function SyncFactory::getNewExtensions
Same name and namespace in other branches
- main core/lib/Drupal/Core/Config/SyncFactory.php \Drupal\Core\Config\SyncFactory::getNewExtensions()
Gets a list of new extensions in the sync storage.
Parameters
\Drupal\Core\Extension\ExtensionList $extension_list: The extension list service to use to find the extension's path.
array<string,string> $storage_extensions: The list of extensions from the sync storage. The array keys are extension names.
array<string,string> $active_extensions: The list of extensions from the active storage. The array keys are extension names.
Return value
array<string,string> The list of extensions only in the sync storage. The array keys are the extensions names and the values are the absolute paths to the extension.
1 call to SyncFactory::getNewExtensions()
- SyncFactory::wrapStorageWithAutoloadingStorage in core/
lib/ Drupal/ Core/ Config/ SyncFactory.php - Wraps a StorageInterface object in an AutoloadingStorage object.
File
-
core/
lib/ Drupal/ Core/ Config/ SyncFactory.php, line 93
Class
- SyncFactory
- The factory class to create the config.storage.sync service.
Namespace
Drupal\Core\ConfigCode
protected function getNewExtensions(ExtensionList $extension_list, array $storage_extensions, array $active_extensions) : array {
foreach (array_diff_key($storage_extensions, $active_extensions) as $name => $weight) {
try {
$new_extensions[$name] = $this->root . '/' . $extension_list->getPath($name);
} catch (UnknownExtensionException) {
// If the extension is missing this will surface when reading or at
// validation time.
}
}
return $new_extensions ?? [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.