You are here

public function View::createDuplicate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::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 ConfigEntityBase::createDuplicate

File

core/modules/views/src/Entity/View.php, line 137
Contains \Drupal\views\Entity\View.

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function createDuplicate() {
  $duplicate = parent::createDuplicate();
  unset($duplicate->executable);
  return $duplicate;
}