19 declare(strict_types=1);
35 $this->catalog = $a_catalog;
43 public function setEntry(
string $a_entry): void
45 $this->entry = $a_entry;
56 $fields[
'meta_identifier__id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_identifier_'));
58 if ($this->db->insert(
'il_meta_identifier_', $fields)) {
67 return $this->
getMetaId() && $this->db->update(
68 'il_meta_identifier_',
70 array(
"meta_identifier__id" => array(
'integer', $this->
getMetaId()))
74 public function delete():
bool 77 $query =
"DELETE FROM il_meta_identifier_ " .
78 "WHERE meta_identifier__id = " . $this->db->quote($this->
getMetaId(),
'integer');
79 $res = $this->db->manipulate($query);
91 'rbac_id' => array(
'integer', $this->
getRBACId()),
92 'obj_id' => array(
'integer', $this->
getObjId()),
93 'obj_type' => array(
'text', $this->
getObjType()),
95 'parent_id' => array(
'integer', $this->
getParentId()),
96 'catalog' => array(
'text', $this->
getCatalog()),
97 'entry' => array(
'text', $this->
getEntry())
104 $query =
"SELECT * FROM il_meta_identifier_ " .
105 "WHERE meta_identifier__id = " . $this->db->quote($this->
getMetaId(),
'integer');
107 $res = $this->db->query($query);
110 $this->
setObjId((
int) $row->obj_id);
125 'Entry' => $this->
getEntry() ?:
"ID1" 134 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
138 $ilDB = $DIC->database();
140 $query =
"SELECT meta_identifier__id FROM il_meta_identifier_ " .
141 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
142 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
143 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
144 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
149 $ids[] = (
int) $row->meta_identifier__id;
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
toXML(ilXmlWriter $writer)
setEntry(string $a_entry)
setCatalog(string $a_catalog)
setParentType(string $a_parent_type)
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)