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)
119 $hidden = array_merge((array)
$hidden,(array) $info[
'subitem_ids'],array($cat_id));
122 return array_diff((array) $categories,
$hidden);
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;