function SyncFactory::wrapStorageWithAutoloadingStorage
Same name and namespace in other branches
- main core/lib/Drupal/Core/Config/SyncFactory.php \Drupal\Core\Config\SyncFactory::wrapStorageWithAutoloadingStorage()
Wraps a StorageInterface object in an AutoloadingStorage object.
The FileStorage object is wrapped in an AutoloadingStorage object to ensure we can read configuration from new extensions.
Parameters
\Drupal\Core\Config\StorageInterface $storage: The storage object to wrap.
Return value
\Drupal\Core\Config\StorageInterface The wrapped storage object.
1 call to SyncFactory::wrapStorageWithAutoloadingStorage()
- SyncFactory::get in core/
lib/ Drupal/ Core/ Config/ SyncFactory.php - Gets a StorageInterface object working with the sync config directory.
File
-
core/
lib/ Drupal/ Core/ Config/ SyncFactory.php, line 64
Class
- SyncFactory
- The factory class to create the config.storage.sync service.
Namespace
Drupal\Core\ConfigCode
public function wrapStorageWithAutoloadingStorage(StorageInterface $storage) : StorageInterface {
$storage_core_extension = $storage->read('core.extension') ?? [];
$active_core_extension = $this->activeConfig
->read('core.extension') ?? [];
return new AutoloadingStorage($storage, array_merge($this->getNewExtensions($this->moduleExtensionList, $storage_core_extension['module'] ?? [], $active_core_extension['module'] ?? []), $this->getNewExtensions($this->themeExtensionList, $storage_core_extension['theme'] ?? [], $active_core_extension['theme'] ?? [])));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.