public function JsonApiDocumentTopLevel::__construct in JSON:API 8
Instantiates a JsonApiDocumentTopLevel object.
Parameters
\Drupal\Core\Entity\EntityInterface|\Drupal\jsonapi\EntityCollection $data: The data to normalize. It can be either a straight up entity or a collection of entities.
File
- src/
Resource/ JsonApiDocumentTopLevel.php, line 31
Class
- JsonApiDocumentTopLevel
- Represents a JSON API document's "top level".
Namespace
Drupal\jsonapi\ResourceCode
public function __construct($data) {
$this->data = $data;
}