ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMDClassification Class Reference
+ Inheritance diagram for ilMDClassification:
+ Collaboration diagram for ilMDClassification:

Public Member Functions

getTaxonPathIds ()
 
getTaxonPath ($a_taxon_path_id)
 
addTaxonPath ()
 
getKeywordIds ()
 
getKeyword ($a_keyword_id)
 
addKeyword ()
 
 setPurpose ($a_purpose)
 
 getPurpose ()
 
 setDescription ($a_description)
 
 getDescription ()
 
 setDescriptionLanguage (&$lng_obj)
 
getDescriptionLanguage ()
 
 getDescriptionLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
getTaxonPathIds ()
 
getTaxonPath ($a_taxon_path_id)
 
addTaxonPath ()
 
getKeywordIds ()
 
getKeyword ($a_keyword_id)
 
addKeyword ()
 
 setPurpose ($a_purpose)
 
 getPurpose ()
 
 setDescription ($a_description)
 
 getDescription ()
 
 setDescriptionLanguage (&$lng_obj)
 
getDescriptionLanguage ()
 
 getDescriptionLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getIds ($a_rbac_id, $a_obj_id)
 
- Public Member Functions inherited from ilMDBase
 __construct ($a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 
 __construct ($a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

static _getIds ($a_rbac_id, $a_obj_id)
 

Additional Inherited Members

- Data Fields inherited from ilMDBase
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMDBase
 $log
 

Detailed Description

Definition at line 33 of file class.ilMDClassification.php.

Member Function Documentation

◆ __getFields() [1/2]

ilMDClassification::__getFields ( )

Definition at line 204 of file class.ilMDClassification.php.

205 {
206 return array('rbac_id' => array('integer',$this->getRBACId()),
207 'obj_id' => array('integer',$this->getObjId()),
208 'obj_type' => array('text',$this->getObjType()),
209 'purpose' => array('text',$this->getPurpose()),
210 'description' => array('text',$this->getDescription()),
211 'description_language' => array('text',$this->getDescriptionLanguageCode()));
212 }

References getDescription(), getDescriptionLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), getPurpose(), and ilMDBase\getRBACId().

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [2/2]

ilMDClassification::__getFields ( )

Definition at line 204 of file class.ilMDClassification.php.

205 {
206 return array('rbac_id' => $this->getRBACId(),
207 'obj_id' => $this->getObjId(),
208 'obj_type' => ilUtil::prepareDBString($this->getObjType()),
209 'purpose' => ilUtil::prepareDBString($this->getPurpose()),
210 'description' => ilUtil::prepareDBString($this->getDescription()),
211 'description_language' => ilUtil::prepareDBString($this->getDescriptionLanguageCode()));
212 }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)

References getDescription(), getDescriptionLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), getPurpose(), ilMDBase\getRBACId(), and ilUtil\prepareDBString().

+ Here is the call graph for this function:

◆ _getIds() [1/2]

static ilMDClassification::_getIds (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 289 of file class.ilMDClassification.php.

290 {
291 global $ilDB;
292
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');
296
297
298 $res = $ilDB->query($query);
299 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
300 {
301 $ids[] = $row->meta_classification_id;
302 }
303 return $ids ? $ids : array();
304 }
global $ilDB

References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMD\getClassificationIds().

+ Here is the caller graph for this function:

◆ _getIds() [2/2]

ilMDClassification::_getIds (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 269 of file class.ilMDClassification.php.

270 {
271 global $ilDB;
272
273 $query = "SELECT meta_classification_id FROM il_meta_classification ".
274 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
275 "AND obj_id = ".$ilDB->quote($a_obj_id);
276
277
278 $res = $ilDB->query($query);
279 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
280 {
281 $ids[] = $row->meta_classification_id;
282 }
283 return $ids ? $ids : array();
284 }

References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

◆ addKeyword() [1/2]

& ilMDClassification::addKeyword ( )

Definition at line 85 of file class.ilMDClassification.php.

86 {
87 include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
88
89 $key = new ilMDKeyword($this->getRBACId(),$this->getObjId(),$this->getObjType());
90 $key->setParentId($this->getMetaId());
91 $key->setParentType('meta_classification');
92
93 return $key;
94 }

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ addKeyword() [2/2]

& ilMDClassification::addKeyword ( )

Definition at line 85 of file class.ilMDClassification.php.

86 {
87 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
88
89 $key = new ilMDKeyword($this->getRBACId(),$this->getObjId(),$this->getObjType());
90 $key->setParentId($this->getMetaId());
91 $key->setParentType('meta_classification');
92
93 return $key;
94 }

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ addTaxonPath() [1/2]

& ilMDClassification::addTaxonPath ( )

Definition at line 55 of file class.ilMDClassification.php.

56 {
57 include_once 'Services/MetaData/classes/class.ilMDTaxonPath.php';
58
59 $tax = new ilMDTaxonPath($this->getRBACId(),$this->getObjId(),$this->getObjType());
60 $tax->setParentId($this->getMetaId());
61 $tax->setParentType('meta_classification');
62
63 return $tax;
64 }

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ addTaxonPath() [2/2]

& ilMDClassification::addTaxonPath ( )

Definition at line 55 of file class.ilMDClassification.php.

56 {
57 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTaxonPath.php';
58
59 $tax = new ilMDTaxonPath($this->getRBACId(),$this->getObjId(),$this->getObjType());
60 $tax->setParentId($this->getMetaId());
61 $tax->setParentType('meta_classification');
62
63 return $tax;
64 }

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ delete() [1/2]

ilMDClassification::delete ( )

Reimplemented from ilMDBase.

Definition at line 177 of file class.ilMDClassification.php.

178 {
179 global $ilDB;
180
181 if($this->getMetaId())
182 {
183 $query = "DELETE FROM il_meta_classification ".
184 "WHERE meta_classification_id = ".$ilDB->quote($this->getMetaId() ,'integer');
185 $res = $ilDB->manipulate($query);
186
187 foreach($this->getTaxonPathIds() as $id)
188 {
189 $tax = $this->getTaxonPath($id);
190 $tax->delete();
191 }
192 foreach($this->getKeywordIds() as $id)
193 {
194 $key = $this->getKeyword($id);
195 $key->delete();
196 }
197
198 return true;
199 }
200 return false;
201 }
& getTaxonPath($a_taxon_path_id)

References $ilDB, $query, $res, getKeyword(), getKeywordIds(), ilMDBase\getMetaId(), getTaxonPath(), and getTaxonPathIds().

+ Here is the call graph for this function:

◆ delete() [2/2]

ilMDClassification::delete ( )

Reimplemented from ilMDBase.

Definition at line 176 of file class.ilMDClassification.php.

177 {
178 global $ilDB;
179
180 if($this->getMetaId())
181 {
182 $query = "DELETE FROM il_meta_classification ".
183 "WHERE meta_classification_id = ".$ilDB->quote($this->getMetaId());
184
185 $this->db->query($query);
186
187 foreach($this->getTaxonPathIds() as $id)
188 {
189 $tax =& $this->getTaxonPath($id);
190 $tax->delete();
191 }
192 foreach($this->getKeywordIds() as $id)
193 {
194 $key =& $this->getKeyword($id);
195 $key->delete();
196 }
197
198 return true;
199 }
200 return false;
201 }

References $ilDB, $query, getKeyword(), getKeywordIds(), ilMDBase\getMetaId(), getTaxonPath(), and getTaxonPathIds().

+ Here is the call graph for this function:

◆ getDescription() [1/2]

ilMDClassification::getDescription ( )

Definition at line 125 of file class.ilMDClassification.php.

126 {
127 return $this->description;
128 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDescription() [2/2]

ilMDClassification::getDescription ( )

Definition at line 125 of file class.ilMDClassification.php.

126 {
127 return $this->description;
128 }

◆ getDescriptionLanguage() [1/2]

& ilMDClassification::getDescriptionLanguage ( )

Definition at line 136 of file class.ilMDClassification.php.

137 {
138 return is_object($this->description_language) ? $this->description_language : false;
139 }

◆ getDescriptionLanguage() [2/2]

& ilMDClassification::getDescriptionLanguage ( )

Definition at line 136 of file class.ilMDClassification.php.

137 {
138 return is_object($this->description_language) ? $this->description_language : false;
139 }

◆ getDescriptionLanguageCode() [1/2]

ilMDClassification::getDescriptionLanguageCode ( )

Definition at line 140 of file class.ilMDClassification.php.

141 {
142 return is_object($this->description_language) ? $this->description_language->getLanguageCode() : false;
143 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDescriptionLanguageCode() [2/2]

ilMDClassification::getDescriptionLanguageCode ( )

Definition at line 140 of file class.ilMDClassification.php.

141 {
142 return is_object($this->description_language) ? $this->description_language->getLanguageCode() : false;
143 }

◆ getKeyword() [1/2]

& ilMDClassification::getKeyword (   $a_keyword_id)

Definition at line 72 of file class.ilMDClassification.php.

73 {
74 include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
75
76 if(!$a_keyword_id)
77 {
78 return false;
79 }
80 $key = new ilMDKeyword();
81 $key->setMetaId($a_keyword_id);
82
83 return $key;
84 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getKeyword() [2/2]

& ilMDClassification::getKeyword (   $a_keyword_id)

Definition at line 72 of file class.ilMDClassification.php.

73 {
74 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
75
76 if(!$a_keyword_id)
77 {
78 return false;
79 }
80 $key = new ilMDKeyword();
81 $key->setMetaId($a_keyword_id);
82
83 return $key;
84 }

◆ getKeywordIds() [1/2]

& ilMDClassification::getKeywordIds ( )

Definition at line 66 of file class.ilMDClassification.php.

67 {
68 include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
69
70 return ilMDKeyword::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_classification');
71 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

References ilMDKeyword\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeywordIds() [2/2]

& ilMDClassification::getKeywordIds ( )

Definition at line 66 of file class.ilMDClassification.php.

67 {
68 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
69
70 return ilMDKeyword::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_classification');
71 }

References ilMDKeyword\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ getPurpose() [1/2]

ilMDClassification::getPurpose ( )

Definition at line 117 of file class.ilMDClassification.php.

118 {
119 return $this->purpose;
120 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getPurpose() [2/2]

ilMDClassification::getPurpose ( )

Definition at line 117 of file class.ilMDClassification.php.

118 {
119 return $this->purpose;
120 }

◆ getTaxonPath() [1/2]

& ilMDClassification::getTaxonPath (   $a_taxon_path_id)

Definition at line 42 of file class.ilMDClassification.php.

43 {
44 include_once 'Services/MetaData/classes/class.ilMDTaxonPath.php';
45
46 if(!$a_taxon_path_id)
47 {
48 return false;
49 }
50 $tax = new ilMDTaxonPath();
51 $tax->setMetaId($a_taxon_path_id);
52
53 return $tax;
54 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getTaxonPath() [2/2]

& ilMDClassification::getTaxonPath (   $a_taxon_path_id)

Definition at line 42 of file class.ilMDClassification.php.

43 {
44 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTaxonPath.php';
45
46 if(!$a_taxon_path_id)
47 {
48 return false;
49 }
50 $tax = new ilMDTaxonPath();
51 $tax->setMetaId($a_taxon_path_id);
52
53 return $tax;
54 }

◆ getTaxonPathIds() [1/2]

& ilMDClassification::getTaxonPathIds ( )

Definition at line 36 of file class.ilMDClassification.php.

37 {
38 include_once 'Services/MetaData/classes/class.ilMDTaxonPath.php';
39
40 return ilMDTaxonPath::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_classification');
41 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

References ilMDTaxonPath\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTaxonPathIds() [2/2]

& ilMDClassification::getTaxonPathIds ( )

Definition at line 36 of file class.ilMDClassification.php.

37 {
38 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTaxonPath.php';
39
40 return ilMDTaxonPath::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_classification');
41 }

References ilMDTaxonPath\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ read() [1/2]

ilMDClassification::read ( )

Definition at line 214 of file class.ilMDClassification.php.

215 {
216 global $ilDB;
217
218 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
219
220 if($this->getMetaId())
221 {
222 $query = "SELECT * FROM il_meta_classification ".
223 "WHERE meta_classification_id = ".$ilDB->quote($this->getMetaId() ,'integer');
224
225 $res = $this->db->query($query);
226 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
227 {
228 $this->setRBACId($row->rbac_id);
229 $this->setObjId($row->obj_id);
230 $this->setObjType($row->obj_type);
231 $this->setPurpose($row->purpose);
232 $this->setDescription($row->description);
233 $this->description_language = new ilMDLanguageItem($row->description_language);
234 }
235 }
236 return true;
237 }
setObjId($a_id)
setObjType($a_type)
setRBACId($a_id)

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setDescription(), ilMDBase\setObjId(), ilMDBase\setObjType(), setPurpose(), and ilMDBase\setRBACId().

+ Here is the call graph for this function:

◆ read() [2/2]

ilMDClassification::read ( )

Definition at line 214 of file class.ilMDClassification.php.

215 {
216 global $ilDB;
217
218 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
219
220 if($this->getMetaId())
221 {
222 $query = "SELECT * FROM il_meta_classification ".
223 "WHERE meta_classification_id = ".$ilDB->quote($this->getMetaId());
224
225 $res = $this->db->query($query);
226 while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
227 {
228 $this->setRBACId($row->rbac_id);
229 $this->setObjId($row->obj_id);
230 $this->setObjType($row->obj_type);
231 $this->setPurpose(ilUtil::stripSlashes($row->purpose));
232 $this->setDescription(ilUtil::stripSlashes($row->description));
233 $this->description_language = new ilMDLanguageItem($row->description_language);
234 }
235 }
236 return true;
237 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setDescription(), ilMDBase\setObjId(), ilMDBase\setObjType(), setPurpose(), ilMDBase\setRBACId(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ save() [1/2]

ilMDClassification::save ( )

Reimplemented from ilMDBase.

Definition at line 146 of file class.ilMDClassification.php.

147 {
148 global $ilDB;
149
150 $fields = $this->__getFields();
151 $fields['meta_classification_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_classification'));
152
153 if($this->db->insert('il_meta_classification',$fields))
154 {
155 $this->setMetaId($next_id);
156 return $this->getMetaId();
157 }
158 return false;
159 }
setMetaId($a_meta_id, $a_read_data=true)

References $ilDB, __getFields(), ilMDBase\getMetaId(), and ilMDBase\setMetaId().

+ Here is the call graph for this function:

◆ save() [2/2]

ilMDClassification::save ( )

Reimplemented from ilMDBase.

Definition at line 146 of file class.ilMDClassification.php.

147 {
148 if($this->db->autoExecute('il_meta_classification',
149 $this->__getFields(),
151 {
152 $this->setMetaId($this->db->getLastInsertId());
153
154 return $this->getMetaId();
155 }
156 return false;
157 }

References ilMDBase\getMetaId(), ilDBConstants\MDB2_AUTOQUERY_INSERT, and ilMDBase\setMetaId().

+ Here is the call graph for this function:

◆ setDescription() [1/2]

ilMDClassification::setDescription (   $a_description)

Definition at line 121 of file class.ilMDClassification.php.

122 {
123 $this->description = $a_description;
124 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDescription() [2/2]

ilMDClassification::setDescription (   $a_description)

Definition at line 121 of file class.ilMDClassification.php.

122 {
123 $this->description = $a_description;
124 }

◆ setDescriptionLanguage() [1/2]

ilMDClassification::setDescriptionLanguage ( $lng_obj)

Definition at line 129 of file class.ilMDClassification.php.

130 {
131 if(is_object($lng_obj))
132 {
133 $this->description_language = $lng_obj;
134 }
135 }

◆ setDescriptionLanguage() [2/2]

ilMDClassification::setDescriptionLanguage ( $lng_obj)

Definition at line 129 of file class.ilMDClassification.php.

130 {
131 if(is_object($lng_obj))
132 {
133 $this->description_language =& $lng_obj;
134 }
135 }

◆ setPurpose() [1/2]

ilMDClassification::setPurpose (   $a_purpose)

Definition at line 97 of file class.ilMDClassification.php.

98 {
99 switch($a_purpose)
100 {
101 case 'Discipline':
102 case 'Idea':
103 case 'Prerequisite':
104 case 'EducationalObjective':
105 case 'AccessibilityRestrictions':
106 case 'EducationalLevel':
107 case 'SkillLevel':
108 case 'SecurityLevel':
109 case 'Competency':
110 $this->purpose = $a_purpose;
111 return true;
112
113 default:
114 return false;
115 }
116 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPurpose() [2/2]

ilMDClassification::setPurpose (   $a_purpose)

Definition at line 97 of file class.ilMDClassification.php.

98 {
99 switch($a_purpose)
100 {
101 case 'Discipline':
102 case 'Idea':
103 case 'Prerequisite':
104 case 'EducationalObjective':
105 case 'AccessibilityRestrictions':
106 case 'EducationalLevel':
107 case 'SkillLevel':
108 case 'SecurityLevel':
109 case 'Competency':
110 $this->purpose = $a_purpose;
111 return true;
112
113 default:
114 return false;
115 }
116 }

◆ toXML() [1/2]

ilMDClassification::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 244 of file class.ilMDClassification.php.

245 {
246 $writer->xmlStartTag('Classification',array('Purpose' => $this->getPurpose()
247 ? $this->getPurpose()
248 : 'Idea'));
249
250 // Taxon Path
251 $taxs = $this->getTaxonPathIds();
252 foreach($taxs as $id)
253 {
254 $tax =& $this->getTaxonPath($id);
255 $tax->toXML($writer);
256 }
257 if(!count($taxs))
258 {
259 include_once 'Services/MetaData/classes/class.ilMDTaxonPath.php';
260 $tax = new ilMDTaxonPath($this->getRBACId(),$this->getObjId());
261 $tax->toXML($writer);
262 }
263
264 // Description
265 $writer->xmlElement('Description',array('Language' => $this->getDescriptionLanguageCode()
267 : 'en'),
268 $this->getDescription());
269
270 // Keyword
271 $keys = $this->getKeywordIds();
272 foreach($keys as $id)
273 {
274 $key =& $this->getKeyword($id);
275 $key->toXML($writer);
276 }
277 if(!count($keys))
278 {
279 include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
280 $key = new ilMDKeyword($this->getRBACId(),$this->getObjId());
281 $key->toXML($writer);
282 }
283 $writer->xmlEndTag('Classification');
284 }

References getDescription(), getDescriptionLanguageCode(), getKeyword(), getKeywordIds(), ilMDBase\getObjId(), getPurpose(), ilMDBase\getRBACId(), getTaxonPath(), and getTaxonPathIds().

+ Here is the call graph for this function:

◆ toXML() [2/2]

ilMDClassification::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 244 of file class.ilMDClassification.php.

245 {
246 $writer->xmlStartTag('Classification',array('Purpose' => $this->getPurpose()));
247
248 // Taxon Path
249 foreach($this->getTaxonPathIds() as $id)
250 {
251 $tax =& $this->getTaxonPath($id);
252 $tax->toXML($writer);
253 }
254 // Description
255 $writer->xmlElement('Description',array('Language' => $this->getDescriptionLanguageCode()),$this->getDescription());
256
257 // Keyword
258 foreach($this->getKeywordIds() as $id)
259 {
260 $key =& $this->getKeyword($id);
261 $key->toXML($writer);
262 }
263 $writer->xmlEndTag('Classification');
264 }

References getDescription(), getDescriptionLanguageCode(), getKeyword(), getKeywordIds(), getPurpose(), getTaxonPath(), and getTaxonPathIds().

+ Here is the call graph for this function:

◆ update() [1/2]

ilMDClassification::update ( )

Reimplemented from ilMDBase.

Definition at line 161 of file class.ilMDClassification.php.

162 {
163 global $ilDB;
164
165 if($this->getMetaId())
166 {
167 if($this->db->update('il_meta_classification',
168 $this->__getFields(),
169 array("meta_classification_id" => array('integer',$this->getMetaId()))))
170 {
171 return true;
172 }
173 }
174 return false;
175 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ update() [2/2]

ilMDClassification::update ( )

Reimplemented from ilMDBase.

Definition at line 159 of file class.ilMDClassification.php.

160 {
161 global $ilDB;
162
163 if($this->getMetaId())
164 {
165 if($this->db->autoExecute('il_meta_classification',
166 $this->__getFields(),
168 "meta_classification_id = ".$ilDB->quote($this->getMetaId())))
169 {
170 return true;
171 }
172 }
173 return false;
174 }

References $ilDB, ilMDBase\getMetaId(), and ilDBConstants\MDB2_AUTOQUERY_UPDATE.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: