abstract class BaseEntityEvent in Hook Event Dispatcher 8
Class BaseEntityEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Entity\BaseEntityEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of BaseEntityEvent
File
- src/
Event/ Entity/ BaseEntityEvent.php, line 12
Namespace
Drupal\hook_event_dispatcher\Event\EntityView source
abstract class BaseEntityEvent extends Event implements EventInterface {
/**
* The Entity.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
protected $entity;
/**
* BaseEntityEvent constructor.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The Entity.
*/
public function __construct(EntityInterface $entity) {
$this->entity = $entity;
}
/**
* Get the Entity.
*
* @return \Drupal\Core\Entity\EntityInterface
* The Entity.
*/
public function getEntity() {
return $this->entity;
}
/**
* Set the Entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The Entity.
*
* @deprecated This is not needed, objects are past by reference.
*/
public function setEntity(EntityInterface $entity) {
$this->entity = $entity;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseEntityEvent:: |
protected | property | The Entity. | |
BaseEntityEvent:: |
public | function | Get the Entity. | |
BaseEntityEvent:: |
public | function | Set the Entity. | |
BaseEntityEvent:: |
public | function | BaseEntityEvent constructor. | 4 |
EventInterface:: |
public | function | Get the dispatcher type. | 66 |