class GhostStorage in Config Filter 8
Same name and namespace in other branches
- 8.2 src/Config/GhostStorage.php \Drupal\config_filter\Config\GhostStorage
Class GhostStorage.
A GhostStorage acts like the normal Storage it wraps. All reading operations return the values of the decorated storage but write operations are silently ignored and the ghost pretends that the operation was successful.
@package Drupal\config_filter\Config
Hierarchy
- class \Drupal\config_filter\Config\ReadOnlyStorage implements StorageInterface
- class \Drupal\config_filter\Config\GhostStorage implements StorageInterface
Expanded class hierarchy of GhostStorage
1 file declares its use of GhostStorage
- GhostStorageTest.php in src/
Tests/ GhostStorageTest.php
File
- src/
Config/ GhostStorage.php, line 16
Namespace
Drupal\config_filter\ConfigView source
class GhostStorage extends ReadOnlyStorage implements StorageInterface {
/**
* {@inheritdoc}
*/
public function write($name, array $data) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function delete($name) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function rename($name, $new_name) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function deleteAll($prefix = '') {
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GhostStorage:: |
public | function |
Deletes a configuration object from the storage. Overrides ReadOnlyStorage:: |
|
GhostStorage:: |
public | function |
Deletes configuration objects whose names start with a given prefix. Overrides ReadOnlyStorage:: |
|
GhostStorage:: |
public | function |
Renames a configuration object in the storage. Overrides ReadOnlyStorage:: |
|
GhostStorage:: |
public | function |
Writes configuration data to the storage. Overrides ReadOnlyStorage:: |
|
ReadOnlyStorage:: |
protected | property | The config storage that we are decorating. | |
ReadOnlyStorage:: |
public | function |
Creates a collection on the storage. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Decodes configuration data from the storage-specific format. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Encodes configuration data into the storage-specific format. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Returns whether a configuration object exists. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Gets the existing collections. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Gets the name of the current collection the storage is using. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Gets configuration object names starting with a given prefix. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Reads configuration data from the storage. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function |
Reads configuration data from the storage. Overrides StorageInterface:: |
|
ReadOnlyStorage:: |
public | function | Create a ReadOnlyStorage decorating another storage. | |
StorageInterface:: |
constant | The default collection name. |