class EntityCloneEvent in Entity Clone 8
Represents entity selection as event.
Hierarchy
- class \Drupal\entity_clone\Event\EntityCloneEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of EntityCloneEvent
1 file declares its use of EntityCloneEvent
- EntityCloneForm.php in src/
Form/ EntityCloneForm.php
File
- src/
Event/ EntityCloneEvent.php, line 11
Namespace
Drupal\entity_clone\EventView source
class EntityCloneEvent extends Event {
/**
* Entity being cloned.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
protected $entity;
/**
* New cloned entity.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
protected $clonedEntity;
/**
* Properties.
*
* @var array
*/
protected $properties;
/**
* Constructs an EntityCloneEvent object.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The original entity that was cloned.
* @param \Drupal\Core\Entity\EntityInterface $cloned_entity
* The clone of the original entity.
* @param array $properties
* The entity's properties.
*/
public function __construct(EntityInterface $entity, EntityInterface $cloned_entity, array $properties = []) {
$this->entity = $entity;
$this->clonedEntity = $cloned_entity;
$this->properties = $properties;
}
/**
* Gets entity being cloned.
*
* @return \Drupal\Core\Entity\EntityInterface
* The original entity.
*/
public function getEntity() {
return $this->entity;
}
/**
* Gets new cloned entity.
*
* @return \Drupal\Core\Entity\EntityInterface
* The cloned entity.
*/
public function getClonedEntity() {
return $this->clonedEntity;
}
/**
* Gets entity properties.
*
* @return array
* The list of properties.
*/
public function getProperties() {
return $this->properties;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityCloneEvent:: |
protected | property | New cloned entity. | |
EntityCloneEvent:: |
protected | property | Entity being cloned. | |
EntityCloneEvent:: |
protected | property | Properties. | |
EntityCloneEvent:: |
public | function | Gets new cloned entity. | |
EntityCloneEvent:: |
public | function | Gets entity being cloned. | |
EntityCloneEvent:: |
public | function | Gets entity properties. | |
EntityCloneEvent:: |
public | function | Constructs an EntityCloneEvent object. |