ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 196 of file class.ilMDClassification.php.

197 {
198 return array('rbac_id' => array('integer',$this->getRBACId()),
199 'obj_id' => array('integer',$this->getObjId()),
200 'obj_type' => array('text',$this->getObjType()),
201 'purpose' => array('text',$this->getPurpose()),
202 'description' => array('text',$this->getDescription()),
203 'description_language' => array('text',$this->getDescriptionLanguageCode()));
204 }

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 198 of file class.ilMDClassification.php.

199 {
200 return array('rbac_id' => $this->getRBACId(),
201 'obj_id' => $this->getObjId(),
202 'obj_type' => ilUtil::prepareDBString($this->getObjType()),
203 'purpose' => ilUtil::prepareDBString($this->getPurpose()),
204 'description' => ilUtil::prepareDBString($this->getDescription()),
205 'description_language' => ilUtil::prepareDBString($this->getDescriptionLanguageCode()));
206 }
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 278 of file class.ilMDClassification.php.

279 {
280 global $ilDB;
281
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');
285
286
287 $res = $ilDB->query($query);
288 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
289 $ids[] = $row->meta_classification_id;
290 }
291 return $ids ? $ids : array();
292 }
$query
foreach($_POST as $key=> $value) $res
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 259 of file class.ilMDClassification.php.

260 {
261 global $ilDB;
262
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);
266
267
268 $res = $ilDB->query($query);
269 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
270 $ids[] = $row->meta_classification_id;
271 }
272 return $ids ? $ids : array();
273 }

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

◆ addKeyword() [1/2]

& ilMDClassification::addKeyword ( )

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

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

References $key, 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 83 of file class.ilMDClassification.php.

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

References $key, 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 54 of file class.ilMDClassification.php.

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

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 54 of file class.ilMDClassification.php.

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

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 172 of file class.ilMDClassification.php.

173 {
174 global $ilDB;
175
176 if ($this->getMetaId()) {
177 $query = "DELETE FROM il_meta_classification " .
178 "WHERE meta_classification_id = " . $ilDB->quote($this->getMetaId(), 'integer');
179 $res = $ilDB->manipulate($query);
180
181 foreach ($this->getTaxonPathIds() as $id) {
182 $tax = $this->getTaxonPath($id);
183 $tax->delete();
184 }
185 foreach ($this->getKeywordIds() as $id) {
186 $key = $this->getKeyword($id);
187 $key->delete();
188 }
189
190 return true;
191 }
192 return false;
193 }
& getTaxonPath($a_taxon_path_id)
if(!array_key_exists('StateId', $_REQUEST)) $id

References $id, $ilDB, $key, $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 173 of file class.ilMDClassification.php.

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

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

+ Here is the call graph for this function:

◆ getDescription() [1/2]

ilMDClassification::getDescription ( )

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

123 {
124 return $this->description;
125 }

References $description.

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDescription() [2/2]

ilMDClassification::getDescription ( )

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

123 {
124 return $this->description;
125 }

References $description.

◆ getDescriptionLanguage() [1/2]

& ilMDClassification::getDescriptionLanguage ( )

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

133 {
134 return is_object($this->description_language) ? $this->description_language : false;
135 }

◆ getDescriptionLanguage() [2/2]

& ilMDClassification::getDescriptionLanguage ( )

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

133 {
134 return is_object($this->description_language) ? $this->description_language : false;
135 }

◆ getDescriptionLanguageCode() [1/2]

ilMDClassification::getDescriptionLanguageCode ( )

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

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

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDescriptionLanguageCode() [2/2]

ilMDClassification::getDescriptionLanguageCode ( )

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

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

◆ getKeyword() [1/2]

& ilMDClassification::getKeyword (   $a_keyword_id)

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

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

References $key.

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getKeyword() [2/2]

& ilMDClassification::getKeyword (   $a_keyword_id)

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

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

References $key.

◆ getKeywordIds() [1/2]

& ilMDClassification::getKeywordIds ( )

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

66 {
67 include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
68
69 return ilMDKeyword::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_classification');
70 }
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 65 of file class.ilMDClassification.php.

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

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 114 of file class.ilMDClassification.php.

115 {
116 return $this->purpose;
117 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getPurpose() [2/2]

ilMDClassification::getPurpose ( )

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

115 {
116 return $this->purpose;
117 }

◆ 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 return false;
48 }
49 $tax = new ilMDTaxonPath();
50 $tax->setMetaId($a_taxon_path_id);
51
52 return $tax;
53 }

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 return false;
48 }
49 $tax = new ilMDTaxonPath();
50 $tax->setMetaId($a_taxon_path_id);
51
52 return $tax;
53 }

◆ 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 206 of file class.ilMDClassification.php.

207 {
208 global $ilDB;
209
210 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
211
212 if ($this->getMetaId()) {
213 $query = "SELECT * FROM il_meta_classification " .
214 "WHERE meta_classification_id = " . $ilDB->quote($this->getMetaId(), 'integer');
215
216 $res = $this->db->query($query);
217 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
218 $this->setRBACId($row->rbac_id);
219 $this->setObjId($row->obj_id);
220 $this->setObjType($row->obj_type);
221 $this->setPurpose($row->purpose);
222 $this->setDescription($row->description);
223 $this->description_language = new ilMDLanguageItem($row->description_language);
224 }
225 }
226 return true;
227 }
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 208 of file class.ilMDClassification.php.

209 {
210 global $ilDB;
211
212 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
213
214 if ($this->getMetaId()) {
215 $query = "SELECT * FROM il_meta_classification " .
216 "WHERE meta_classification_id = " . $ilDB->quote($this->getMetaId());
217
218 $res = $this->db->query($query);
219 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
220 $this->setRBACId($row->rbac_id);
221 $this->setObjId($row->obj_id);
222 $this->setObjType($row->obj_type);
223 $this->setPurpose(ilUtil::stripSlashes($row->purpose));
224 $this->setDescription(ilUtil::stripSlashes($row->description));
225 $this->description_language = new ilMDLanguageItem($row->description_language);
226 }
227 }
228 return true;
229 }
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 142 of file class.ilMDClassification.php.

143 {
144 global $ilDB;
145
146 $fields = $this->__getFields();
147 $fields['meta_classification_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_classification'));
148
149 if ($this->db->insert('il_meta_classification', $fields)) {
150 $this->setMetaId($next_id);
151 return $this->getMetaId();
152 }
153 return false;
154 }
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 142 of file class.ilMDClassification.php.

143 {
144 if ($this->db->autoExecute(
145 'il_meta_classification',
146 $this->__getFields(),
148 )) {
149 $this->setMetaId($this->db->getLastInsertId());
150
151 return $this->getMetaId();
152 }
153 return false;
154 }

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 118 of file class.ilMDClassification.php.

119 {
120 $this->description = $a_description;
121 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDescription() [2/2]

ilMDClassification::setDescription (   $a_description)

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

119 {
120 $this->description = $a_description;
121 }

◆ setDescriptionLanguage() [1/2]

ilMDClassification::setDescriptionLanguage ( $lng_obj)

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

127 {
128 if (is_object($lng_obj)) {
129 $this->description_language = $lng_obj;
130 }
131 }

◆ setDescriptionLanguage() [2/2]

ilMDClassification::setDescriptionLanguage ( $lng_obj)

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

127 {
128 if (is_object($lng_obj)) {
129 $this->description_language =&$lng_obj;
130 }
131 }

◆ setPurpose() [1/2]

ilMDClassification::setPurpose (   $a_purpose)

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

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

Referenced by read().

+ Here is the caller graph for this function:

◆ setPurpose() [2/2]

ilMDClassification::setPurpose (   $a_purpose)

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

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

◆ toXML() [1/2]

ilMDClassification::toXML ( $writer)

Reimplemented from ilMDBase.

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

235 {
236 $writer->xmlStartTag('Classification', array('Purpose' => $this->getPurpose()
237 ? $this->getPurpose()
238 : 'Idea'));
239
240 // Taxon Path
241 $taxs = $this->getTaxonPathIds();
242 foreach ($taxs as $id) {
243 $tax =&$this->getTaxonPath($id);
244 $tax->toXML($writer);
245 }
246 if (!count($taxs)) {
247 include_once 'Services/MetaData/classes/class.ilMDTaxonPath.php';
248 $tax = new ilMDTaxonPath($this->getRBACId(), $this->getObjId());
249 $tax->toXML($writer);
250 }
251
252 // Description
253 $writer->xmlElement(
254 'Description',
255 array('Language' => $this->getDescriptionLanguageCode()
257 : 'en'),
258 $this->getDescription()
259 );
260
261 // Keyword
262 $keys = $this->getKeywordIds();
263 foreach ($keys as $id) {
264 $key =&$this->getKeyword($id);
265 $key->toXML($writer);
266 }
267 if (!count($keys)) {
268 include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
269 $key = new ilMDKeyword($this->getRBACId(), $this->getObjId());
270 $key->toXML($writer);
271 }
272 $writer->xmlEndTag('Classification');
273 }
$keys

References $id, $key, $keys, 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 236 of file class.ilMDClassification.php.

237 {
238 $writer->xmlStartTag('Classification', array('Purpose' => $this->getPurpose()));
239
240 // Taxon Path
241 foreach ($this->getTaxonPathIds() as $id) {
242 $tax =&$this->getTaxonPath($id);
243 $tax->toXML($writer);
244 }
245 // Description
246 $writer->xmlElement('Description', array('Language' => $this->getDescriptionLanguageCode()), $this->getDescription());
247
248 // Keyword
249 foreach ($this->getKeywordIds() as $id) {
250 $key =&$this->getKeyword($id);
251 $key->toXML($writer);
252 }
253 $writer->xmlEndTag('Classification');
254 }

References $id, $key, 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 156 of file class.ilMDClassification.php.

157 {
158 global $ilDB;
159
160 if ($this->getMetaId()) {
161 if ($this->db->update(
162 'il_meta_classification',
163 $this->__getFields(),
164 array("meta_classification_id" => array('integer',$this->getMetaId()))
165 )) {
166 return true;
167 }
168 }
169 return false;
170 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ update() [2/2]

ilMDClassification::update ( )

Reimplemented from ilMDBase.

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

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

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: