public function ViewExecutable::__construct

Constructs a new ViewExecutable object.

Parameters

Drupal\views\Plugin\Core\Entity\View $storage: The view config entity the actual information is stored on.

File

drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php, line 424
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(View $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']['css'][] = drupal_get_path('module', 'views') . '/css/views.base.css';
}