You are here

public function IncludedData::__construct in Drupal 10

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

IncludedData constructor.

Parameters

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

See also

\Drupal\jsonapi\JsonApiResource\Data::__construct

File

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

Class

IncludedData
Represents the included member of a JSON:API document.

Namespace

Drupal\jsonapi\JsonApiResource

Code

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