3 declare(strict_types=1);
34 $this->format = $a_format;
45 $fields[
'meta_format_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_format'));
47 if ($this->db->insert(
'il_meta_format', $fields)) {
56 return $this->
getMetaId() && $this->db->update(
59 array(
"meta_format_id" => array(
'integer', $this->
getMetaId()))
63 public function delete():
bool 66 $query =
"DELETE FROM il_meta_format " .
67 "WHERE meta_format_id = " . $this->db->quote($this->
getMetaId(),
'integer');
81 'rbac_id' => array(
'integer', $this->
getRBACId()),
82 'obj_id' => array(
'integer', $this->
getObjId()),
83 'obj_type' => array(
'text', $this->
getObjType()),
84 'format' => array(
'text', $this->
getFormat())
88 public function read(): bool
91 $query =
"SELECT * FROM il_meta_format " .
92 "WHERE meta_format_id = " . $this->db->quote($this->
getMetaId(),
'integer');
117 public static function _getIds(
int $a_rbac_id,
int $a_obj_id): array
121 $ilDB = $DIC->database();
123 $query =
"SELECT meta_format_id FROM il_meta_format " .
124 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
125 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer');
130 $ids[] = (
int) $row->meta_format_id;
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)