You are here

public function DataProvider::index in RESTful 7.2

List operation.

Return value

array An array of structured data for the things being viewed.

Overrides CrudInterface::index

1 call to DataProvider::index()
DataProvider::discover in src/Plugin/resource/DataProvider/DataProvider.php
Return the discovery information for the given entity.
2 methods override DataProvider::index()
DataProviderDbQuery::index in src/Plugin/resource/DataProvider/DataProviderDbQuery.php
List operation.
DataProviderResource::index in src/Plugin/resource/DataProvider/DataProviderResource.php
List operation.

File

src/Plugin/resource/DataProvider/DataProvider.php, line 280
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProvider.

Class

DataProvider

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

public function index() {
  if (!($ids = $this
    ->getIndexIds())) {
    return array();
  }
  return $this
    ->viewMultiple($ids);
}