You are here

public function RestExport::preview 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::preview()
  2. 10 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::preview()

The DisplayPluginBase preview method assumes we will be returning a render array. The data plugin will already return the serialized string.

Overrides DisplayPluginBase::preview

File

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

Class

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

Namespace

Drupal\rest\Plugin\views\display

Code

public function preview() {
  return $this->view
    ->render();
}