EntityLoadEvent.php in Hook Event Dispatcher 8
File
src/Event/Entity/EntityLoadEvent.php
View source
<?php
namespace Drupal\hook_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 {
protected $entities;
protected $entityTypeId;
public function __construct(array $entities, $entityTypeId) {
$this->entities = $entities;
$this->entityTypeId = $entityTypeId;
}
public function getEntities() {
return $this->entities;
}
public function getEntityTypeId() {
return $this->entityTypeId;
}
public function getDispatcherType() {
return HookEventDispatcherInterface::ENTITY_LOAD;
}
}