interface NormalizedReadOnlyStorageInterface in Configuration Normalizer 8
Same name and namespace in other branches
- 2.0.x src/Config/NormalizedReadOnlyStorageInterface.php \Drupal\config_normalizer\Config\NormalizedReadOnlyStorageInterface
Interface for a normalized read only storage.
This is like any other StorageInterface, except it does not allow writing and normalizes data on read.
Hierarchy
- interface \Drupal\Core\Config\StorageInterface
- interface \Drupal\config_normalizer\Config\NormalizedReadOnlyStorageInterface
Expanded class hierarchy of NormalizedReadOnlyStorageInterface
All classes that implement NormalizedReadOnlyStorageInterface
1 file declares its use of NormalizedReadOnlyStorageInterface
- ConfigNormalizerBase.php in src/
Plugin/ ConfigNormalizerBase.php
File
- src/
Config/ NormalizedReadOnlyStorageInterface.php, line 16
Namespace
Drupal\config_normalizer\ConfigView source
interface NormalizedReadOnlyStorageInterface extends StorageInterface {
/**
* Mode in which the storage is being prepared for comparison.
*
* This mode is typically used on both storages that are passed to a
* class implementing \Drupal\Core\Config\StorageComparerInterface.
*/
const NORMALIZATION_MODE_COMPARE = 'compare';
/**
* Mode in which the storage is being prepared for providing configuration.
*
* Because configuration is to be provided in a context where it may be later
* written, only write-appropriate normalization should be done. For example,
* data should not be sorted since sorting will leave data in a state that
* may not be appropriate for writing.
*/
const NORMALIZATION_MODE_PROVIDE = 'provide';
/**
* The default normalization mode.
*/
const DEFAULT_NORMALIZATION_MODE = self::NORMALIZATION_MODE_COMPARE;
/**
* The default context for normalization.
*
* Context is an array with the following key-valu pairs:
* - normalization_mode: The mode used for normalization.
* - reference_storage_service: a storage that the configuration is normalized
* against. When this is the site's active configuration storage,
* config.storage, normalization should replicate any changes made at
* config install time.
*/
const DEFAULT_CONTEXT = [
'normalization_mode' => self::DEFAULT_NORMALIZATION_MODE,
'reference_storage_service' => NULL,
];
/**
* Gets the context to be used for normalization.
*
* @param array
* An array of key-value pairs to pass additional context when needed.
*/
public function getContext();
/**
* Sets the context to be used for normalization.
*
* If not given, values are defaulted to those in ::DEFAULT_CONTEXT.
*
* @param array $context
* (optional) An array of key-value pairs to pass additional context when needed.
*/
public function setContext(array $context = []);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NormalizedReadOnlyStorageInterface:: |
constant | The default context for normalization. | ||
NormalizedReadOnlyStorageInterface:: |
constant | The default normalization mode. | ||
NormalizedReadOnlyStorageInterface:: |
public | function | Gets the context to be used for normalization. | 1 |
NormalizedReadOnlyStorageInterface:: |
constant | Mode in which the storage is being prepared for comparison. | ||
NormalizedReadOnlyStorageInterface:: |
constant | Mode in which the storage is being prepared for providing configuration. | ||
NormalizedReadOnlyStorageInterface:: |
public | function | Sets the context to be used for normalization. | 1 |
StorageInterface:: |
public | function | Creates a collection on the storage. | 8 |
StorageInterface:: |
public | function | Decodes configuration data from the storage-specific format. | 8 |
StorageInterface:: |
constant | The default collection name. | ||
StorageInterface:: |
public | function | Deletes a configuration object from the storage. | 8 |
StorageInterface:: |
public | function | Deletes configuration objects whose names start with a given prefix. | 8 |
StorageInterface:: |
public | function | Encodes configuration data into the storage-specific format. | 8 |
StorageInterface:: |
public | function | Returns whether a configuration object exists. | 8 |
StorageInterface:: |
public | function | Gets the existing collections. | 8 |
StorageInterface:: |
public | function | Gets the name of the current collection the storage is using. | 8 |
StorageInterface:: |
public | function | Gets configuration object names starting with a given prefix. | 8 |
StorageInterface:: |
public | function | Reads configuration data from the storage. | 8 |
StorageInterface:: |
public | function | Reads configuration data from the storage. | 8 |
StorageInterface:: |
public | function | Renames a configuration object in the storage. | 8 |
StorageInterface:: |
public | function | Writes configuration data to the storage. | 8 |