function CacheableOmission::__construct
Same name in other branches
- 9 core/modules/jsonapi/src/Normalizer/Value/CacheableOmission.php \Drupal\jsonapi\Normalizer\Value\CacheableOmission::__construct()
- 8.9.x core/modules/jsonapi/src/Normalizer/Value/CacheableOmission.php \Drupal\jsonapi\Normalizer\Value\CacheableOmission::__construct()
- 11.x core/modules/jsonapi/src/Normalizer/Value/CacheableOmission.php \Drupal\jsonapi\Normalizer\Value\CacheableOmission::__construct()
CacheableOmission constructor.
Parameters
\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: Cacheability related to the omission of the normalization. For example, if a field is omitted because of an access result that varies by the `user.permissions` cache context, we need to associate that information with the response so that it will appear for a user *with* the appropriate permissions for that field.
Overrides CacheableNormalization::__construct
File
-
core/
modules/ jsonapi/ src/ Normalizer/ Value/ CacheableOmission.php, line 28
Class
- CacheableOmission
- Represents the cacheability associated with the omission of a value.
Namespace
Drupal\jsonapi\Normalizer\ValueCode
public function __construct(CacheableDependencyInterface $cacheability) {
parent::__construct($cacheability, NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.