32include_once
'class.ilMDBase.php';
39 $this->entity = $a_entity;
48 if($this->db->autoExecute(
'il_meta_entity',
52 $this->
setMetaId($this->db->getLastInsertId());
65 if($this->db->autoExecute(
'il_meta_entity',
68 "meta_entity_id = ".$ilDB->quote($this->getMetaId())))
82 $query =
"DELETE FROM il_meta_entity ".
83 "WHERE meta_entity_id = ".$ilDB->quote($this->
getMetaId());
95 return array(
'rbac_id' => $this->
getRBACId(),
109 $query =
"SELECT * FROM il_meta_entity ".
110 "WHERE meta_entity_id = ".$ilDB->quote($this->
getMetaId());
133 $writer->xmlElement(
'Entity',
null,$this->
getEntity());
138 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
142 $query =
"SELECT meta_entity_id FROM il_meta_entity ".
143 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id).
" ".
144 "AND obj_id = ".$ilDB->quote($a_obj_id).
" ".
145 "AND parent_id = ".$ilDB->quote($a_parent_id).
" ".
146 "AND parent_type = ".$ilDB->quote($a_parent_type);
151 $ids[] =
$row->meta_entity_id;
153 return $ids ? $ids : array();
An exception for terminatinating execution or to throw for unit testing.
const MDB2_AUTOQUERY_INSERT
const MDB2_AUTOQUERY_UPDATE
setMetaId($a_meta_id, $a_read_data=true)
setParentType($a_parent_type)
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled