30 include_once
'class.ilMDBase.php';
38 $this->catalog = $a_catalog;
42 return $this->catalog;
46 $this->entry = $a_entry;
59 $fields[
'meta_identifier_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_identifier'));
61 if($this->db->insert(
'il_meta_identifier',$fields))
75 if($this->db->update(
'il_meta_identifier',
91 $query =
"DELETE FROM il_meta_identifier ".
92 "WHERE meta_identifier_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
118 $query =
"SELECT * FROM il_meta_identifier ".
119 "WHERE meta_identifier_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
141 function toXML(&$writer, $a_overwrite_id =
false)
143 $entry_default = ($this->
getObjId() == 0)
144 ?
"il_".IL_INST_ID.
"_".$this->getObjType().
"_".$this->
getRBACId()
152 $entry = $entry_default;
158 $writer->xmlElement(
'Identifier',
array(
'Catalog' => $catalog,
163 $writer->xmlElement(
'Identifier',
array(
'Entry' => $entry));
169 public static function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
173 $query =
"SELECT meta_identifier_id FROM il_meta_identifier ".
174 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
175 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
176 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
177 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
182 $ids[] =
$row->meta_identifier_id;
184 return $ids ? $ids :
array();
197 $query =
"SELECT meta_identifier_id, catalog, entry FROM il_meta_identifier ".
198 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
199 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
200 "AND obj_type = ".$ilDB->quote($a_obj_type ,
'text');
204 while(
$r = $ilDB->fetchAssoc(
$res))
206 $entries[
$r[
"meta_identifier_id"]] =
207 array(
"catalog" => $r[
"catalog"],
208 "entry" => $r[
"entry"]);
223 $query =
"SELECT meta_identifier_id, catalog, entry, obj_id FROM il_meta_identifier ".
224 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer');
226 if ($a_obj_type !=
"")
229 " AND obj_type = ".$ilDB->quote($a_obj_type ,
'text');
234 while(
$r = $ilDB->fetchAssoc(
$res))
236 $entries[
$r[
"meta_identifier_id"]] =
237 array(
"catalog" => $r[
"catalog"],
238 "entry" => $r[
"entry"],
239 "obj_id" => $r[
"obj_id"]);
254 $query =
"SELECT meta_identifier_id, obj_id FROM il_meta_identifier ".
255 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
256 " AND obj_type = ".$ilDB->quote($a_obj_type ,
'text').
257 " AND catalog = ".$ilDB->quote($a_catalog ,
'text').
258 " AND entry = ".$ilDB->quote($a_entry ,
'text');
259 $s = $ilDB->query(
$query);
260 if (
$r = $ilDB->fetchAssoc($s))
273 static public function readIdData($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
277 $query =
"SELECT * FROM il_meta_identifier ".
278 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
279 " AND obj_type = ".$ilDB->quote($a_obj_type ,
'text').
280 " AND catalog = ".$ilDB->quote($a_catalog ,
'text').
281 " AND entry = ".$ilDB->quote($a_entry ,
'text');
282 $s = $ilDB->query(
$query);
284 while (
$r = $ilDB->fetchAssoc($s))
toXML(&$writer, $a_overwrite_id=false)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static existsIdInRbacObject($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
Does id entry exist in rbac object?
setMetaId($a_meta_id, $a_read_data=true)
static _getEntriesForObj($a_rbac_id, $a_obj_id, $a_obj_type)
Get IDs for an object.
Create styles array
The data for the language used.
static readIdData($a_rbac_id, $a_obj_type, $a_catalog, $a_entry)
Does id entry exist in rbac object?
setParentType($a_parent_type)
static _getEntriesForRbacObj($a_rbac_id, $a_obj_type="")
Get IDs for an rbac object.