Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DisplayPluginBase.php

function DisplayPluginBase::preview

Overrides DisplayPluginInterface::preview

2 methods override DisplayPluginBase::preview()
Feed::preview in core/modules/views/src/Plugin/views/display/Feed.php
Renders the display for the purposes of a live preview.
RestExport::preview in core/modules/rest/src/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

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2492

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal