public function DataProviderDbQuery::getIndexIds in RESTful 7.2
Returns the ID to render for the current index GET request.
Return value
array Numeric array containing the identifiers to be sent to viewMultiple.
Overrides DataProviderInterface::getIndexIds
File
- src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php, line 354 - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderDbQuery.
Class
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
public function getIndexIds() {
$results = $this
->getQueryForList()
->execute();
$ids = array();
foreach ($results as $result) {
$ids[] = array_map(function ($id_column) use ($result) {
return $result->{$id_column};
}, $this
->getIdColumn());
}
return $ids;
}