31 include_once
'class.ilMDBase.php';
38 $this->entity = $a_entity;
46 $this->date = $a_date;
54 $this->description = $a_desc;
58 return $this->description;
62 if (is_object($lng_obj)) {
63 $this->description_language = &$lng_obj;
68 return $this->description_language;
72 if (is_object($this->description_language)) {
73 return $this->description_language->getLanguageCode();
80 if ($this->db->autoExecute(
85 $this->
setMetaId($this->db->getLastInsertId());
97 if ($this->db->autoExecute(
101 "meta_annotation_id = " . $ilDB->quote($this->
getMetaId())
109 public function delete()
114 $query =
"DELETE FROM il_meta_annotation " .
115 "WHERE meta_annotation_id = " . $ilDB->quote($this->
getMetaId());
127 return array(
'rbac_id' => $this->
getRBACId(),
140 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
143 $query =
"SELECT * FROM il_meta_annotation " .
144 "WHERE meta_annotation_id = " . $ilDB->quote($this->
getMetaId());
154 $this->description_language =
new ilMDLanguageItem($row->description_language);
167 $writer->xmlStartTag(
'Annotation');
168 $writer->xmlElement(
'Entity', null, $this->
getEntity());
169 $writer->xmlElement(
'Date', null, $this->
getDate());
171 $writer->xmlEndTag(
'Annotation');
177 public function _getIds($a_rbac_id, $a_obj_id)
181 $query =
"SELECT meta_annotation_id FROM il_meta_annotation " .
182 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) .
" " .
183 "AND obj_id = " . $ilDB->quote($a_obj_id);
188 $ids[] = $row->meta_annotation_id;
190 return $ids ? $ids : array();
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
getDescriptionLanguageCode()
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_getIds($a_rbac_id, $a_obj_id)
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
setDescriptionLanguage($lng_obj)
& getDescriptionLanguage()