3 declare(strict_types=1);
36 $this->entity = $a_entity;
44 public function setDate(
string $a_date): void
46 $this->date = $a_date;
56 $this->description = $a_desc;
66 $this->description_language = $lng_obj;
76 if (is_object($this->description_language)) {
77 return $this->description_language->getLanguageCode();
85 $fields[
'meta_annotation_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_annotation'));
87 if ($this->db->insert(
'il_meta_annotation', $fields)) {
96 return $this->
getMetaId() && $this->db->update(
99 array(
"meta_annotation_id" => array(
'integer', $this->
getMetaId()))
103 public function delete():
bool 106 $query =
"DELETE FROM il_meta_annotation " .
107 "WHERE meta_annotation_id = " . $this->db->quote($this->
getMetaId(),
'integer');
121 'rbac_id' => array(
'integer', $this->
getRBACId()),
122 'obj_id' => array(
'integer', $this->
getObjId()),
123 'obj_type' => array(
'text', $this->
getObjType()),
124 'entity' => array(
'clob', $this->
getEntity()),
125 'a_date' => array(
'clob', $this->
getDate()),
134 $query =
"SELECT * FROM il_meta_annotation " .
135 "WHERE meta_annotation_id = " . $this->db->quote($this->
getMetaId(),
'integer');
140 $this->
setObjId((
int) $row->obj_id);
143 $this->
setDate($row->a_date ??
'');
145 $this->description_language =
new ilMDLanguageItem($row->description_language ??
'');
171 public static function _getIds(
int $a_rbac_id,
int $a_obj_id): array
175 $ilDB = $DIC[
'ilDB'];
177 $query =
"SELECT meta_annotation_id FROM il_meta_annotation " .
178 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
179 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer');
184 $ids[] = (
int) $row->meta_annotation_id;
static _getIds(int $a_rbac_id, int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilMDLanguageItem $description_language
setEntity(string $a_entity)
xmlEndTag(string $tag)
Writes an endtag.
getDescriptionLanguageCode()
toXML(ilXmlWriter $writer)
setDescription(string $a_desc)
setDescriptionLanguage(ilMDLanguageItem $lng_obj)
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
setMetaId(int $a_meta_id, bool $a_read_data=true)
setObjType(string $a_type)