You are here

public function CacheableOmission::__construct in Drupal 9

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

Code

public function __construct(CacheableDependencyInterface $cacheability) {
  parent::__construct($cacheability, NULL);
}