public function CacheableNormalization::__construct in JSON:API 8.2
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 src/
Normalizer/ Value/ CacheableOmission.php - CacheableOmission constructor.
1 method overrides CacheableNormalization::__construct()
- CacheableOmission::__construct in src/
Normalizer/ Value/ CacheableOmission.php - CacheableOmission constructor.
File
- 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);
}