3 declare(strict_types=1);
34 $ilDB = $DIC->database();
37 $query =
"SELECT language FROM il_meta_language " .
38 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
39 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
40 "AND obj_type = " .
$ilDB->quote($a_obj_type,
'text') .
" " .
41 "AND parent_type = 'meta_general' " .
42 "ORDER BY meta_language_id ";
43 $ilDB->setLimit(1, 0);
46 $lang = $row->language;
70 $fields[
'meta_language_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_language'));
71 if ($this->db->insert(
'il_meta_language', $fields)) {
80 return $this->
getMetaId() && $this->db->update(
83 array(
"meta_language_id" => array(
'integer', $this->
getMetaId()))
87 public function delete():
bool 90 $query =
"DELETE FROM il_meta_language " .
91 "WHERE meta_language_id = " . $this->db->quote($this->
getMetaId(),
'integer');
105 'rbac_id' => array(
'integer', $this->
getRBACId()),
106 'obj_id' => array(
'integer', $this->
getObjId()),
107 'obj_type' => array(
'text', $this->
getObjType()),
109 'parent_id' => array(
'integer', $this->
getParentId()),
117 $query =
"SELECT * FROM il_meta_language " .
118 "WHERE meta_language_id = " . $this->db->quote($this->
getMetaId(),
'integer');
123 $this->
setObjId((
int) $row->obj_id);
149 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
153 $ilDB = $DIC->database();
155 $query =
"SELECT meta_language_id FROM il_meta_language " .
156 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
157 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
158 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
159 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
164 $ids[] = (
int) $row->meta_language_id;
static _lookupFirstLanguage(int $a_rbac_id, int $a_obj_id, string $a_obj_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLanguage(ilMDLanguageItem $lng_obj)
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
toXML(ilXmlWriter $writer)
setParentType(string $a_parent_type)
ilMDLanguageItem $language
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)