32 include_once
'class.ilMDBase.php';
36 function ilMDGeneral($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
44 $subs[
'Identifier'] =
'meta_identifier';
45 $subs[
'Language'] =
'meta_language';
46 $subs[
'Description'] =
'meta_description';
47 $subs[
'Keyword'] =
'meta_keyword';
56 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
62 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
69 $ide->setMetaId($a_identifier_id);
75 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
79 $ide->setParentType(
'meta_general');
85 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
91 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
98 $lan->setMetaId($a_language_id);
105 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
109 $lan->setParentType(
'meta_general');
115 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
121 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
124 if(!$a_description_id)
129 $des->setMetaId($a_description_id);
135 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
139 $des->setParentType(
'meta_general');
145 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
151 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
158 $key->setMetaId($a_keyword_id);
164 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
168 $key->setParentType(
'meta_general');
185 $this->structure = $a_structure;
194 return $this->structure;
198 $this->title = $a_title;
206 if(is_object($lng_obj))
208 $this->title_language = $lng_obj;
213 return is_object($this->title_language) ? $this->title_language :
false;
217 return is_object($this->title_language) ? $this->title_language->getLanguageCode() :
false;
222 $this->coverage = $a_coverage;
226 return $this->coverage;
231 if(is_object($lng_obj))
233 $this->coverage_language =& $lng_obj;
238 return is_object($this->coverage_language) ? $this->coverage_language :
false;
242 return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() :
false;
248 if($this->db->autoExecute(
'il_meta_general',
249 $this->__getFields(),
250 DB_AUTOQUERY_INSERT))
252 $this->
setMetaId($this->db->getLastInsertId());
265 if($this->db->autoExecute(
'il_meta_general',
266 $this->__getFields(),
268 "meta_general_id = ".$ilDB->quote($this->
getMetaId())))
314 $query =
"DELETE FROM il_meta_general ".
315 "WHERE meta_general_id = ".$ilDB->quote($this->
getMetaId());
329 return array(
'rbac_id' => $this->
getRBACId(),
343 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
347 $query =
"SELECT * FROM il_meta_general ".
348 "WHERE meta_general_id = ".$ilDB->quote($this->
getMetaId());
373 $writer->xmlStartTag(
'General',array(
'Structure' => $this->
getStructure()));
379 $ide->toXML($writer);
389 $lan->toXML($writer);
396 $des->toXML($writer);
403 $key->toXML($writer);
411 $writer->xmlEndTag(
'General');
421 $query =
"SELECT meta_general_id FROM il_meta_general ".
422 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id).
" ".
423 "AND obj_id = ".$ilDB->quote($a_obj_id);
429 return $row->meta_general_id;