3 declare(strict_types=1);
34 $this->location = $a_location;
44 $this->location_type = $a_location_type;
55 $fields[
'meta_location_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_location'));
57 if ($this->db->insert(
'il_meta_location', $fields)) {
66 return $this->
getMetaId() && $this->db->update(
69 array(
"meta_location_id" => array(
'integer', $this->
getMetaId()))
73 public function delete():
bool 76 $query =
"DELETE FROM il_meta_location " .
77 "WHERE meta_location_id = " . $this->db->quote($this->
getMetaId(),
'integer');
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()),
104 $query =
"SELECT * FROM il_meta_location " .
105 "WHERE meta_location_id = " . $this->db->quote($this->
getMetaId(),
'integer');
110 $this->
setObjId((
int) $row->obj_id);
137 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
141 $ilDB = $DIC->database();
143 $query =
"SELECT meta_location_id FROM il_meta_location " .
144 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
145 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
146 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
147 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
152 $ids[] = (
int) $row->meta_location_id;
setLocationType(string $a_location_type)
toXML(ilXmlWriter $writer)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
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)
setLocation(string $a_location)