function DisplayPluginBase::preview

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

2 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().

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 2566
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() {
  $element = $this->view
    ->render();
  return drupal_render($element);
}