Same name in other branches
- 2.x src/Event/EntityCloneEvent.php \Drupal\entity_clone\Event\EntityCloneEvent
Represents entity selection as event.
Hierarchy
- class \Drupal\entity_clone\Event\EntityCloneEvent extends \Drupal\Component\EventDispatcher\Event
Expanded class hierarchy of EntityCloneEvent
2 files declare their use of EntityCloneEvent
- EntityCloneForm.php dans src/
Form/ EntityCloneForm.php - entity_clone.api.php dans ./
entity_clone.api.php - Hooks provided by the entity_clone module.
Fichier
-
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
Titre Trier par ordre décroissant | Modifiers | Object type | Résumé |
---|---|---|---|
EntityCloneEvent::$clonedEntity | protected | property | New cloned entity. |
EntityCloneEvent::$entity | protected | property | Entity being cloned. |
EntityCloneEvent::$properties | protected | property | Properties. |
EntityCloneEvent::getClonedEntity | public | function | Gets new cloned entity. |
EntityCloneEvent::getEntity | public | function | Gets entity being cloned. |
EntityCloneEvent::getProperties | public | function | Gets entity properties. |
EntityCloneEvent::__construct | public | function | Constructs an EntityCloneEvent object. |