You are here

public function RestfulEntityBase::viewEntities in RESTful 7

Get a list of entities based on a list of IDs.

Parameters

string $ids_string: Coma separated list of ids.

Return value

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

Throws

RestfulBadRequestException

Overrides RestfulDataProviderEFQ::viewEntities

File

plugins/restful/RestfulEntityBase.php, line 151
Contains RestfulEntityBase.

Class

RestfulEntityBase
An abstract implementation of RestfulEntityInterface.

Code

public function viewEntities($ids_string) {
  $ids = array_unique(array_filter(explode(',', $ids_string)));
  $output = array();
  foreach ($ids as $id) {
    $output[] = $this
      ->viewEntity($id);
  }
  return $output;
}