You are here

public function CacheableOmission::__construct in JSON:API 8.2

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

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);
}