EntityLoadEvent.php in Hook Event Dispatcher 3.x
File
modules/core_event_dispatcher/src/Event/Entity/EntityLoadEvent.php
View source
<?php
namespace Drupal\core_event_dispatcher\Event\Entity;
use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;
class EntityLoadEvent extends Event implements EventInterface {
private $entities;
private $entityTypeId;
public function __construct(array $entities, $entityTypeId) {
$this->entities = $entities;
$this->entityTypeId = $entityTypeId;
}
public function getEntities() : array {
return $this->entities;
}
public function getEntityTypeId() : string {
return $this->entityTypeId;
}
public function getDispatcherType() : string {
return HookEventDispatcherInterface::ENTITY_LOAD;
}
}