You are here

public function OmittedData::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/JsonApiResource/OmittedData.php \Drupal\jsonapi\JsonApiResource\OmittedData::__construct()

OmittedData constructor.

Parameters

\Drupal\jsonapi\Exception\EntityAccessDeniedHttpException[] $data: Resource objects that are the primary data for the response.

Overrides ResourceObjectData::__construct

See also

\Drupal\jsonapi\JsonApiResource\Data::__construct

File

core/modules/jsonapi/src/JsonApiResource/OmittedData.php, line 27

Class

OmittedData
Represents resource data that should be omitted from the JSON:API document.

Namespace

Drupal\jsonapi\JsonApiResource

Code

public function __construct(array $data) {
  assert(Inspector::assertAllObjects($data, EntityAccessDeniedHttpException::class));
  parent::__construct($data, -1);
}