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,
'integer').
" ";
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,
'integer');
115 $query =
"SELECT title FROM object_data od ".
116 "JOIN container_reference cr ON target_obj_id = od.obj_id ".
117 "WHERE cr.obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
137 $query =
"SELECT * FROM container_reference ".
138 "WHERE target_obj_id = ".$ilDB->quote($a_target_id,
'integer').
" ";
168 $this->target_id = $a_target_id;
180 $this->target_ref_id = $a_id;
207 $query =
"SELECT * FROM container_reference ".
208 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
234 $query =
"DELETE FROM container_reference ".
235 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
236 $ilDB->manipulate(
$query);
238 $query =
"INSERT INTO container_reference (obj_id, target_obj_id) ".
240 $ilDB->quote($this->
getId(),
'integer').
", ".
243 $ilDB->manipulate(
$query);
253 public function delete()
257 if(!parent::delete())
262 $query =
"DELETE FROM container_reference ".
263 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
264 $ilDB->manipulate(
$query);
279 global
$ilDB,$ilUser;
283 $query =
"INSERT INTO container_reference (obj_id, target_obj_id) ".
285 $ilDB->quote($new_obj->getId(),
'integer').
", ".
286 $ilDB->quote($this->getTargetId(),
'integer').
" ".
288 $ilDB->manipulate(
$query);