You are here

public function EntityOperationEvent::addOperation in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/src/Event/Entity/EntityOperationEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityOperationEvent::addOperation()

Add an operation.

Parameters

string $name: Operation name.

array $operation: Operation definition.

File

modules/core_event_dispatcher/src/Event/Entity/EntityOperationEvent.php, line 77

Class

EntityOperationEvent
Class EntityLoadEvent.

Namespace

Drupal\core_event_dispatcher\Event\Entity

Code

public function addOperation(string $name, array $operation) : void {
  $this->operations[$name] = $operation;
}