public function CacheableOmission::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/Normalizer/Value/CacheableOmission.php \Drupal\jsonapi\Normalizer\Value\CacheableOmission::__construct()
- 10 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);
}