49 public function __construct($a_id = 0,$a_call_by_reference =
true)
53 parent::__construct($a_id,$a_call_by_reference);
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);
338 $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
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);
getTitleType()
get title type
getTargetId()
get target id
Class ilObject Basic functions for all objects.
getPresentationTitle()
Get presentation title.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
const DB_FETCHMODE_OBJECT
setTitleType($type)
Set title type.
static _lookupTitle($a_obj_id)
Overwitten from base class.
getId()
get object id public
getTargetRefId()
get Target ref_id
getTitle()
get object title public
static _lookupTargetTitle($a_obj_id)
Lookup target title.
setTargetRefId($a_id)
set target ref_id
setTargetId($a_target_id)
set target id
static _lookupSourceId($a_target_id)
lookup source id
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
static _lookupTargetId($a_obj_id)
lookup target id
__construct($a_id=0, $a_call_by_reference=true)
Constructor.
cloneObject($a_target_id, $a_copy_id=0)
Clone course reference.