You are here

public function ViewEntityInterface::duplicateDisplayAsType in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/ViewEntityInterface.php \Drupal\views\ViewEntityInterface::duplicateDisplayAsType()
  2. 10 core/modules/views/src/ViewEntityInterface.php \Drupal\views\ViewEntityInterface::duplicateDisplayAsType()

Duplicates an existing display into a new display type.

For example clone to display a page display as a block display.

Parameters

string $old_display_id: The origin of the duplicated display.

string $new_display_type: The display type of the new display.

Return value

string The display ID of the new display.

2 methods override ViewEntityInterface::duplicateDisplayAsType()
View::duplicateDisplayAsType in core/modules/views/src/Entity/View.php
Duplicates an existing display into a new display type.
ViewUI::duplicateDisplayAsType in core/modules/views_ui/src/ViewUI.php
Duplicates an existing display into a new display type.

File

core/modules/views/src/ViewEntityInterface.php, line 49

Class

ViewEntityInterface
Defines an interface for View storage classes.

Namespace

Drupal\views

Code

public function duplicateDisplayAsType($old_display_id, $new_display_type);