Ejemplo n.º 1
0
 /**
  *	Deletes ticket
  *
  *	@return		void
  */
 public function delete()
 {
     $this->_mapper->tree->removeNode($this);
     $this->state()->deleteStateHistory();
     $this->_mapper->deleteFromUnread($this);
     if ($this->level > 0 && !isNull($obRootTicket = $this->getRootOfBranch())) {
         $branch = $obRootTicket->getBranch();
         $obRootTicket->branch_count = count($branch);
         $obRootTicket->save();
     }
     return parent::delete();
 }
Ejemplo n.º 2
0
 /**
  * Deletes history of changes of ticket's state
  *
  * @param 	RM_Account_iUser	obUser		status changer
  * @return	void
  */
 public function deleteStateHistory()
 {
     $this->_mapper->deleteStateHistory($this->_ticket);
 }
Ejemplo n.º 3
0
 /**
  * Marks list of messages as read
  *
  * @param 	RM_Account_iUser		obUser		user object
  * @param 	array					arr			list of read tickets
  * @return	void
  */
 public function markAsReadList(RM_Account_iUser $obUser, $arr = array())
 {
     if ($arr) {
         $this->_mapper->markAsReadList($obUser, $arr);
     }
 }