31 include_once
'class.ilMDBase.php';
46 $this->catalog = $a_catalog;
50 return $this->catalog;
54 $this->entry = $a_entry;
67 $fields[
'meta_identifier_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_identifier'));
69 if($this->db->insert(
'il_meta_identifier',$fields))
83 if($this->db->update(
'il_meta_identifier',
85 array(
"meta_identifier_id" => array(
'integer',$this->
getMetaId()))))
99 $query =
"DELETE FROM il_meta_identifier ".
100 "WHERE meta_identifier_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
110 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
111 'obj_id' => array(
'integer',$this->
getObjId()),
112 'obj_type' => array(
'text',$this->
getObjType()),
114 'parent_id' => array(
'integer',$this->
getParentId()),
115 'catalog' => array(
'text',$this->
getCatalog()),
116 'entry' => array(
'text',$this->
getEntry()));
126 $query =
"SELECT * FROM il_meta_identifier ".
127 "WHERE meta_identifier_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
149 function toXML(&$writer, $a_overwrite_id =
false)
151 $entry_default = ($this->
getObjId() == 0)
152 ?
"il_".IL_INST_ID.
"_".$this->getObjType().
"_".$this->
getRBACId()
160 $entry = $entry_default;
166 $writer->xmlElement(
'Identifier',array(
'Catalog' => $catalog,
171 $writer->xmlElement(
'Identifier',array(
'Entry' => $entry));
177 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
181 $query =
"SELECT meta_identifier_id FROM il_meta_identifier ".
182 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
183 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
184 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
185 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
191 $ids[] =
$row->meta_identifier_id;
193 return $ids ? $ids : array();