getCalendar() public method

Get correct Calendar: Entity or Sla
Since: 0.90.4
public getCalendar ( )
Esempio n. 1
0
 /**
  * Get correct Calendar: Entity or Sla
  *
  * @since 0.90.4
  *
  **/
 function getCalendar()
 {
     if (isset($this->fields['slts_ttr_id']) && $this->fields['slts_ttr_id'] > 0) {
         $sla = new SLA();
         if ($sla->getFromDB($this->fields['slts_ttr_id'])) {
             // not -1: calendar of the entity
             if ($sla->getField('calendars_id') >= 0) {
                 return $sla->getField('calendars_id');
             }
         }
     }
     return parent::getCalendar();
 }