You are here

public function EntityDuplicateEvent::__construct in Entity API 8

Constructs a new EntityDuplicateEvent object.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity.

\Drupal\Core\Entity\EntityInterface $source_entity: The source entity.

File

src/Event/EntityDuplicateEvent.php, line 37

Class

EntityDuplicateEvent
Defines the entity duplicate event.

Namespace

Drupal\entity\Event

Code

public function __construct(EntityInterface $entity, EntityInterface $source_entity) {
  $this->entity = $entity;
  $this->sourceEntity = $source_entity;
}