You are here

public function EntityEvent::__construct in Entity Events 2.0.x

Same name and namespace in other branches
  1. 8 src/Event/EntityEvent.php \Drupal\entity_events\Event\EntityEvent::__construct()

Construct a new entity event.

Parameters

string $event_type: The event type.

\Drupal\Core\Entity\EntityInterface $entity: The entity which caused the event.

File

src/Event/EntityEvent.php, line 35

Class

EntityEvent
Class to contain an entity event.

Namespace

Drupal\entity_events\Event

Code

public function __construct($event_type, EntityInterface $entity) {
  $this->entity = $entity;
  $this->eventType = $event_type;
}