31 include_once
'class.ilMDBase.php';
38 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDTaxonPath.php';
44 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDTaxonPath.php';
46 if (!$a_taxon_path_id) {
50 $tax->setMetaId($a_taxon_path_id);
56 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDTaxonPath.php';
60 $tax->setParentType(
'meta_classification');
67 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
73 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
79 $key->setMetaId($a_keyword_id);
85 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
89 $key->setParentType(
'meta_classification');
101 case 'EducationalObjective':
102 case 'AccessibilityRestrictions':
103 case 'EducationalLevel':
105 case 'SecurityLevel':
107 $this->purpose = $a_purpose;
116 return $this->purpose;
120 $this->description = $a_description;
128 if (is_object($lng_obj)) {
129 $this->description_language = &$lng_obj;
134 return is_object($this->description_language) ? $this->description_language :
false;
138 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false;
144 if ($this->db->autoExecute(
145 'il_meta_classification',
146 $this->__getFields(),
149 $this->
setMetaId($this->db->getLastInsertId());
161 if ($this->db->autoExecute(
162 'il_meta_classification',
163 $this->__getFields(),
165 "meta_classification_id = " . $ilDB->quote($this->
getMetaId())
173 public function delete()
178 $query =
"DELETE FROM il_meta_classification " .
179 "WHERE meta_classification_id = " . $ilDB->quote($this->
getMetaId());
200 return array(
'rbac_id' => $this->
getRBACId(),
212 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
215 $query =
"SELECT * FROM il_meta_classification " .
216 "WHERE meta_classification_id = " . $ilDB->quote($this->
getMetaId());
238 $writer->xmlStartTag(
'Classification', array(
'Purpose' => $this->
getPurpose()));
243 $tax->toXML($writer);
251 $key->toXML($writer);
253 $writer->xmlEndTag(
'Classification');
259 public function _getIds($a_rbac_id, $a_obj_id)
263 $query =
"SELECT meta_classification_id FROM il_meta_classification " .
264 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) .
" " .
265 "AND obj_id = " . $ilDB->quote($a_obj_id);
270 $ids[] =
$row->meta_classification_id;
272 return $ids ? $ids : array();
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
if(!array_key_exists('StateId', $_REQUEST)) $id
setDescriptionLanguage(&$lng_obj)
& getDescriptionLanguage()
getDescriptionLanguageCode()
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setDescription($a_description)
_getIds($a_rbac_id, $a_obj_id)
& getKeyword($a_keyword_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)
& getTaxonPath($a_taxon_path_id)