◆ __construct()
      
        
          | ilCalendarAppointmentColors::__construct  | 
          ( | 
            | 
          $a_user_id | ) | 
           | 
        
      
 
 
◆ _getColorsByType()
  
  
      
        
          | static ilCalendarAppointmentColors::_getColorsByType  | 
          ( | 
          string  | 
          $a_type | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ _getRandomColorByType()
  
  
      
        
          | static ilCalendarAppointmentColors::_getRandomColorByType  | 
          ( | 
          string  | 
          $a_type | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ getColorByAppointment()
      
        
          | ilCalendarAppointmentColors::getColorByAppointment  | 
          ( | 
            | 
          $a_cal_id | ) | 
           | 
        
      
 
get color by appointment  public 
- Parameters
 - 
  
    | int | calendar appointment id  | 
  
   
- Returns
 
Definition at line 114 of file class.ilCalendarAppointmentColors.php.
  116         $cat_id = $this->cat_app_ass[$a_cal_id];
   117         $cat_id = $this->cat_substitutions[$cat_id];
   119         if (isset($this->appointment_colors[$cat_id])) {
   120             return $this->appointment_colors[$cat_id];
   121         } elseif (isset($this->cat_substitutions_colors[$cat_id])) {
   122             return $this->cat_substitutions_colors[$cat_id];
  
 
 
◆ read()
  
  
      
        
          | ilCalendarAppointmentColors::read  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 128 of file class.ilCalendarAppointmentColors.php.
References $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by __construct().
  131         foreach ($this->categories->getCategoriesInfo() as $c_data) {
   132             if (isset($c_data[
'subitem_ids']) and count($c_data[
'subitem_ids'])) {
   133                 foreach ($c_data[
'subitem_ids'] as $sub_item_id) {
   134                     $this->cat_substitutions[$sub_item_id] = $c_data[
'cat_id'];
   137             $this->cat_substitutions[$c_data[
'cat_id']] = $c_data[
'cat_id'];
   139             $this->cat_substitutions_colors[$c_data[
'cat_id']] = $c_data[
'color'];
   142         $query = 
"SELECT cat.cat_id,cat.color, ass.cal_id  FROM cal_categories cat " .
   143             "JOIN cal_cat_assignments ass ON cat.cat_id = ass.cat_id " .
   144             "WHERE " . $this->db->in(
'cat.cat_id', $this->categories->getCategories(
true), 
false, 
'integer');
   146         $res = $this->db->query($query);
   148             $this->appointment_colors[$row->cat_id] = $row->color;
   149             $this->cat_app_ass[$row->cal_id] = $row->cat_id;
 
 
 
 
◆ $appointment_colors
  
  
      
        
          | array ilCalendarAppointmentColors::$appointment_colors = [] | 
         
       
   | 
  
private   | 
  
 
 
◆ $cat_app_ass
  
  
      
        
          | array ilCalendarAppointmentColors::$cat_app_ass = [] | 
         
       
   | 
  
private   | 
  
 
 
◆ $cat_substitutions
  
  
      
        
          | array ilCalendarAppointmentColors::$cat_substitutions = [] | 
         
       
   | 
  
private   | 
  
 
 
◆ $cat_substitutions_colors
  
  
      
        
          | array ilCalendarAppointmentColors::$cat_substitutions_colors = [] | 
         
       
   | 
  
private   | 
  
 
 
◆ $categories
◆ $colors
  
  
      
        
          | array ilCalendarAppointmentColors::$colors | 
         
       
   | 
  
staticprotected   | 
  
 
 
◆ $db
The documentation for this class was generated from the following file: