class TakeoverConfig_Storage in MongoDB 8
Copies config storage.
Hierarchy
- class \Drupal\takeover\TakeoverConfig_Storage
Expanded class hierarchy of TakeoverConfig_Storage
File
- takeover/
src/ TakeoverConfig_Storage.php, line 15 - Contains \Drupal\takeover\TakeoverConfigStorageActive.
Namespace
Drupal\takeoverView source
class TakeoverConfig_Storage {
/**
* {@inheritdoc}
*/
public static function takeover(StorageInterface $source, StorageInterface $destination) {
foreach ($source
->listAll() as $name) {
$destination
->write($name, $source
->read($name));
}
foreach ($source
->getAllCollectionNames() as $collection_name) {
$collection_destination = $destination
->createCollection($collection_name);
$collection_source = $source
->createCollection($collection_name);
foreach ($collection_source
->listAll() as $name) {
$collection_destination
->write($name, $collection_source
->read($name));
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TakeoverConfig_Storage:: |
public static | function |