class SettableStorageComparer in Configuration Synchronizer 8.2
Defines a settable config storage comparer.
Hierarchy
- class \Drupal\Core\Config\StorageComparer implements StorageComparerInterface uses DependencySerializationTrait
- class \Drupal\config_sync\Config\SettableStorageComparer
Expanded class hierarchy of SettableStorageComparer
1 file declares its use of SettableStorageComparer
File
- src/
Config/ SettableStorageComparer.php, line 13
Namespace
Drupal\config_sync\ConfigView source
class SettableStorageComparer extends StorageComparer {
/**
* Sets the source storage used to discover configuration changes.
*
* @param \Drupal\Core\Config\StorageInterface $storage
*
* @return $this
*/
public function setSourceStorage(StorageInterface $storage) {
// Reset the static configuration data cache.
$this->sourceCacheStorage
->deleteAll();
$this->sourceNames = [];
$this->sourceStorage = new CachedStorage($storage, $this->sourceCacheStorage);
$this->changelist = [
StorageInterface::DEFAULT_COLLECTION => $this
->getEmptyChangelist(),
];
return $this;
}
/**
* Sets the target storage used to discover configuration changes.
*
* @param \Drupal\Core\Config\StorageInterface $storage
*
* @return $this
*/
public function setTargetStorage(StorageInterface $storage) {
// Reset the static configuration data cache.
$this->targetCacheStorage
->deleteAll();
$this->targetNames = [];
$this->targetStorage = new CachedStorage($storage, $this->targetCacheStorage);
$this->changelist = [
StorageInterface::DEFAULT_COLLECTION => $this
->getEmptyChangelist(),
];
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
SettableStorageComparer:: |
public | function | Sets the source storage used to discover configuration changes. | |
SettableStorageComparer:: |
public | function | Sets the target storage used to discover configuration changes. | |
StorageComparer:: |
protected | property | List of changes to between the source storage and the target storage. | |
StorageComparer:: |
protected | property | A memory cache backend to statically cache source configuration data. | |
StorageComparer:: |
protected | property | Sorted list of all the configuration object names in the source storage. | |
StorageComparer:: |
protected | property | The source storage used to discover configuration changes. | |
StorageComparer:: |
protected | property | The source storages keyed by collection. | |
StorageComparer:: |
protected | property | A memory cache backend to statically cache target configuration data. | |
StorageComparer:: |
protected | property | Sorted list of all the configuration object names in the target storage. | |
StorageComparer:: |
protected | property | The target storage used to write configuration changes. | |
StorageComparer:: |
protected | property | The target storages keyed by collection. | |
StorageComparer:: |
protected | function | Adds changes to the changelist. | |
StorageComparer:: |
protected | function | Creates the create changelist. | |
StorageComparer:: |
protected | function | Creates the delete changelist. | |
StorageComparer:: |
protected | function | Creates the rename changelist. | |
StorageComparer:: |
protected | function | Creates the update changelist. | |
StorageComparer:: |
public | function | ||
StorageComparer:: |
protected | function | Creates a rename name from the old and new names for the object. | |
StorageComparer:: |
public | function |
Extracts old and new configuration names from a configuration change name. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Gets the existing collections from both the target and source storage. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
protected | function | Gets and sorts configuration data from the source and target storages. | |
StorageComparer:: |
public | function |
Gets the list of differences to import. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Gets an empty changelist. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Gets the configuration source storage. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Gets the configuration target storage. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Checks if there are any operations with changes to process. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Moves a rename operation to an update. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
protected | function | Removes the entry from the given operation changelist for the given name. | |
StorageComparer:: |
public | function |
Recalculates the differences. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function |
Validates that the system.site::uuid in the source and target match. Overrides StorageComparerInterface:: |
|
StorageComparer:: |
public | function | Constructs the Configuration storage comparer. |