public function RestExport::render

Render this display.

Overrides DisplayPluginBase::render

File

drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php, line 237
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 render() {
  $build = array();
  $build['#markup'] = $this->view->style_plugin
    ->render();

  // Wrap the output in a pre tag if this is for a live preview.
  if (!empty($this->view->live_preview)) {
    $build['#prefix'] = '<pre>';
    $build['#markup'] = check_plain($build['#markup']);
    $build['#suffix'] = '</pre>';
  }
  return $build;
}