src/Entity/Entity.php
protected function triggerEvent($event, array $event_parameters = [])
    {
        if (isset($this->event_handlers[$event])) {
            foreach ($this->event_handlers[$event] as $handler) {
                call_user_func_array($handler, $event_parameters);
            }
        }
    }
protected function triggerEvent($event, array $event_parameters = [])
    {
        if (isset($this->event_handlers[$event])) {
            foreach ($this->event_handlers[$event] as $handler) {
                call_user_func_array($handler, $event_parameters);
            }
        }
    }
Trigger an internal event.

@param string $event
@param array  $event_parameters