public function EntityEvent::__construct in Entity Events 8
Same name and namespace in other branches
- 2.0.x 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 36
Class
- EntityEvent
- Class to contain an entity event.
Namespace
Drupal\entity_events\EventCode
public function __construct($event_type, EntityInterface $entity) {
$this->entity = $entity;
$this->eventType = $event_type;
}