public ConfigEntityBase::createDuplicate()
Creates a duplicate of the entity.
static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.
Overrides Entity::createDuplicate
public function createDuplicate() { $duplicate = parent::createDuplicate(); // Prevent the new duplicate from being misinterpreted as a rename. $duplicate->setOriginalId(NULL); return $duplicate; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityBase.php/function/ConfigEntityBase::createDuplicate/8.1.x