Static Protected Attributes |
static | $colors |
Private Member Functions |
| read () |
| read
|
Detailed Description
Constructor & Destructor Documentation
ilCalendarAppointmentColors::__construct |
( |
|
$a_user_id | ) |
|
Member Function Documentation
static ilCalendarAppointmentColors::_getColorsByType |
( |
|
$a_type | ) |
|
|
static |
static ilCalendarAppointmentColors::_getRandomColorByType |
( |
|
$a_type | ) |
|
|
static |
static ilCalendarAppointmentColors::dumpColors |
( |
| ) |
|
|
static |
public
- Parameters
-
Definition at line 170 of file class.ilCalendarAppointmentColors.php.
{
foreach(self::$colors['grp'] as $color)
{
echo '<font color="'.$color.'">HALLO</font><br/>';
}
foreach(self::$colors['crs'] as $color)
{
echo '<font color="'.$color.'">HALLO</font><br/>';
}
}
ilCalendarAppointmentColors::getColorByAppointment |
( |
|
$a_cal_id | ) |
|
get color by appointment
public
- Parameters
-
int | calendar appointment id |
- Returns
Definition at line 104 of file class.ilCalendarAppointmentColors.php.
{
$cat_id = $this->cat_app_ass[$a_cal_id];
$cat_id = $this->cat_substitutions[$cat_id];
return isset($this->appointment_colors[$cat_id]) ? $this->appointment_colors[$cat_id] : 'red';
}
ilCalendarAppointmentColors::read |
( |
| ) |
|
|
private |
read
private
- Parameters
-
Definition at line 119 of file class.ilCalendarAppointmentColors.php.
References $query, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by __construct().
{
global $ilDB;
foreach($this->categories->getCategoriesInfo() as $c_data)
{
if(isset($c_data['subitem_ids']) and count($c_data['subitem_ids']))
{
foreach($c_data['subitem_ids'] as $sub_item_id)
{
$this->cat_substitutions[$sub_item_id] = $c_data['cat_id'];
}
}
$this->cat_substitutions[$c_data['cat_id']] = $c_data['cat_id'];
}
$query =
"SELECT cat.cat_id,cat.color, ass.cal_id FROM cal_categories cat ".
"JOIN cal_cat_assignments ass ON cat.cat_id = ass.cat_id ".
"WHERE ".$ilDB->in('cat.cat_id',$this->categories->getCategories(true),false,'integer');
{
$this->appointment_colors[
$row->cat_id] =
$row->color;
$this->cat_app_ass[
$row->cal_id] =
$row->cat_id;
}
}
Field Documentation
ilCalendarAppointmentColors::$appointment_colors |
|
protected |
ilCalendarAppointmentColors::$colors |
|
staticprotected |
ilCalendarAppointmentColors::$db |
|
protected |
ilCalendarAppointmentColors::$user_id |
|
protected |
The documentation for this class was generated from the following file: