<?php
namespace domain\Ticket\Ticket\Event;

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

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