32include_once
'class.ilMDBase.php';
39 $this->format = $a_format;
51 $fields[
'meta_format_id'] = array(
'integer',$next_id =
$ilDB->nextId(
'il_meta_format'));
53 if($this->db->insert(
'il_meta_format',$fields))
67 if($this->db->update(
'il_meta_format',
69 array(
"meta_format_id" => array(
'integer',$this->
getMetaId()))))
83 $query =
"DELETE FROM il_meta_format ".
84 "WHERE meta_format_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
95 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
96 'obj_id' => array(
'integer',$this->
getObjId()),
97 'obj_type' => array(
'text',$this->
getObjType()),
98 'format' => array(
'text',$this->
getFormat()));
105 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
109 $query =
"SELECT * FROM il_meta_format ".
110 "WHERE meta_format_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
133 $writer->xmlElement(
'Format',
null,$this->
getFormat());
143 $query =
"SELECT meta_format_id FROM il_meta_format ".
144 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
145 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
150 $ids[] =
$row->meta_format_id;
152 return $ids ? $ids : array();
An exception for terminatinating execution or to throw for unit testing.
setMetaId($a_meta_id, $a_read_data=true)