31 include_once
'class.ilMDBase.php';
38 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
44 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
51 $tax->setMetaId($a_taxon_path_id);
57 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
61 $tax->setParentType(
'meta_classification');
68 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
74 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
81 $key->setMetaId($a_keyword_id);
87 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
91 $key->setParentType(
'meta_classification');
104 case 'EducationalObjective':
105 case 'AccessibilityRestrictions':
106 case 'EducationalLevel':
108 case 'SecurityLevel':
110 $this->purpose = $a_purpose;
119 return $this->purpose;
123 $this->description = $a_description;
127 return $this->description;
131 if(is_object($lng_obj))
133 $this->description_language = $lng_obj;
138 return is_object($this->description_language) ? $this->description_language :
false;
142 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false;
151 $fields[
'meta_classification_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_classification'));
153 if($this->db->insert(
'il_meta_classification',$fields))
167 if($this->db->update(
'il_meta_classification',
168 $this->__getFields(),
183 $query =
"DELETE FROM il_meta_classification ".
184 "WHERE meta_classification_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
218 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
222 $query =
"SELECT * FROM il_meta_classification ".
223 "WHERE meta_classification_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
246 $writer->xmlStartTag(
'Classification',
array(
'Purpose' => $this->
getPurpose()
252 foreach($taxs as $id)
255 $tax->toXML($writer);
259 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
261 $tax->toXML($writer);
272 foreach($keys as $id)
275 $key->toXML($writer);
279 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
281 $key->toXML($writer);
283 $writer->xmlEndTag(
'Classification');
293 $query =
"SELECT meta_classification_id FROM il_meta_classification ".
294 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
295 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
301 $ids[] =
$row->meta_classification_id;
303 return $ids ? $ids :
array();
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static _getIds($a_rbac_id, $a_obj_id)
setDescriptionLanguage(&$lng_obj)
& getDescriptionLanguage()
getDescriptionLanguageCode()
setMetaId($a_meta_id, $a_read_data=true)
setDescription($a_description)
Create styles array
The data for the language used.
& getKeyword($a_keyword_id)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
& getTaxonPath($a_taxon_path_id)