64 $this->context_obj_id = $a_context_obj_id;
84 $this->context_obj_type = $a_context_obj_type;
104 $this->context_sub_obj_id = $a_context_sub_obj_id;
124 $this->context_sub_obj_type = $a_context_sub_obj_type;
144 $this->type = $a_type;
164 $this->title = $a_title;
185 $this->
setId($ilDB->nextId(
"il_custom_block"));
186 $query =
"INSERT INTO il_custom_block (".
189 ", context_obj_type".
190 ", context_sub_obj_id".
191 ", context_sub_obj_type".
195 $ilDB->quote($this->
getId(),
"integer")
200 .
",".$ilDB->quote($this->
getType(),
"text")
201 .
",".$ilDB->quote($this->
getTitle(),
"text").
")";
202 $ilDB->manipulate($query);
213 $query =
"SELECT * FROM il_custom_block WHERE id = ".
214 $ilDB->quote($this->
getId(),
"integer");
215 $set = $ilDB->query(
$query);
216 $rec = $ilDB->fetchAssoc($set);
235 $query =
"UPDATE il_custom_block SET ".
236 " context_obj_id = ".$ilDB->quote($this->
getContextObjId(),
"integer").
240 ", type = ".$ilDB->quote($this->
getType(),
"text").
241 ", title = ".$ilDB->quote($this->
getTitle(),
"text").
242 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
244 $ilDB->manipulate(
$query);
252 public function delete()
256 $query =
"DELETE FROM il_custom_block".
257 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
259 $ilDB->manipulate(
$query);
271 $query =
"SELECT id, context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, type, title ".
272 "FROM il_custom_block ".
280 $set = $ilDB->query(
$query);
282 while($rec = $ilDB->fetchAssoc($set))
299 $query =
"SELECT id, context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, type, title ".
300 "FROM il_custom_block ".
308 $set = $ilDB->query(
$query);
310 while($rec = $ilDB->fetchAssoc($set))
326 die(
"ilCustomBlock::queryTitleForId is deprecated");
351 $query =
"SELECT count(*) as cnt ".
352 "FROM il_custom_block ".
358 " AND type = ".$ilDB->quote($this->
getType(),
"text").
"";
360 $set = $ilDB->query(
$query);
362 while($rec = $ilDB->fetchAssoc($set))