3 declare(strict_types=1);
39 $this->description = $a_description;
49 $this->description_language = $lng_obj;
54 return is_object($this->description_language) ? $this->description_language : null;
59 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
'';
65 $fields[
'meta_description_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_description'));
67 if ($this->db->insert(
'il_meta_description', $fields)) {
76 return $this->
getMetaId() && $this->db->update(
77 'il_meta_description',
79 array(
"meta_description_id" => array(
'integer', $this->
getMetaId()))
83 public function delete():
bool 86 $query =
"DELETE FROM il_meta_description " .
87 "WHERE meta_description_id = " . $this->db->quote($this->
getMetaId(),
'integer');
101 'rbac_id' => array(
'integer', $this->
getRBACId()),
102 'obj_id' => array(
'integer', $this->
getObjId()),
103 'obj_type' => array(
'text', $this->
getObjType()),
105 'parent_id' => array(
'integer', $this->
getParentId()),
114 $query =
"SELECT * FROM il_meta_description " .
115 "WHERE meta_description_id = " . $this->db->quote($this->
getMetaId(),
'integer');
120 $this->
setObjId((
int) $row->obj_id);
147 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
151 $ilDB = $DIC->database();
153 $query =
"SELECT meta_description_id FROM il_meta_description " .
158 "ORDER BY meta_description_id";
163 $ids[] = (
int) $row->meta_description_id;
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)
setDescriptionLanguage(ilMDLanguageItem $lng_obj)
toXML(ilXmlWriter $writer)
ilMDLanguageItem $description_language
setDescription(string $a_description)
getDescriptionLanguageCode()
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)