You are here

public function Data::count in JSON:API 8.2

Returns the number of entities.

Return value

int The number of parameters

File

src/JsonApiResource/Data.php, line 82

Class

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

Namespace

Drupal\jsonapi\JsonApiResource

Code

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