You are here

protected function ConfigNormalizerBase::isDefaultModeContext in Configuration Normalizer 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/ConfigNormalizerBase.php \Drupal\config_normalizer\Plugin\ConfigNormalizerBase::isDefaultModeContext()

Determines whether the context has a default normalization mode.

Parameters

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

Return value

bool TRUE if the context normalization mode is default. Otherwise, FALSE.

2 calls to ConfigNormalizerBase::isDefaultModeContext()
ConfigNormalizerFilterFormat::normalize in src/Plugin/ConfigNormalizer/ConfigNormalizerFilterFormat.php
Normalizes config for comparison.
ConfigNormalizerSort::normalize in src/Plugin/ConfigNormalizer/ConfigNormalizerSort.php
Normalizes config for comparison.

File

src/Plugin/ConfigNormalizerBase.php, line 63

Class

ConfigNormalizerBase
Base class for Config normalizer plugins.

Namespace

Drupal\config_normalizer\Plugin

Code

protected function isDefaultModeContext(array $context) {
  return !empty($context['normalization_mode']) && $context['normalization_mode'] === NormalizedReadOnlyStorageInterface::DEFAULT_NORMALIZATION_MODE;
}