31include_once
'class.ilMDBase.php';
38 $this->location = $a_location;
46 $this->location_type = $a_location_type;
50 return $this->location_type;
58 $fields[
'meta_location_id'] = array(
'integer',$next_id =
$ilDB->nextId(
'il_meta_location'));
60 if($this->db->insert(
'il_meta_location',$fields))
74 if($this->db->update(
'il_meta_location',
76 array(
"meta_location_id" => array(
'integer',$this->
getMetaId()))))
90 $query =
"DELETE FROM il_meta_location ".
91 "WHERE meta_location_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
102 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
103 'obj_id' => array(
'integer',$this->
getObjId()),
104 'obj_type' => array(
'text',$this->
getObjType()),
106 'parent_id' => array(
'integer',$this->
getParentId()),
115 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
119 $query =
"SELECT * FROM il_meta_location ".
120 "WHERE meta_location_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
144 $writer->xmlElement(
'Location',array(
'Type' => $this->
getLocationType()
152 static function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
156 $query =
"SELECT meta_location_id FROM il_meta_location ".
157 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
158 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
159 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
160 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
165 $ids[] =
$row->meta_location_id;
167 return $ids ? $ids : array();
An exception for terminatinating execution or to throw for unit testing.
setMetaId($a_meta_id, $a_read_data=true)
setParentType($a_parent_type)
setLocationType($a_location_type)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)