class EntityOperationAlterEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/core_event_dispatcher/src/Event/Entity/EntityOperationAlterEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityOperationAlterEvent
Class EntityOperationAlterEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Entity\EntityOperationAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of EntityOperationAlterEvent
2 files declare their use of EntityOperationAlterEvent
- core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
- EntityOperationsTest.php in modules/
core_event_dispatcher/ tests/ src/ Unit/ Entity/ EntityOperationsTest.php
File
- modules/
core_event_dispatcher/ src/ Event/ Entity/ EntityOperationAlterEvent.php, line 13
Namespace
Drupal\core_event_dispatcher\Event\EntityView source
class EntityOperationAlterEvent extends Event implements EventInterface {
/**
* The operations.
*
* @var array
*/
private $operations;
/**
* The entity.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
private $entity;
/**
* EntityOperationAlterEvent constructor.
*
* @param array $operations
* The array of operations being altered.
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity.
*/
public function __construct(array &$operations, EntityInterface $entity) {
$this->operations =& $operations;
$this->entity = $entity;
}
/**
* Get the operations.
*
* Returned by reference to be modified.
*
* @return array
* The operations.
*/
public function &getOperations() : array {
return $this->operations;
}
/**
* Get the entity.
*
* @return \Drupal\Core\Entity\EntityInterface
* The entity.
*/
public function getEntity() : EntityInterface {
return $this->entity;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::ENTITY_OPERATION_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityOperationAlterEvent:: |
private | property | The entity. | |
EntityOperationAlterEvent:: |
private | property | The operations. | |
EntityOperationAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
EntityOperationAlterEvent:: |
public | function | Get the entity. | |
EntityOperationAlterEvent:: |
public | function | Get the operations. | |
EntityOperationAlterEvent:: |
public | function | EntityOperationAlterEvent constructor. |