32 include_once
'class.ilMDBase.php';
38 $subs[
'Identifier'] =
'meta_identifier';
39 $subs[
'Language'] =
'meta_language';
40 $subs[
'Description'] =
'meta_description';
41 $subs[
'Keyword'] =
'meta_keyword';
50 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
56 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
58 if (!$a_identifier_id) {
62 $ide->setMetaId($a_identifier_id);
68 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
72 $ide->setParentType(
'meta_general');
78 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
84 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
86 if (!$a_language_id) {
90 $lan->setMetaId($a_language_id);
96 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
100 $lan->setParentType(
'meta_general');
106 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
112 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
115 if (!$a_description_id) {
119 $des->setMetaId($a_description_id);
125 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
129 $des->setParentType(
'meta_general');
135 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
141 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
143 if (!$a_keyword_id) {
147 $key->setMetaId($a_keyword_id);
153 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
157 $key->setParentType(
'meta_general');
167 switch ($a_structure) {
173 $this->structure = $a_structure;
182 return $this->structure;
186 $this->title = $a_title;
194 if (is_object($lng_obj)) {
195 $this->title_language = $lng_obj;
200 return is_object($this->title_language) ? $this->title_language :
false;
204 return is_object($this->title_language) ? $this->title_language->getLanguageCode() :
false;
209 $this->coverage = $a_coverage;
213 return $this->coverage;
218 if (is_object($lng_obj)) {
219 $this->coverage_language = &$lng_obj;
224 return is_object($this->coverage_language) ? $this->coverage_language :
false;
228 return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() :
false;
234 if ($this->db->autoExecute(
236 $this->__getFields(),
239 $this->
setMetaId($this->db->getLastInsertId());
251 if ($this->db->autoExecute(
253 $this->__getFields(),
255 "meta_general_id = " . $ilDB->quote($this->
getMetaId())
263 public function delete()
295 $query =
"DELETE FROM il_meta_general " .
296 "WHERE meta_general_id = " . $ilDB->quote($this->
getMetaId());
310 return array(
'rbac_id' => $this->
getRBACId(),
324 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
327 $query =
"SELECT * FROM il_meta_general " .
328 "WHERE meta_general_id = " . $ilDB->quote($this->
getMetaId());
352 $writer->xmlStartTag(
'General', array(
'Structure' => $this->
getStructure()));
357 $ide->toXML($writer);
366 $lan->toXML($writer);
372 $des->toXML($writer);
378 $key->toXML($writer);
385 $writer->xmlEndTag(
'General');
391 public function _getId($a_rbac_id, $a_obj_id)
395 $query =
"SELECT meta_general_id FROM il_meta_general " .
396 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) .
" " .
397 "AND obj_id = " . $ilDB->quote($a_obj_id);
402 return $row->meta_general_id;
setCoverageLanguage(&$lng_obj)
setStructure($a_structure)
& getLanguage($a_language_id)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
& getKeyword($a_keyword_id)
_getId($a_rbac_id, $a_obj_id)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
if(!array_key_exists('StateId', $_REQUEST)) $id
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
& getIdentifier($a_identifier_id)
getCoverageLanguageCode()
setTitleLanguage(&$lng_obj)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
& getDescription($a_description_id)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static prepareDBString($a_str)
prepare a string for db writing (insert/update)