31 include_once
'class.ilMDBase.php';
36 function ilMDLanguage($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
56 $query =
"SELECT language FROM il_meta_language ".
57 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
58 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
59 "AND obj_type = ".$ilDB->quote($a_obj_type ,
'text').
" ".
60 "AND parent_type = 'meta_general' ".
61 "ORDER BY meta_language_id ";
74 if(is_object($lng_obj))
76 $this->language =& $lng_obj;
81 return is_object($this->language) ? $this->language :
false;
85 return is_object($this->language) ? $this->language->getLanguageCode() :
false;
93 $fields[
'meta_language_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_language'));
95 if($this->db->insert(
'il_meta_language',$fields))
109 if($this->db->update(
'il_meta_language',
110 $this->__getFields(),
111 array(
"meta_language_id" => array(
'integer',$this->
getMetaId()))))
125 $query =
"DELETE FROM il_meta_language ".
126 "WHERE meta_language_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
137 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
138 'obj_id' => array(
'integer',$this->
getObjId()),
139 'obj_type' => array(
'text',$this->
getObjType()),
141 'parent_id' => array(
'integer',$this->
getParentId()),
149 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
153 $query =
"SELECT * FROM il_meta_language ".
154 "WHERE meta_language_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
177 $writer->xmlElement(
'Language',array(
'Language' => $this->
getLanguageCode() ?
185 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
189 $query =
"SELECT meta_language_id FROM il_meta_language ".
190 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
191 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
192 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
193 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
198 $ids[] =
$row->meta_language_id;
200 return $ids ? $ids : array();