public function ViewExecutable::postExecute

Unset the current view, mostly.

2 calls to ViewExecutable::postExecute()
ViewExecutable::executeDisplay in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Execute the given display, with the given arguments. To be called externally by whatever mechanism invokes the view, such as a page callback, hook_block, etc.
ViewExecutable::preview in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Preview the given display, with the given arguments.

File

drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php, line 1405
Definition of Drupal\views\ViewExecutable.

Class

ViewExecutable
An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.

Namespace

Drupal\views

Code

public function postExecute() {

  // unset current view so we can be properly destructed later on.
  // Return the previous value in case we're an attachment.
  if ($this->old_view) {
    $old_view = array_pop($this->old_view);
  }
  views_set_current_view(isset($old_view) ? $old_view : FALSE);
}