function OmittedData::__construct

Same name in other branches
  1. 9 core/modules/jsonapi/src/JsonApiResource/OmittedData.php \Drupal\jsonapi\JsonApiResource\OmittedData::__construct()
  2. 8.9.x core/modules/jsonapi/src/JsonApiResource/OmittedData.php \Drupal\jsonapi\JsonApiResource\OmittedData::__construct()
  3. 11.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.