31 include_once
'class.ilMDBase.php';
45 $this->description = $a_description;
49 return $this->description;
53 if(is_object($lng_obj))
55 $this->description_language = $lng_obj;
60 return is_object($this->description_language) ? $this->description_language :
false;
64 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false;
72 $fields[
'meta_description_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_description'));
74 if($this->db->insert(
'il_meta_description',$fields))
88 if($this->db->update(
'il_meta_description',
90 array(
"meta_description_id" => array(
'integer',$this->
getMetaId()))))
104 $query =
"DELETE FROM il_meta_description ".
105 "WHERE meta_description_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
116 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
117 'obj_id' => array(
'integer',$this->
getObjId()),
118 'obj_type' => array(
'text',$this->
getObjType()),
120 'parent_id' => array(
'integer',$this->
getParentId()),
129 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
133 $query =
"SELECT * FROM il_meta_description ".
134 "WHERE meta_description_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
166 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
170 $query =
"SELECT meta_description_id FROM il_meta_description ".
171 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id).
" ".
172 "AND obj_id = ".$ilDB->quote($a_obj_id).
" ".
173 "AND parent_id = ".$ilDB->quote($a_parent_id).
" ".
174 "AND parent_type = ".$ilDB->quote($a_parent_type).
" ".
175 "ORDER BY meta_description_id";
180 $ids[] =
$row->meta_description_id;
182 return $ids ? $ids : array();