public function ViewExecutable::initDisplay

Set the display for this view and initialize the display handler.

7 calls to ViewExecutable::initDisplay()
ViewExecutable::access in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Determine if the given user has access to the view. Note that this sets the display handler if it hasn't been.
ViewExecutable::buildTitle in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Force the view to build a title.
ViewExecutable::chooseDisplay in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Get the first display that is accessible to the user.
ViewExecutable::initHandlers in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Acquire and attach all of the handlers.
ViewExecutable::mergeDefaults in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Merges all plugin default values for each display.

... See full list

File

drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php, line 598
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 initDisplay() {
  if (isset($this->current_display)) {
    return TRUE;
  }

  // Initialize the display cache array.
  $this->displayHandlers = new DisplayBag($this, Views::pluginManager('display'));
  $this->current_display = 'default';
  $this->display_handler = $this->displayHandlers
    ->get('default');
  return TRUE;
}