You are here

public function DataProviderPlug::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

1 call to DataProviderPlug::getIndexIds()
DataProviderPlug::count in src/Plugin/resource/DataProvider/DataProviderPlug.php
Counts the total results for the index call.

File

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

Class

DataProviderPlug
Class DataProviderPlug.

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

public function getIndexIds() {

  // Return all of the instance IDs.
  $plugins = restful()
    ->getResourceManager()
    ->getPlugins();
  $output = $plugins
    ->getIterator()
    ->getArrayCopy();

  // Apply filters.
  $output = $this
    ->applyFilters($output);
  $output = $this
    ->applySort($output);
  return array_keys($output);
}