You are here

public function EntityOperationEvent::addOperation in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x 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;
}