You are here

public function DisplayPluginBase::preExecute in Views (for Drupal 7) 8.3

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

lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 2512
Definition of 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;
  }
}