Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ViewExecutable.php

function ViewExecutable::__sleep

Magic method implementation to serialize the view executable.

Return value

array The names of all variables that should be serialized.

File

core/modules/views/src/ViewExecutable.php, line 2539

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function __sleep() : array {
    // Limit to only the required data which is needed to properly restore the
    // state during unserialization.
    $this->serializationData = [
        'storage' => $this->storage
            ->id(),
        'current_display' => $this->current_display,
        'args' => $this->args,
        'current_page' => $this->current_page,
        'exposed_input' => $this->exposed_input,
        'exposed_raw_input' => $this->exposed_raw_input,
        'exposed_data' => $this->exposed_data,
        'dom_id' => $this->dom_id,
        'executed' => $this->executed,
    ];
    return [
        'serializationData',
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal