function ViewExecutable::initDisplay
Same name and namespace in other branches
- 11.x 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.
File
-
core/
modules/ views/ src/ ViewExecutable.php, line 727
Class
- ViewExecutable
- Represents a view as a whole.
Namespace
Drupal\viewsCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.