EntityOperationAlterEvent.php in Hook Event Dispatcher 3.x
File
modules/core_event_dispatcher/src/Event/Entity/EntityOperationAlterEvent.php
View source
<?php
namespace Drupal\core_event_dispatcher\Event\Entity;
use Drupal\Core\Entity\EntityInterface;
use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;
class EntityOperationAlterEvent extends Event implements EventInterface {
private $operations;
private $entity;
public function __construct(array &$operations, EntityInterface $entity) {
$this->operations =& $operations;
$this->entity = $entity;
}
public function &getOperations() : array {
return $this->operations;
}
public function getEntity() : EntityInterface {
return $this->entity;
}
public function getDispatcherType() : string {
return HookEventDispatcherInterface::ENTITY_OPERATION_ALTER;
}
}