31 include_once
'class.ilMDBase.php';
38 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
44 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
46 if (!$a_taxon_path_id) {
50 $tax->setMetaId($a_taxon_path_id);
56 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
60 $tax->setParentType(
'meta_classification');
67 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
73 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
79 $key->setMetaId($a_keyword_id);
85 include_once
'Services/MetaData/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;
147 $fields[
'meta_classification_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_classification'));
149 if ($this->db->insert(
'il_meta_classification', $fields)) {
161 if ($this->db->update(
162 'il_meta_classification',
163 $this->__getFields(),
172 public function delete()
177 $query =
"DELETE FROM il_meta_classification " .
178 "WHERE meta_classification_id = " . $ilDB->quote($this->
getMetaId(),
'integer');
210 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
213 $query =
"SELECT * FROM il_meta_classification " .
214 "WHERE meta_classification_id = " . $ilDB->quote($this->
getMetaId(),
'integer');
236 $writer->xmlStartTag(
'Classification',
array(
'Purpose' => $this->
getPurpose()
242 foreach ($taxs as
$id) {
244 $tax->toXML($writer);
247 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
249 $tax->toXML($writer);
263 foreach (
$keys as $id) {
265 $key->toXML($writer);
268 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
270 $key->toXML($writer);
272 $writer->xmlEndTag(
'Classification');
278 public static function _getIds($a_rbac_id, $a_obj_id)
282 $query =
"SELECT meta_classification_id FROM il_meta_classification " .
283 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id,
'integer') .
" " .
284 "AND obj_id = " . $ilDB->quote($a_obj_id,
'integer');
289 $ids[] =
$row->meta_classification_id;
291 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
static _getIds($a_rbac_id, $a_obj_id)
setDescriptionLanguage(&$lng_obj)
& getDescriptionLanguage()
getDescriptionLanguageCode()
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
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)