<?php

namespace domain\Ticket\TicketMessage\Event;

use domain\Ticket\Ticket\TicketModule;
use justcoded\yii2\eventlistener\observers\ActiveRecordObserver;
use yii\db\AfterSaveEvent;

class TicketMessageObserver extends ActiveRecordObserver
{
    public function inserted(AfterSaveEvent $event)
    {
        TicketModule::getInstance()->getNotifier()->sendEmailAdminNewTicketMessage($event->sender);
    }
}