function ConfigEntityBase::createDuplicate
Same name in other branches
- 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::createDuplicate()
- 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::createDuplicate()
- 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::createDuplicate()
Overrides EntityBase::createDuplicate
3 calls to ConfigEntityBase::createDuplicate()
- Block::createDuplicateBlock in core/
modules/ block/ src/ Entity/ Block.php - EntityDisplayBase::createCopy in core/
lib/ Drupal/ Core/ Entity/ EntityDisplayBase.php - View::createDuplicate in core/
modules/ views/ src/ Entity/ View.php
1 method overrides ConfigEntityBase::createDuplicate()
- View::createDuplicate in core/
modules/ views/ src/ Entity/ View.php
File
-
core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php, line 224
Class
- ConfigEntityBase
- Defines a base configuration entity class.
Namespace
Drupal\Core\Config\EntityCode
public function createDuplicate() {
$duplicate = parent::createDuplicate();
// Prevent the new duplicate from being misinterpreted as a rename.
$duplicate->setOriginalId(NULL);
return $duplicate;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.