◆ __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 108 of file class.ilCalendarAppointmentColors.php.
110 $cat_id = $this->cat_app_ass[$a_cal_id];
111 $cat_id = $this->cat_substitutions[$cat_id];
113 if (isset($this->appointment_colors[$cat_id])) {
114 return $this->appointment_colors[$cat_id];
115 } elseif (isset($this->cat_substitutions_colors[$cat_id])) {
116 return $this->cat_substitutions_colors[$cat_id];
◆ read()
ilCalendarAppointmentColors::read |
( |
| ) |
|
|
private |
Definition at line 122 of file class.ilCalendarAppointmentColors.php.
References $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by __construct().
125 foreach ($this->categories->getCategoriesInfo() as $c_data) {
126 if (isset($c_data[
'subitem_ids']) and count($c_data[
'subitem_ids'])) {
127 foreach ($c_data[
'subitem_ids'] as $sub_item_id) {
128 $this->cat_substitutions[$sub_item_id] = $c_data[
'cat_id'];
131 $this->cat_substitutions[$c_data[
'cat_id']] = $c_data[
'cat_id'];
133 $this->cat_substitutions_colors[$c_data[
'cat_id']] = $c_data[
'color'];
136 $query =
"SELECT cat.cat_id,cat.color, ass.cal_id FROM cal_categories cat " .
137 "JOIN cal_cat_assignments ass ON cat.cat_id = ass.cat_id " .
138 "WHERE " . $this->db->in(
'cat.cat_id', $this->categories->getCategories(
true),
false,
'integer');
140 $res = $this->db->query($query);
142 $this->appointment_colors[$row->cat_id] = $row->color;
143 $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: