You are here

public function ViewUI::createDuplicate in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::createDuplicate()
  2. 9 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::createDuplicate()

Creates a duplicate of the entity.

Return value

static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.

Overrides EntityInterface::createDuplicate

File

core/modules/views_ui/src/ViewUI.php, line 955

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function createDuplicate() {
  return $this->storage
    ->createDuplicate();
}