You are here

public function Feed::preview in Views (for Drupal 7) 8.3

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

Overrides DisplayPluginBase::preview

File

lib/Drupal/views/Plugin/views/display/Feed.php, line 79
Definition of Drupal\views\Plugin\views\display\Feed.

Class

Feed
The plugin that handles a feed, such as RSS or atom.

Namespace

Drupal\views\Plugin\views\display

Code

public function preview() {
  if (!empty($this->view->live_preview)) {
    return '<pre>' . check_plain($this->view
      ->render()) . '</pre>';
  }
  return $this->view
    ->render();
}