You are here

interface NormalizedReadOnlyStorageInterface in Configuration Normalizer 2.0.x

Same name and namespace in other branches
  1. 8 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

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 13

Namespace

Drupal\config_normalizer\Config
View 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.
   *
   * @deprecated in config_normalizer:2.0.0-alpha1 and is removed from config_normalizer:2.0.0. No replacement.
   * @see https://www.drupal.org/project/config_normalizer/issues/3230398
   */
  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.
   *
   * @deprecated in config_normalizer:2.0.0-alpha1 and is removed from config_normalizer:2.0.0. No replacement.
   * @see https://www.drupal.org/project/config_normalizer/issues/3230398
   */
  const NORMALIZATION_MODE_PROVIDE = 'provide';

  /**
   * The default normalization mode.
   *
   * @deprecated in config_normalizer:2.0.0-alpha1 and is removed from config_normalizer:2.0.0. No replacement.
   * @see https://www.drupal.org/project/config_normalizer/issues/3230398
   */
  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.
   *
   * @deprecated in config_normalizer:2.0.0-alpha1 and is removed from config_normalizer:2.0.0. No replacement.
   * @see https://www.drupal.org/project/config_normalizer/issues/3230398
   */
  const DEFAULT_CONTEXT = [
    'normalization_mode' => self::DEFAULT_NORMALIZATION_MODE,
    'reference_storage_service' => NULL,
  ];

  /**
   * Gets the context to be used for normalization.
   *
   * @return array
   *   An array of key-value pairs to pass additional context when needed.
   *
   * @deprecated in config_normalizer:2.0.0-alpha1 and is removed from config_normalizer:2.0.0. No replacement.
   * @see https://www.drupal.org/project/config_normalizer/issues/3230398
   */
  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) Unused.
   *
   * @deprecated in config_normalizer:2.0.0-alpha1 and is removed from config_normalizer:2.0.0. No replacement.
   * @see https://www.drupal.org/project/config_normalizer/issues/3230398
   */
  public function setContext(array $context = []);

}

Members

Namesort descending Modifiers Type Description Overrides
NormalizedReadOnlyStorageInterface::DEFAULT_CONTEXT Deprecated constant The default context for normalization.
NormalizedReadOnlyStorageInterface::DEFAULT_NORMALIZATION_MODE Deprecated constant The default normalization mode.
NormalizedReadOnlyStorageInterface::getContext Deprecated public function Gets the context to be used for normalization. 1
NormalizedReadOnlyStorageInterface::NORMALIZATION_MODE_COMPARE Deprecated constant Mode in which the storage is being prepared for comparison.
NormalizedReadOnlyStorageInterface::NORMALIZATION_MODE_PROVIDE Deprecated constant Mode in which the storage is being prepared for providing configuration.
NormalizedReadOnlyStorageInterface::setContext Deprecated public function Sets the context to be used for normalization. 1
StorageInterface::createCollection public function Creates a collection on the storage. 8
StorageInterface::decode public function Decodes configuration data from the storage-specific format. 8
StorageInterface::DEFAULT_COLLECTION constant The default collection name.
StorageInterface::delete public function Deletes a configuration object from the storage. 8
StorageInterface::deleteAll public function Deletes configuration objects whose names start with a given prefix. 8
StorageInterface::encode public function Encodes configuration data into the storage-specific format. 8
StorageInterface::exists public function Returns whether a configuration object exists. 8
StorageInterface::getAllCollectionNames public function Gets the existing collections. 8
StorageInterface::getCollectionName public function Gets the name of the current collection the storage is using. 8
StorageInterface::listAll public function Gets configuration object names starting with a given prefix. 8
StorageInterface::read public function Reads configuration data from the storage. 8
StorageInterface::readMultiple public function Reads configuration data from the storage. 8
StorageInterface::rename public function Renames a configuration object in the storage. 8
StorageInterface::write public function Writes configuration data to the storage. 8