public function ConfigPages::createDuplicate in Config Pages 8
Same name and namespace in other branches
- 8.3 src/Entity/ConfigPages.php \Drupal\config_pages\Entity\ConfigPages::createDuplicate()
- 8.2 src/Entity/ConfigPages.php \Drupal\config_pages\Entity\ConfigPages::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 ContentEntityBase::createDuplicate
File
- src/
Entity/ ConfigPages.php, line 71
Class
- ConfigPages
- Defines the config page entity class.
Namespace
Drupal\config_pages\EntityCode
public function createDuplicate() {
$duplicate = parent::createDuplicate();
$duplicate->revision_id->value = NULL;
$duplicate->id->value = NULL;
return $duplicate;
}