View::createDuplicate

public 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 132

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function createDuplicate() {
  $duplicate = parent::createDuplicate();
  unset($duplicate->executable);
  return $duplicate;
}
doc_Drupal
2016-10-29 09:53:39
Comments
Leave a Comment

Please login to continue.