You are here

public function ViewExecutable::initDisplay in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::initDisplay()

Sets the display for this view and initializes the display handler.

Return value

true Always returns TRUE.

12 calls to ViewExecutable::initDisplay()
ViewExecutable::access in core/modules/views/src/ViewExecutable.php
Determines if the given user has access to the view.
ViewExecutable::buildTitle in core/modules/views/src/ViewExecutable.php
Forces the view to build a title.
ViewExecutable::chooseDisplay in core/modules/views/src/ViewExecutable.php
Gets the first display that is accessible to the user.
ViewExecutable::getCacheTags in core/modules/views/src/ViewExecutable.php
Gets the cache tags associated with the executed view.
ViewExecutable::getDisplay in core/modules/views/src/ViewExecutable.php
Gets the current display plugin.

... See full list

File

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

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function initDisplay() {
  if (isset($this->current_display)) {
    return TRUE;
  }

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