function IncludedData::__construct
Same name in other branches
- 9 core/modules/jsonapi/src/JsonApiResource/IncludedData.php \Drupal\jsonapi\JsonApiResource\IncludedData::__construct()
- 8.9.x core/modules/jsonapi/src/JsonApiResource/IncludedData.php \Drupal\jsonapi\JsonApiResource\IncludedData::__construct()
- 10 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.
Overrides ResourceObjectData::__construct
See also
\Drupal\jsonapi\JsonApiResource\Data::__construct
1 method overrides IncludedData::__construct()
- NullIncludedData::__construct in core/
modules/ jsonapi/ src/ JsonApiResource/ NullIncludedData.php - NullData constructor.
File
-
core/
modules/ jsonapi/ src/ JsonApiResource/ IncludedData.php, line 27
Class
- IncludedData
- Represents the included member of a JSON:API document.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function __construct($data) {
assert(Inspector::assertAllObjects($data, ResourceObject::class, EntityAccessDeniedHttpException::class));
parent::__construct($data, -1);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.