32 include_once
'class.ilMDBase.php';
36 function ilMDFormat($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
46 $this->format = $a_format;
58 $fields[
'meta_format_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_format'));
60 if($this->db->insert(
'il_meta_format',$fields))
74 if($this->db->update(
'il_meta_format',
76 array(
"meta_format_id" => array(
'integer',$this->
getMetaId()))))
90 $query =
"DELETE FROM il_meta_format ".
91 "WHERE meta_format_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
102 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
103 'obj_id' => array(
'integer',$this->
getObjId()),
104 'obj_type' => array(
'text',$this->
getObjType()),
105 'format' => array(
'text',$this->
getFormat()));
112 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
116 $query =
"SELECT * FROM il_meta_format ".
117 "WHERE meta_format_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
140 $writer->xmlElement(
'Format',null,$this->
getFormat());
150 $query =
"SELECT meta_format_id FROM il_meta_format ".
151 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
152 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
157 $ids[] =
$row->meta_format_id;
159 return $ids ? $ids : array();