You are here

public function NormalizedReadOnlyStorage::setContext in Configuration Normalizer 8

Same name and namespace in other branches
  1. 2.0.x src/Config/NormalizedReadOnlyStorage.php \Drupal\config_normalizer\Config\NormalizedReadOnlyStorage::setContext()

Sets the context to be used for normalization.

If not given, values are defaulted to those in ::DEFAULT_CONTEXT.

Parameters

array $context: (optional) An array of key-value pairs to pass additional context when needed.

Overrides NormalizedReadOnlyStorageInterface::setContext

1 call to NormalizedReadOnlyStorage::setContext()
NormalizedReadOnlyStorage::__construct in src/Config/NormalizedReadOnlyStorage.php
Create a NormalizedReadOnlyStorage decorating another storage.

File

src/Config/NormalizedReadOnlyStorage.php, line 64

Class

NormalizedReadOnlyStorage
Defines the normalized read only storage.

Namespace

Drupal\config_normalizer\Config

Code

public function setContext(array $context = []) {
  $context += NormalizedReadOnlyStorageInterface::DEFAULT_CONTEXT;
  $this->context = $context;
}