53 $this->user_id = $a_user_id;
67 if(isset(self::$instances[$a_user_id]))
69 return self::$instances[$a_user_id];
85 $query =
"DELETE FROM cal_categories_hidden ".
86 "WHERE cat_id = ".$ilDB->quote($a_cat_id).
" ";
102 $query =
"DELETE FROM cal_categories_hidden ".
103 "WHERE user_id = ".$ilDB->quote($a_user_id).
" ";
104 $ilDB->query($query);
115 foreach($category_info as $cat_id => $info)
119 $hidden = array_merge((array)
$hidden,(array) $info[
'subitem_ids'],array($cat_id));
122 return (array) array_diff((array) $categories, (array)
$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;
191 foreach($this->hidden as
$hidden)
193 $query =
"INSERT INTO cal_categories_hidden ".
194 "SET user_id = ".$this->db->quote($this->user_id).
", ".
195 "cat_id = ".$this->db->quote($hidden).
" ";
196 $this->db->query($query);
208 public function delete($a_cat_id = null)
212 $query =
"DELETE FROM cal_categories_hidden ".
213 "WHERE user_id = ".$this->db->quote($this->user_id).
" ".
214 "AND cat_id = ".$this->db->quote($a_cat_id).
" ";
218 $query =
"DELETE FROM cal_categories_hidden ".
219 "WHERE user_id = ".$this->db->quote($this->user_id).
" ";
221 $this->db->query($query);
233 $query =
"SELECT * FROM cal_categories_hidden ".
234 "WHERE user_id = ".$this->db->quote($this->user_id).
" ";
235 $res = $this->db->query($query);
238 $this->hidden[] = $row->cat_id;