19 declare(strict_types=1);
35 $this->description = $a_description;
45 $this->description_language = $lng_obj;
50 return is_object($this->description_language) ? $this->description_language :
null;
55 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
'';
61 $fields[
'meta_description_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_description'));
63 if ($this->db->insert(
'il_meta_description', $fields)) {
72 return $this->
getMetaId() && $this->db->update(
73 'il_meta_description',
75 array(
"meta_description_id" => array(
'integer', $this->
getMetaId()))
79 public function delete():
bool 82 $query =
"DELETE FROM il_meta_description " .
83 "WHERE meta_description_id = " . $this->db->quote($this->
getMetaId(),
'integer');
84 $res = $this->db->manipulate($query);
97 'rbac_id' => array(
'integer', $this->
getRBACId()),
98 'obj_id' => array(
'integer', $this->
getObjId()),
99 'obj_type' => array(
'text', $this->
getObjType()),
101 'parent_id' => array(
'integer', $this->
getParentId()),
110 $query =
"SELECT * FROM il_meta_description " .
111 "WHERE meta_description_id = " . $this->db->quote($this->
getMetaId(),
'integer');
113 $res = $this->db->query($query);
116 $this->
setObjId((
int) $row->obj_id);
143 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
147 $ilDB = $DIC->database();
149 $query =
"SELECT meta_description_id FROM il_meta_description " .
154 "ORDER BY meta_description_id";
159 $ids[] = (
int) $row->meta_description_id;
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)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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)