예제 #1
0
 /**
  * @return bool
  */
 public function afterSave()
 {
     $this->object->clearTicketCache();
     /* @var TicketThread $thread */
     if ($thread = $this->object->getOne('Thread')) {
         $thread->updateLastComment();
     }
     $this->modx->cacheManager->delete('tickets/latest.comments');
     $this->modx->cacheManager->delete('tickets/latest.tickets');
     return parent::afterSave();
 }
예제 #2
0
 /**
  *
  */
 protected function sendCommentMails()
 {
     /** @var TicketThread $thread */
     if ($thread = $this->object->getOne('Thread')) {
         /** @var Tickets $Tickets */
         if ($Tickets = $this->modx->getService('Tickets')) {
             $Tickets->config = $thread->get('properties');
             $Tickets->sendCommentMails($this->object->toArray());
         }
     }
 }