You are here

public function Paragraph::createDuplicate in Multiversion 8

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 Paragraph::createDuplicate

File

src/Entity/Paragraph.php, line 17

Class

Paragraph
Class Paragraph override Paragraph class.

Namespace

Drupal\multiversion\Entity

Code

public function createDuplicate() {
  $duplicate = parent::createDuplicate();
  $duplicate->_rev
    ->applyDefaultValue();
  return $duplicate;
}