You are here

public function EntityDuplicateFormTrait::setSourceEntity in Entity API 8

File

src/Form/EntityDuplicateFormTrait.php, line 34

Class

EntityDuplicateFormTrait
Allows forms to implement EntityDuplicateFormInterface.

Namespace

Drupal\entity\Form

Code

public function setSourceEntity(EntityInterface $source_entity) {
  $this->sourceEntity = $source_entity;
  return $this;
}