49 public function __construct($a_id = 0,$a_call_by_reference =
true)
68 $query =
"SELECT * FROM container_reference ".
69 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
'integer').
" ";
73 return $row->target_obj_id;
88 $query =
"SELECT ref_id FROM object_reference obr ".
89 "JOIN container_reference cr ON obr.obj_id = cr.target_obj_id ".
90 "WHERE cr.obj_id = ".$ilDB->quote($a_obj_id,
'integer');
108 $query =
'SELECT title,title_type FROM container_reference cr '.
109 'JOIN object_data od ON cr.obj_id = od.obj_id '.
110 'WHERE cr.obj_id = '.$ilDB->quote($a_obj_id,
'integer');
132 $query =
"SELECT title FROM object_data od ".
133 "JOIN container_reference cr ON target_obj_id = od.obj_id ".
134 "WHERE cr.obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
154 $query =
"SELECT * FROM container_reference ".
155 "WHERE target_obj_id = ".$ilDB->quote($a_target_id,
'integer').
" ";
185 $this->target_id = $a_target_id;
197 $this->target_ref_id = $a_id;
227 $this->title_type =
$type;
242 $query =
"SELECT * FROM container_reference ".
243 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
256 #$this->title = $this->lng->txt('reference_of').' '.ilObject::_lookupTitle($this->getTargetId());
273 return $this->lng->txt(
'reference_of').
' '.$this->
getTitle();
290 $query =
"DELETE FROM container_reference ".
291 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
292 $ilDB->manipulate(
$query);
294 $query =
"INSERT INTO container_reference (obj_id, target_obj_id, title_type) ".
296 $ilDB->quote($this->
getId(),
'integer').
", ".
300 $ilDB->manipulate(
$query);
310 public function delete()
314 if(!parent::delete())
319 $query =
"DELETE FROM container_reference ".
320 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
321 $ilDB->manipulate(
$query);
340 $query =
"INSERT INTO container_reference (obj_id, target_obj_id, title_type) ".
342 $ilDB->quote($new_obj->getId(),
'integer').
", ".
343 $ilDB->quote($this->getTargetId(),
'integer').
", ".
344 $ilDB->quote($this->getTitleType(),
'integer').
' '.
346 $ilDB->manipulate(
$query);