You are here

public function ViewExecutable::unserialize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::unserialize()

File

core/modules/views/src/ViewExecutable.php, line 2357
Contains \Drupal\views\ViewExecutable.

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function unserialize($serialized) {
  list($storage, $current_display, $args, $current_page, $exposed_input, $exposed_raw_input, $exposed_data, $dom_id, $executed) = unserialize($serialized);
  $this
    ->setRequest(\Drupal::request());
  $this->user = \Drupal::currentUser();
  $this->storage = \Drupal::entityManager()
    ->getStorage('view')
    ->load($storage);
  $this
    ->setDisplay($current_display);
  $this
    ->setArguments($args);
  $this
    ->setCurrentPage($current_page);
  $this
    ->setExposedInput($exposed_input);
  $this->exposed_data = $exposed_data;
  $this->exposed_raw_input = $exposed_raw_input;
  $this->dom_id = $dom_id;
  $this
    ->initHandlers();

  // If the display was previously executed, execute it now.
  if ($executed) {
    $this
      ->execute($this->current_display);
  }
}