You are here

public function DisplayPluginBase::preExecute in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::preExecute()

Sets 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.

Overrides DisplayPluginInterface::preExecute

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2251
Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function preExecute() {
  $this->view
    ->setAjaxEnabled($this
    ->ajaxEnabled());
  if ($this
    ->isMoreEnabled() && !$this
    ->useMoreAlways()) {
    $this->view->get_total_rows = TRUE;
  }
  $this->view
    ->initHandlers();
  if ($this
    ->usesExposed()) {
    $exposed_form = $this
      ->getPlugin('exposed_form');
    $exposed_form
      ->preExecute();
  }
  foreach ($this->extenders as $extender) {
    $extender
      ->preExecute();
  }
}