You are here

class OmittedData in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/JsonApiResource/OmittedData.php \Drupal\jsonapi\JsonApiResource\OmittedData
  2. 9 core/modules/jsonapi/src/JsonApiResource/OmittedData.php \Drupal\jsonapi\JsonApiResource\OmittedData

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

@internal JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it.

Hierarchy

  • class \Drupal\jsonapi\JsonApiResource\OmittedData extends \Drupal\jsonapi\JsonApiResource\ResourceObjectData

Expanded class hierarchy of OmittedData

See also

https://www.drupal.org/project/drupal/issues/3032787

jsonapi.api.php

File

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

Namespace

Drupal\jsonapi\JsonApiResource
View source
class OmittedData extends ResourceObjectData {

  /**
   * OmittedData constructor.
   *
   * @param \Drupal\jsonapi\Exception\EntityAccessDeniedHttpException[] $data
   *   Resource objects that are the primary data for the response.
   *
   * @see \Drupal\jsonapi\JsonApiResource\Data::__construct
   */
  public function __construct(array $data) {
    assert(Inspector::assertAllObjects($data, EntityAccessDeniedHttpException::class));
    parent::__construct($data, -1);
  }

}

Members