public function DataProviderDbQuery::index in RESTful 7.2
List operation.
Return value
array An array of structured data for the things being viewed.
Overrides DataProvider::index
File
- src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php, line 370 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderDbQuery.
Class
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
public function index() {
$results = $this
->getQueryForList()
->execute();
$return = array();
foreach ($results as $result) {
$return[] = $this
->mapDbRowToPublicFields($result);
}
return $return;
}