Same name in other branches
- 2.x src/EntityClone/Content/UserEntityClone.php \Drupal\entity_clone\EntityClone\Content\UserEntityClone::cloneEntity()
Overrides ContentEntityCloneBase::cloneEntity
Fichier
-
src/
EntityClone/ Content/ UserEntityClone.php, line 15
Classe
- UserEntityClone
- Class ContentEntityCloneBase.
Namespace
Drupal\entity_clone\EntityClone\ContentCode
public function cloneEntity(EntityInterface $entity, EntityInterface $cloned_entity, array $properties = [], array &$already_cloned = []) {
/** @var \Drupal\user\UserInterface $cloned_entity */
$cloned_entity->set('name', $cloned_entity->getAccountName() . '_cloned');
return parent::cloneEntity($entity, $cloned_entity, $properties);
}