31include_once
'class.ilMDBase.php';
38 $this->description = $a_description;
42 return $this->description;
46 if (is_object($lng_obj)) {
47 $this->description_language = $lng_obj;
52 return is_object($this->description_language) ? $this->description_language :
false;
56 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false;
66 $fields[
'meta_description_id'] = array(
'integer',$next_id =
$ilDB->nextId(
'il_meta_description'));
68 if ($this->db->insert(
'il_meta_description', $fields)) {
82 if ($this->db->update(
83 'il_meta_description',
85 array(
"meta_description_id" => array(
'integer',$this->
getMetaId()))
93 public function delete()
100 $query =
"DELETE FROM il_meta_description " .
101 "WHERE meta_description_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
112 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
113 'obj_id' => array(
'integer',$this->
getObjId()),
114 'obj_type' => array(
'text',$this->
getObjType()),
116 'parent_id' => array(
'integer',$this->
getParentId()),
127 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
130 $query =
"SELECT * FROM il_meta_description " .
131 "WHERE meta_description_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
165 public static function _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
171 $query =
"SELECT meta_description_id FROM il_meta_description " .
172 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id) .
" " .
173 "AND obj_id = " .
$ilDB->quote($a_obj_id) .
" " .
174 "AND parent_id = " .
$ilDB->quote($a_parent_id) .
" " .
175 "AND parent_type = " .
$ilDB->quote($a_parent_type) .
" " .
176 "ORDER BY meta_description_id";
180 $ids[] = $row->meta_description_id;
182 return $ids ? $ids : array();
An exception for terminatinating execution or to throw for unit testing.
setMetaId($a_meta_id, $a_read_data=true)
setParentType($a_parent_type)
& getDescriptionLanguage()
setDescriptionLanguage(&$lng_obj)
setDescription($a_description)
getDescriptionLanguageCode()
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
foreach($_POST as $key=> $value) $res