public function RestExport::execute

Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::execute().

Overrides PathPluginBase::execute

File

drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php, line 227
Contains \Drupal\rest\Plugin\views\display\RestExport.

Class

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

Namespace

Drupal\rest\Plugin\views\display

Code

public function execute() {
  parent::execute();
  $output = $this->view
    ->render();
  return new Response(drupal_render($output), 200, array(
    'Content-type' => $this
      ->getMimeType(),
  ));
}