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').
" ";
114 foreach($category_info as $cat_id => $info)
118 $hidden = array_merge((array)
$hidden,(array) $info[
'subitem_ids'],array($cat_id));
121 return (array) array_diff((array) $categories, (array)
$hidden);
131 return in_array($a_cat_id, $this->hidden);
143 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
147 if(in_array($cat_id,$this->hidden))
163 return $this->hidden ? $this->hidden : array();
177 $this->hidden = $a_hidden;
192 foreach($this->hidden as
$hidden)
194 $query =
"INSERT INTO cal_categories_hidden (user_id,cat_id) ".
196 $this->db->quote($this->user_id ,
'integer').
", ".
197 $this->db->quote($hidden ,
'integer').
" ".
211 public function delete($a_cat_id = null)
217 $query =
"DELETE FROM cal_categories_hidden ".
218 "WHERE user_id = ".$this->db->quote($this->user_id ,
'integer').
" ".
219 "AND cat_id = ".$this->db->quote($a_cat_id ,
'integer').
" ";
223 $query =
"DELETE FROM cal_categories_hidden ".
224 "WHERE user_id = ".$this->db->quote($this->user_id ,
'integer').
" ";
240 $query =
"SELECT * FROM cal_categories_hidden ".
241 "WHERE user_id = ".$this->db->quote($this->user_id ,
'integer').
" ";
245 $this->hidden[] =
$row->cat_id;