public function ViewUI::addDisplay in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::addDisplay()
- 9 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::addDisplay()
Adds a new display handler to the view, automatically creating an ID.
Parameters
string $plugin_id: (optional) The plugin type from the Views plugin annotation. Defaults to 'page'.
string $title: (optional) The title of the display. Defaults to NULL.
string $id: (optional) The ID to use, e.g., 'default', 'page_1', 'block_2'. Defaults to NULL.
Return value
string|bool The key to the display in $view->display, or FALSE if no plugin ID was provided.
Overrides ViewEntityInterface::addDisplay
File
- core/
modules/ views_ui/ src/ ViewUI.php, line 1239
Class
- ViewUI
- Stores UI related temporary settings.
Namespace
Drupal\views_uiCode
public function addDisplay($plugin_id = 'page', $title = NULL, $id = NULL) {
return $this->storage
->addDisplay($plugin_id, $title, $id);
}