32 include_once
'class.ilMDBase.php';
36 function ilMDEntity($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
46 $this->entity = $a_entity;
55 if($this->db->autoExecute(
'il_meta_entity',
59 $this->
setMetaId($this->db->getLastInsertId());
72 if($this->db->autoExecute(
'il_meta_entity',
75 "meta_entity_id = ".$ilDB->quote($this->
getMetaId())))
89 $query =
"DELETE FROM il_meta_entity ".
90 "WHERE meta_entity_id = ".$ilDB->quote($this->
getMetaId());
102 return array(
'rbac_id' => $this->
getRBACId(),
116 $query =
"SELECT * FROM il_meta_entity ".
117 "WHERE meta_entity_id = ".$ilDB->quote($this->
getMetaId());
140 $writer->xmlElement(
'Entity',null,$this->
getEntity());
145 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
149 $query =
"SELECT meta_entity_id FROM il_meta_entity ".
150 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id).
" ".
151 "AND obj_id = ".$ilDB->quote($a_obj_id).
" ".
152 "AND parent_id = ".$ilDB->quote($a_parent_id).
" ".
153 "AND parent_type = ".$ilDB->quote($a_parent_type);
158 $ids[] =
$row->meta_entity_id;
160 return $ids ? $ids : array();