31 include_once
'class.ilMDBase.php';
35 function ilMDLocation($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
45 $this->location = $a_location;
53 $this->location_type = $a_location_type;
57 return $this->location_type;
65 $fields[
'meta_location_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_location'));
67 if($this->db->insert(
'il_meta_location',$fields))
81 if($this->db->update(
'il_meta_location',
83 array(
"meta_location_id" => array(
'integer',$this->
getMetaId()))))
97 $query =
"DELETE FROM il_meta_location ".
98 "WHERE meta_location_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
109 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
110 'obj_id' => array(
'integer',$this->
getObjId()),
111 'obj_type' => array(
'text',$this->
getObjType()),
113 'parent_id' => array(
'integer',$this->
getParentId()),
122 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
126 $query =
"SELECT * FROM il_meta_location ".
127 "WHERE meta_location_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
151 $writer->xmlElement(
'Location',array(
'Type' => $this->
getLocationType()
159 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
163 $query =
"SELECT meta_location_id FROM il_meta_location ".
164 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
165 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
166 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
167 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
172 $ids[] =
$row->meta_location_id;
174 return $ids ? $ids : array();