public function Feed::preview in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/display/Feed.php \Drupal\views\Plugin\views\display\Feed::preview()
Renders the display for the purposes of a live preview.
Also might be used for some other AJAXy reason.
Overrides DisplayPluginBase::preview
File
- core/
modules/ views/ src/ Plugin/ views/ display/ Feed.php, line 94 - Contains \Drupal\views\Plugin\views\display\Feed.
Class
- Feed
- The plugin that handles a feed, such as RSS or atom.
Namespace
Drupal\views\Plugin\views\displayCode
public function preview() {
$output = $this->view
->render();
if (!empty($this->view->live_preview)) {
$output = array(
'#prefix' => '<pre>',
'#plain_text' => drupal_render_root($output),
'#suffix' => '</pre>',
);
}
return $output;
}