52 $this->user_id = $a_user_id;
66 if(isset(self::$instances[$a_user_id]))
68 return self::$instances[$a_user_id];
84 $query =
"DELETE FROM cal_categories_hidden ".
85 "WHERE cat_id = ".$ilDB->quote($a_cat_id ,
'integer').
" ";
101 $query =
"DELETE FROM cal_categories_hidden ".
102 "WHERE user_id = ".$ilDB->quote($a_user_id ,
'integer').
" ";
115 foreach($category_info as $cat_id =>
$info)
132 return in_array($a_cat_id, $this->hidden);
144 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
148 if(in_array($cat_id,$this->hidden))
164 return $this->hidden ? $this->hidden :
array();
178 $this->hidden = $a_hidden;
193 foreach($this->hidden as
$hidden)
195 $query =
"INSERT INTO cal_categories_hidden (user_id,cat_id) ".
197 $this->db->quote($this->user_id ,
'integer').
", ".
198 $this->db->quote($hidden ,
'integer').
" ".
212 public function delete($a_cat_id = null)
218 $query =
"DELETE FROM cal_categories_hidden ".
219 "WHERE user_id = ".$this->db->quote($this->user_id ,
'integer').
" ".
220 "AND cat_id = ".$this->db->quote($a_cat_id ,
'integer').
" ";
224 $query =
"DELETE FROM cal_categories_hidden ".
225 "WHERE user_id = ".$this->db->quote($this->user_id ,
'integer').
" ";
241 $query =
"SELECT * FROM cal_categories_hidden ".
242 "WHERE user_id = ".$this->db->quote($this->user_id ,
'integer').
" ";
246 $this->hidden[] =
$row->cat_id;
hideSelected($a_hidden)
hide selected
filterHidden($categories, $category_info)
Filter hidden categories (and hidden subitem categories) from category array.
save()
save hidden selection
getHidden()
get hidden categories
static _lookupCategories($a_cal_id)
lookup categories
static _deleteCategories($a_cat_id)
delete by category
isHidden($a_cat_id)
Check if category is hidden.
static _getInstanceByUserId($a_user_id)
get instance by user id
static _deleteUser($a_user_id)
Delete by user.
isAppointmentVisible($a_cal_id)
check whether an appoinment is visible or not
Create styles array
The data for the language used.
__construct($a_user_id)
Singleton constructor.
read()
read user selection
Stores selection of hidden calendars for a specific user.