public function DisplayBag::__construct

Constructs a DisplayBag object.

Parameters

\Drupal\views\ViewExecutable: The view which has this displays attached.

\Drupal\Component\Plugin\PluginManagerInterface $manager: The manager to be used for instantiating plugins.

File

drupal/core/modules/views/lib/Drupal/views/DisplayBag.php, line 41
Contains \Drupal\views\DisplayBag.

Class

DisplayBag
A class which wraps the displays of a view so you can lazy-initialize them.

Namespace

Drupal\views

Code

public function __construct(ViewExecutable $view, PluginManagerInterface $manager) {
  $this->view = $view;
  $this->manager = $manager;
  $this
    ->initializePlugin('default');

  // Store all display IDs to access them easy and fast.
  $display = $this->view->storage
    ->get('display');
  $this->instanceIDs = drupal_map_assoc(array_keys($display));
}