function CacheableNormalization::__construct
Same name in other branches
- 9 core/modules/jsonapi/src/Normalizer/Value/CacheableNormalization.php \Drupal\jsonapi\Normalizer\Value\CacheableNormalization::__construct()
- 10 core/modules/jsonapi/src/Normalizer/Value/CacheableNormalization.php \Drupal\jsonapi\Normalizer\Value\CacheableNormalization::__construct()
- 11.x core/modules/jsonapi/src/Normalizer/Value/CacheableNormalization.php \Drupal\jsonapi\Normalizer\Value\CacheableNormalization::__construct()
CacheableNormalization constructor.
Parameters
\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: The cacheability metadata for the normalized data.
array|string|int|float|bool|null $normalization: The normalized data. This value must not contain any CacheableNormalizations.
1 call to CacheableNormalization::__construct()
- CacheableOmission::__construct in core/
modules/ jsonapi/ src/ Normalizer/ Value/ CacheableOmission.php - CacheableOmission constructor.
1 method overrides CacheableNormalization::__construct()
- CacheableOmission::__construct in core/
modules/ jsonapi/ src/ Normalizer/ Value/ CacheableOmission.php - CacheableOmission constructor.
File
-
core/
modules/ jsonapi/ src/ Normalizer/ Value/ CacheableNormalization.php, line 39
Class
- CacheableNormalization
- Use to store normalized data and its cacheability.
Namespace
Drupal\jsonapi\Normalizer\ValueCode
public function __construct(CacheableDependencyInterface $cacheability, $normalization) {
assert(is_array($normalization) && static::hasNoNestedInstances($normalization) || is_string($normalization) || is_int($normalization) || is_float($normalization) || is_bool($normalization) || is_null($normalization));
$this->normalization = $normalization;
$this->setCacheability($cacheability);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.