You are here

public function RestfulDataProviderDbQuery::index in RESTful 7

Get a list of entities.

Return value

array Array of entities, as passed to RestfulEntityBase::viewEntity().

Throws

RestfulBadRequestException

Overrides RestfulBase::index

File

plugins/restful/RestfulDataProviderDbQuery.php, line 322
Contains \RestfulDataProviderDbQuery

Class

RestfulDataProviderDbQuery
@file Contains \RestfulDataProviderDbQuery

Code

public function index() {
  $results = $this
    ->getQueryForList()
    ->execute();
  $return = array();
  foreach ($results as $result) {
    $return[] = $this
      ->mapDbRowToPublicFields($result);
  }
  return $return;
}