You are here

protected function RestExport::getFormatOptions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::getFormatOptions()
  2. 10 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::getFormatOptions()

Returns an array of format options.

Return value

string[] An array of format options. Both key and value are the same.

1 call to RestExport::getFormatOptions()
RestExport::collectRoutes in core/modules/rest/src/Plugin/views/display/RestExport.php
Adds the route entry of a view to the collection.

File

core/modules/rest/src/Plugin/views/display/RestExport.php, line 517

Class

RestExport
The plugin that handles Data response callbacks for REST resources.

Namespace

Drupal\rest\Plugin\views\display

Code

protected function getFormatOptions() {
  $formats = array_keys($this->formatProviders);
  return array_combine($formats, $formats);
}