public function DisplayPluginBase::preExecute

Set up any variables on the view prior to execution. These are separated from execute because they are extremely common and unlikely to be overridden on an individual display.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 2534
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

public function preExecute() {
  $this->view
    ->setUseAJAX($this
    ->isAJAXEnabled());
  if ($this
    ->usesMore() && !$this
    ->useMoreAlways()) {
    $this->view->get_total_rows = TRUE;
  }
  $this->view
    ->initHandlers();
  if ($this
    ->usesExposed()) {
    $exposed_form = $this
      ->getPlugin('exposed_form');
    $exposed_form
      ->pre_execute();
  }
  foreach ($this->extender as $extender) {
    $extender
      ->pre_execute();
  }
  if ($this
    ->getOption('hide_admin_links')) {
    $this->view->hide_admin_links = TRUE;
  }
}