19 declare(strict_types=1);
35 $this->format = $a_format;
46 $fields[
'meta_format_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_format'));
48 if ($this->db->insert(
'il_meta_format', $fields)) {
57 return $this->
getMetaId() && $this->db->update(
60 array(
"meta_format_id" => array(
'integer', $this->
getMetaId()))
64 public function delete():
bool 67 $query =
"DELETE FROM il_meta_format " .
68 "WHERE meta_format_id = " . $this->db->quote($this->
getMetaId(),
'integer');
69 $res = $this->db->manipulate($query);
82 'rbac_id' => array(
'integer', $this->
getRBACId()),
83 'obj_id' => array(
'integer', $this->
getObjId()),
84 'obj_type' => array(
'text', $this->
getObjType()),
85 'format' => array(
'text', $this->
getFormat())
89 public function read(): bool
92 $query =
"SELECT * FROM il_meta_format " .
93 "WHERE meta_format_id = " . $this->db->quote($this->
getMetaId(),
'integer');
95 $res = $this->db->query($query);
118 public static function _getIds(
int $a_rbac_id,
int $a_obj_id): array
122 $ilDB = $DIC->database();
124 $query =
"SELECT meta_format_id FROM il_meta_format " .
125 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
126 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer');
131 $ids[] = (
int) $row->meta_format_id;
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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)