84 $this->context_obj_id = $a_context_obj_id;
104 $this->context_obj_type = $a_context_obj_type;
124 $this->context_sub_obj_id = $a_context_sub_obj_id;
144 $this->context_sub_obj_type = $a_context_sub_obj_type;
164 $this->type = $a_type;
184 $this->title = $a_title;
205 $query =
"INSERT INTO il_custom_block (".
207 ", context_obj_type".
208 ", context_sub_obj_id".
209 ", context_sub_obj_type".
217 .
",".$ilDB->quote($this->
getType())
218 .
",".$ilDB->quote($this->
getTitle()).
")";
219 $ilDB->query($query);
220 $this->
setId($ilDB->getLastInsertId());
233 $query =
"SELECT * FROM il_custom_block WHERE id = ".
234 $ilDB->quote($this->
getId());
235 $set = $ilDB->query($query);
255 $query =
"UPDATE il_custom_block SET ".
260 ", type = ".$ilDB->quote($this->
getType()).
261 ", title = ".$ilDB->quote($this->
getTitle()).
262 " WHERE id = ".$ilDB->quote($this->
getId());
264 $ilDB->query($query);
272 public function delete()
276 $query =
"DELETE FROM il_custom_block".
277 " WHERE id = ".$ilDB->quote($this->
getId());
279 $ilDB->query($query);
291 $query =
"SELECT id, context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, type, title ".
292 "FROM il_custom_block ".
299 $set = $ilDB->query($query);
318 $query =
"SELECT id, context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, type, title ".
319 "FROM il_custom_block ".
326 $set = $ilDB->query($query);
345 $query =
"SELECT id ".
346 "FROM il_custom_block ".
349 $set = $ilDB->query($query);
368 $query =
"SELECT count(*) as cnt ".
369 "FROM il_custom_block ".
375 " AND type = ".$ilDB->quote($this->
getType()).
"";
377 $set = $ilDB->query($query);