45 public function __construct($a_id = 0,$a_call_by_reference =
true)
64 $query =
"SELECT * FROM container_reference ".
65 "WHERE obj_id = ".$ilDB->quote($a_obj_id).
" ";
66 $res = $ilDB->query($query);
69 return $row->target_obj_id;
84 $query =
"SELECT ref_id FROM object_reference obr ".
85 "JOIN container_reference cr ON obr.obj_id = cr.target_obj_id ".
86 "WHERE cr.obj_id = ".$ilDB->quote($a_obj_id);
87 $res = $ilDB->query($query);
105 $query =
"SELECT title FROM object_data od ".
106 "JOIN container_reference cr ON target_obj_id = od.obj_id ".
107 "WHERE cr.obj_id = ".$ilDB->quote($a_obj_id);
108 $res = $ilDB->query($query);
127 $query =
"SELECT * FROM container_reference ".
128 "WHERE target_obj_id = ".$ilDB->quote($a_target_id).
" ";
129 $res = $ilDB->query($query);
158 $this->target_id = $a_target_id;
170 $this->target_ref_id = $a_id;
197 $query =
"SELECT * FROM container_reference ".
198 "WHERE obj_id = ".$ilDB->quote($this->
getId()).
" ";
199 $res = $ilDB->query($query);
224 $query =
"DELETE FROM container_reference ".
225 "WHERE obj_id = ".$ilDB->quote($this->
getId()).
" ";
226 $ilDB->query($query);
228 $query =
"INSERT INTO container_reference ".
229 "SET obj_id = ".$ilDB->quote($this->
getId()).
", ".
230 "target_obj_id = ".$ilDB->quote($this->
getTargetId()).
" ";
231 $ilDB->query($query);
241 public function delete()
245 if(!parent::delete())
250 $query =
"DELETE FROM container_reference ".
251 "WHERE obj_id = ".$ilDB->quote($this->
getId()).
" ";
252 $ilDB->query($query);
267 global $ilDB,$ilUser;
271 $query =
"INSERT INTO container_reference ".
272 "SET obj_id = ".$ilDB->quote($new_obj->getId()).
", ".
273 "target_obj_id = ".$ilDB->quote($this->getTargetId()).
" ";
274 $ilDB->query($query);