public function ViewExecutable::__construct

Constructs a new ViewExecutable object.

Parameters

\Drupal\views\ViewStorageInterface $storage: The view config entity the actual information is stored on.

File

drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php, line 421
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 __construct(ViewStorageInterface $storage) {

  // Reference the storage and the executable to each other.
  $this->storage = $storage;
  $this->storage
    ->set('executable', $this);

  // Add the default css for a view.
  $this->element['#attached']['library'][] = array(
    'views',
    'views.module',
  );
}