/**
  * Билеты по определенной специальности и за определенный год
  *
  * @static
  * @param CTerm $year
  * @param CTerm $speciality
  * @return array
  */
 public static function getTicketsByYearAndSpecialityList(CTerm $year, CTerm $speciality)
 {
     $q = "speciality_id=" . $speciality->getId() . " AND year_id=" . $year->getId();
     if (!self::getCacheTickets()->hasElement($q)) {
         $arr = array();
         foreach (CActiveRecordProvider::getWithCondition(TABLE_SEB_TICKETS, $q)->getItems() as $ar) {
             $ticket = new CSEBTicket($ar);
             $arr[$ticket->getId()] = $ticket->getNumber();
             self::getCacheTickets()->add($ticket->getId(), $ticket);
         }
         self::getCacheTickets()->add($q, $arr);
     }
     return self::getCacheTickets()->getItem($q);
 }
 public function setTicket(CSEBTicket $ticket)
 {
     $this->_ticket = $ticket;
     $this->getRecord()->setItemValue("ticket_id", $ticket->getId());
 }