You are here

public function Data::toArray in JSON:API 8.2

Returns the collection as an array.

Return value

\Drupal\Core\Entity\EntityInterface[] The array of entities.

File

src/JsonApiResource/Data.php, line 106

Class

Data
Represents the `data` and `included` objects of a top-level object.

Namespace

Drupal\jsonapi\JsonApiResource

Code

public function toArray() {
  return $this->data;
}