SLT::setTicketCalendar PHP Method

setTicketCalendar() public method

Define calendar of the ticket using the SLT when using this calendar as slt-s calendar
public setTicketCalendar ( $calendars_id )
$calendars_id calendars_id of the ticket
    function setTicketCalendar($calendars_id)
    {
        if ($this->fields['calendars_id'] == -1) {
            $this->fields['calendars_id'] = $calendars_id;
        }
    }

Usage Example

Example #1
0
 /**
  * Manage SLT level escalation
  *
  * @since version 9.1
  *
  * @param $slts_id
  **/
 function manageSltLevel($slts_id)
 {
     $calendars_id = Entity::getUsedConfig('calendars_id', $this->fields['entities_id']);
     // Add first level in working table
     $slalevels_id = SlaLevel::getFirstSltLevel($slts_id);
     $slt = new SLT();
     if ($slt->getFromDB($slts_id)) {
         $slt->setTicketCalendar($calendars_id);
         $slt->addLevelToDo($this, $slalevels_id);
     }
     SlaLevel_Ticket::replayForTicket($this->getID(), $slt->getField('type'));
 }
All Usage Examples Of SLT::setTicketCalendar