class EntityLoadEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/core_event_dispatcher/src/Event/Entity/EntityLoadEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityLoadEvent
Class EntityLoadEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Entity\EntityLoadEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of EntityLoadEvent
1 file declares its use of EntityLoadEvent
- core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
File
- modules/
core_event_dispatcher/ src/ Event/ Entity/ EntityLoadEvent.php, line 12
Namespace
Drupal\core_event_dispatcher\Event\EntityView source
class EntityLoadEvent extends Event implements EventInterface {
/**
* The entities.
*
* @var array
*/
private $entities;
/**
* The entity type id.
*
* @var string
*/
private $entityTypeId;
/**
* EntityLoadEvent constructor.
*
* @param array $entities
* The entities.
* @param string $entityTypeId
* The entity type id.
*/
public function __construct(array $entities, $entityTypeId) {
$this->entities = $entities;
$this->entityTypeId = $entityTypeId;
}
/**
* Get the entities.
*
* @return array
* The entities.
*/
public function getEntities() : array {
return $this->entities;
}
/**
* Get the entity type id.
*
* @return string
* The entity type id.
*/
public function getEntityTypeId() : string {
return $this->entityTypeId;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::ENTITY_LOAD;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityLoadEvent:: |
private | property | The entities. | |
EntityLoadEvent:: |
private | property | The entity type id. | |
EntityLoadEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
EntityLoadEvent:: |
public | function | Get the entities. | |
EntityLoadEvent:: |
public | function | Get the entity type id. | |
EntityLoadEvent:: |
public | function | EntityLoadEvent constructor. |