function DisplayPluginBase::preview

Fully render the display for the purposes of a live preview or some other AJAXy reason.

3 methods override DisplayPluginBase::preview()
DisplayTest::preview in drupal/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTest.php
Overrides Drupal\views\Plugin\views\display\DisplayPluginBase::preview().
Feed::preview in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php
Overrides \Drupal\views\Plugin\views\display\PathPluginBase::preview().
RestExport::preview in drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php
The DisplayPluginBase preview method assumes we will be returning a render array. The data plugin will already return the serialized string.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 2570
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

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