ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMDRequirement Class Reference
+ Inheritance diagram for ilMDRequirement:
+ Collaboration diagram for ilMDRequirement:

Public Member Functions

 setOrCompositeId (int $a_or_composite_id)
 
 getOrCompositeId ()
 
 setOperatingSystemName (string $a_val)
 
 getOperatingSystemName ()
 
 setOperatingSystemMinimumVersion (string $a_val)
 
 getOperatingSystemMinimumVersion ()
 
 setOperatingSystemMaximumVersion (string $a_val)
 
 getOperatingSystemMaximumVersion ()
 
 setBrowserName (string $a_val)
 
 getBrowserName ()
 
 setBrowserMinimumVersion (string $a_val)
 
 getBrowserMinimumVersion ()
 
 setBrowserMaximumVersion (string $a_val)
 
 getBrowserMaximumVersion ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (ilXmlWriter $writer)
 
 setMetaId (int $a_meta_id, bool $a_read_data=true)
 Compatibility fix for legacy MD classes for new db tables. More...
 
- Public Member Functions inherited from ilMDBase
 __construct (int $a_rbac_id=0, int $a_obj_id=0, string $a_type='')
 constructor More...
 
 read ()
 
 setRBACId (int $a_id)
 
 getRBACId ()
 
 setObjId (int $a_id)
 
 getObjId ()
 
 setObjType (string $a_type)
 
 getObjType ()
 
 setMetaId (int $a_meta_id, bool $a_read_data=true)
 
 getMetaId ()
 
 setParentType (string $a_parent_type)
 
 getParentType ()
 
 setParentId (int $a_id)
 
 getParentId ()
 
 setExportMode (bool $a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (ilXmlWriter $writer)
 

Static Public Member Functions

static _getIds (int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type, int $a_or_composite_id=0)
 

Protected Member Functions

 createOrUpdateOrs ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 createOrUpdateOr (int $id, string $type, string $name, string $min_version, string $max_version)
 Compatibility fix for legacy MD classes for new db tables. More...
 
 deleteAllOrs ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 readFirstOrs ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 readOrIds (int $parent_id)
 Compatibility fix for legacy MD classes for new db tables. More...
 
 getOrIdOS ()
 Compatibility fix for legacy MD classes for new db tables. More...
 
 getOrIdBrowser ()
 Compatibility fix for legacy MD classes for new db tables. More...
 

Private Attributes

const OS_TRANSLATION
 Compatibility fix for legacy MD classes for new db tables. More...
 
const const BROWSER_TRANSLATION
 
const const int $or_composite_id = 0
 
string $operating_system_name = ''
 
string $operating_system_minimum_version = ''
 
string $operating_system_maximum_version = ''
 
string $browser_name = ''
 
string $browser_minimum_version = ''
 
string $browser_maximum_version = ''
 
int $or_id_browser = 0
 Compatibility fix for legacy MD classes for new db tables. More...
 
int $or_id_os = 0
 

Additional Inherited Members

- Protected Attributes inherited from ilMDBase
ilLogger $log
 
ilDBInterface $db
 

Detailed Description

Definition at line 27 of file class.ilMDRequirement.php.

Member Function Documentation

◆ __getFields()

ilMDRequirement::__getFields ( )
Returns
array<string, array<string, mixed>>

Definition at line 202 of file class.ilMDRequirement.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), getOrCompositeId(), ilMDBase\getParentId(), ilMDBase\getParentType(), and ilMDBase\getRBACId().

Referenced by save(), and update().

202  : array
203  {
204  return array(
205  'rbac_id' => array('integer', $this->getRBACId()),
206  'obj_id' => array('integer', $this->getObjId()),
207  'obj_type' => array('text', $this->getObjType()),
208  'parent_type' => array('text', $this->getParentType()),
209  'parent_id' => array('integer', $this->getParentId()),
210  //'operating_system_name' => array('text', $this->getOperatingSystemName()),
211  //'os_min_version' => array('text', $this->getOperatingSystemMinimumVersion()),
212  //'os_max_version' => array('text', $this->getOperatingSystemMaximumVersion()),
213  //'browser_name' => array('text', $this->getBrowserName()),
214  //'browser_minimum_version' => array('text', $this->getBrowserMinimumVersion()),
215  //'browser_maximum_version' => array('text', $this->getBrowserMaximumVersion()),
216  'or_composite_id' => array('integer', $this->getOrCompositeId())
217  );
218  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getIds()

static ilMDRequirement::_getIds ( int  $a_rbac_id,
int  $a_obj_id,
int  $a_parent_id,
string  $a_parent_type,
int  $a_or_composite_id = 0 
)
static
Returns
int[]

Definition at line 280 of file class.ilMDRequirement.php.

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

Referenced by ilMDOrComposite\getRequirementIds(), and ilMDTechnical\getRequirementIds().

286  : array {
287  global $DIC;
288 
289  $ilDB = $DIC->database();
290 
291  $query = "SELECT meta_requirement_id FROM il_meta_requirement " .
292  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
293  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
294  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
295  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text') . " " .
296  "AND or_composite_id = " . $ilDB->quote($a_or_composite_id, 'integer');
297 
298  $res = $ilDB->query($query);
299  $ids = [];
300  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
301  $ids[] = (int) $row->meta_requirement_id;
302  }
303  return $ids;
304  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createOrUpdateOr()

ilMDRequirement::createOrUpdateOr ( int  $id,
string  $type,
string  $name,
string  $min_version,
string  $max_version 
)
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 340 of file class.ilMDRequirement.php.

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

Referenced by createOrUpdateOrs().

346  : int {
347  if ($name === '' && $min_version === '' && $max_version === '') {
348  return 0;
349  }
350 
351  if (!$id) {
352  $this->db->insert(
353  'il_meta_or_composite',
354  [
355  'meta_or_composite_id' => ['integer', $next_id = $this->db->nextId('il_meta_or_composite')],
356  'rbac_id' => ['integer', $this->getRBACId()],
357  'obj_id' => ['integer', $this->getObjId()],
358  'obj_type' => ['text', $this->getObjType()],
359  'parent_type' => ['text', 'meta_requirement'],
360  'parent_id' => ['integer', $this->getMetaId()],
361  'type' => ['text', $type],
362  'name' => ['text', $name],
363  'min_version' => ['text', $min_version],
364  'max_version' => ['text', $max_version]
365  ]
366  );
367  return $next_id;
368  }
369 
370  $this->db->update(
371  'il_meta_or_composite',
372  [
373  'type' => ['text', $type],
374  'name' => ['text', $name],
375  'min_version' => ['text', $min_version],
376  'max_version' => ['text', $max_version]
377  ],
378  ['meta_or_composite_id' => ['integer', $id]]
379  );
380  return $id;
381  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createOrUpdateOrs()

ilMDRequirement::createOrUpdateOrs ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 309 of file class.ilMDRequirement.php.

References createOrUpdateOr(), getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), getOperatingSystemName(), getOrIdBrowser(), and getOrIdOS().

Referenced by save(), and update().

309  : void
310  {
311  $os_name = (string) array_search(
312  $this->getOperatingSystemName(),
313  self::OS_TRANSLATION
314  );
315  $browser_name = (string) array_search(
316  $this->getBrowserName(),
317  self::BROWSER_TRANSLATION
318  );
319 
320  $this->or_id_os = $this->createOrUpdateOr(
321  $this->getOrIdOS(),
322  'operating system',
323  $os_name,
326  );
327 
328  $this->or_id_browser = $this->createOrUpdateOr(
329  $this->getOrIdBrowser(),
330  'browser',
332  $this->getBrowserMinimumVersion(),
333  $this->getBrowserMaximumVersion()
334  );
335  }
createOrUpdateOr(int $id, string $type, string $name, string $min_version, string $max_version)
Compatibility fix for legacy MD classes for new db tables.
getOrIdOS()
Compatibility fix for legacy MD classes for new db tables.
getOrIdBrowser()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilMDRequirement::delete ( )

Definition at line 186 of file class.ilMDRequirement.php.

References $res, deleteAllOrs(), and ilMDBase\getMetaId().

186  : bool
187  {
188  if ($this->getMetaId()) {
189  $query = "DELETE FROM il_meta_requirement " .
190  "WHERE meta_requirement_id = " . $this->db->quote($this->getMetaId(), 'integer');
191  $res = $this->db->manipulate($query);
192 
193  $this->deleteAllOrs();
194  return true;
195  }
196  return false;
197  }
$res
Definition: ltiservices.php:66
deleteAllOrs()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:

◆ deleteAllOrs()

ilMDRequirement::deleteAllOrs ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 386 of file class.ilMDRequirement.php.

References $res, and ilMDBase\getMetaId().

Referenced by delete().

386  : void
387  {
388  $query = "DELETE FROM il_meta_or_composite WHERE parent_type = 'meta_requirement'
389  AND parent_id = " . $this->db->quote($this->getMetaId(), 'integer');
390  $res = $this->db->manipulate($query);
391  }
$res
Definition: ltiservices.php:66
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBrowserMaximumVersion()

ilMDRequirement::getBrowserMaximumVersion ( )

Definition at line 153 of file class.ilMDRequirement.php.

References $browser_maximum_version.

Referenced by createOrUpdateOrs(), and toXML().

153  : string
154  {
156  }
+ Here is the caller graph for this function:

◆ getBrowserMinimumVersion()

ilMDRequirement::getBrowserMinimumVersion ( )

Definition at line 143 of file class.ilMDRequirement.php.

References $browser_minimum_version.

Referenced by createOrUpdateOrs(), and toXML().

143  : string
144  {
146  }
+ Here is the caller graph for this function:

◆ getBrowserName()

ilMDRequirement::getBrowserName ( )

Definition at line 133 of file class.ilMDRequirement.php.

References $browser_name.

Referenced by createOrUpdateOrs(), and toXML().

133  : string
134  {
135  return $this->browser_name;
136  }
+ Here is the caller graph for this function:

◆ getOperatingSystemMaximumVersion()

ilMDRequirement::getOperatingSystemMaximumVersion ( )

Definition at line 111 of file class.ilMDRequirement.php.

References $operating_system_maximum_version.

Referenced by createOrUpdateOrs(), and toXML().

111  : string
112  {
114  }
string $operating_system_maximum_version
+ Here is the caller graph for this function:

◆ getOperatingSystemMinimumVersion()

ilMDRequirement::getOperatingSystemMinimumVersion ( )

Definition at line 101 of file class.ilMDRequirement.php.

References $operating_system_minimum_version.

Referenced by createOrUpdateOrs(), and toXML().

101  : string
102  {
104  }
string $operating_system_minimum_version
+ Here is the caller graph for this function:

◆ getOperatingSystemName()

ilMDRequirement::getOperatingSystemName ( )

Definition at line 91 of file class.ilMDRequirement.php.

References $operating_system_name.

Referenced by createOrUpdateOrs(), and toXML().

91  : string
92  {
94  }
+ Here is the caller graph for this function:

◆ getOrCompositeId()

ilMDRequirement::getOrCompositeId ( )

Definition at line 69 of file class.ilMDRequirement.php.

References $or_composite_id.

Referenced by __getFields().

69  : int
70  {
72  }
const const int $or_composite_id
+ Here is the caller graph for this function:

◆ getOrIdBrowser()

ilMDRequirement::getOrIdBrowser ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 465 of file class.ilMDRequirement.php.

Referenced by createOrUpdateOrs(), and readFirstOrs().

465  : int
466  {
467  return $this->or_id_browser ?? 0;
468  }
+ Here is the caller graph for this function:

◆ getOrIdOS()

ilMDRequirement::getOrIdOS ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 457 of file class.ilMDRequirement.php.

Referenced by createOrUpdateOrs(), and readFirstOrs().

457  : int
458  {
459  return $this->or_id_os ?? 0;
460  }
+ Here is the caller graph for this function:

◆ read()

ilMDRequirement::read ( )

Definition at line 220 of file class.ilMDRequirement.php.

References $res, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), readFirstOrs(), ilMDBase\setObjId(), ilMDBase\setObjType(), setOrCompositeId(), ilMDBase\setParentId(), ilMDBase\setParentType(), and ilMDBase\setRBACId().

220  : bool
221  {
222  if ($this->getMetaId()) {
223  $query = "SELECT * FROM il_meta_requirement " .
224  "WHERE meta_requirement_id = " . $this->db->quote($this->getMetaId(), 'integer');
225 
226  $res = $this->db->query($query);
227  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
228  $this->setRBACId((int) $row->rbac_id);
229  $this->setObjId((int) $row->obj_id);
230  $this->setObjType($row->obj_type ?? '');
231  $this->setParentId((int) $row->parent_id);
232  $this->setParentType($row->parent_type);
233  //$this->setOperatingSystemName($row->operating_system_name ?? '');
234  //$this->setOperatingSystemMinimumVersion($row->os_min_version ?? '');
235  //$this->setOperatingSystemMaximumVersion($row->os_max_version ?? '');
236  //$this->setBrowserName($row->browser_name ?? '');
237  //$this->setBrowserMinimumVersion($row->browser_minimum_version ?? '');
238  //$this->setBrowserMaximumVersion($row->browser_maximum_version ?? '');
239  $this->setOrCompositeId((int) $row->or_composite_id);
240  }
241 
242  $this->readFirstOrs();
243  }
244  return true;
245  }
$res
Definition: ltiservices.php:66
setOrCompositeId(int $a_or_composite_id)
setRBACId(int $a_id)
readFirstOrs()
Compatibility fix for legacy MD classes for new db tables.
setObjId(int $a_id)
setParentId(int $a_id)
setParentType(string $a_parent_type)
setObjType(string $a_type)
+ Here is the call graph for this function:

◆ readFirstOrs()

ilMDRequirement::readFirstOrs ( )
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 396 of file class.ilMDRequirement.php.

References $res, getOrIdBrowser(), getOrIdOS(), setBrowserMaximumVersion(), setBrowserMinimumVersion(), setBrowserName(), setOperatingSystemMaximumVersion(), setOperatingSystemMinimumVersion(), and setOperatingSystemName().

Referenced by read().

396  : void
397  {
398  $query = "SELECT * FROM il_meta_or_composite WHERE meta_or_composite_id = " .
399  $this->db->quote($this->getOrIdOS(), 'integer') .
400  " OR meta_or_composite_id = " . $this->db->quote($this->getOrIdBrowser(), 'integer');
401 
402  $res = $this->db->query($query);
403  while ($row = $this->db->fetchAssoc($res)) {
404  switch ($row['type']) {
405  case 'operating system':
406  if (key_exists($row['name'] ?? '', self::OS_TRANSLATION)) {
407  $row['name'] = self::OS_TRANSLATION[$row['name'] ?? ''];
408  }
409  $this->setOperatingSystemName($row['name'] ?? '');
410  $this->setOperatingSystemMinimumVersion($row['min_version'] ?? '');
411  $this->setOperatingSystemMaximumVersion($row['max_version'] ?? '');
412  break;
413 
414  case 'browser':
415  if (key_exists($row['name'] ?? '', self::BROWSER_TRANSLATION)) {
416  $row['name'] = self::BROWSER_TRANSLATION[$row['name'] ?? ''];
417  }
418  $this->setBrowserName($row['name'] ?? '');
419  $this->setBrowserMinimumVersion($row['min_version'] ?? '');
420  $this->setBrowserMaximumVersion($row['max_version'] ?? '');
421  break;
422  }
423  }
424  }
$res
Definition: ltiservices.php:66
setOperatingSystemMaximumVersion(string $a_val)
setBrowserMinimumVersion(string $a_val)
setOperatingSystemMinimumVersion(string $a_val)
setBrowserName(string $a_val)
setBrowserMaximumVersion(string $a_val)
setOperatingSystemName(string $a_val)
getOrIdOS()
Compatibility fix for legacy MD classes for new db tables.
getOrIdBrowser()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readOrIds()

ilMDRequirement::readOrIds ( int  $parent_id)
protected

Compatibility fix for legacy MD classes for new db tables.

Definition at line 429 of file class.ilMDRequirement.php.

References $res, and ILIAS\Repository\int().

Referenced by setMetaId().

429  : void
430  {
431  $query = "SELECT meta_or_composite_id, type FROM il_meta_or_composite WHERE
432  parent_id = " . $this->db->quote($parent_id, 'integer') .
433  " ORDER BY meta_or_composite_id";
434 
435  $res = $this->db->query($query);
436  $browser_id = 0;
437  $os_id = 0;
438  while ($row = $this->db->fetchAssoc($res)) {
439  if (!$browser_id && $row['type'] === 'browser') {
440  $browser_id = (int) $row['meta_or_composite_id'];
441  }
442  if (!$os_id && $row['type'] === 'operating system') {
443  $os_id = (int) $row['meta_or_composite_id'];
444  }
445  if ($browser_id && $os_id) {
446  break;
447  }
448  }
449 
450  $this->or_id_browser = $browser_id;
451  $this->or_id_os = $os_id;
452  }
$res
Definition: ltiservices.php:66
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilMDRequirement::save ( )

Definition at line 158 of file class.ilMDRequirement.php.

References __getFields(), createOrUpdateOrs(), ilMDBase\getMetaId(), and setMetaId().

158  : int
159  {
160  $fields = $this->__getFields();
161  $fields['meta_requirement_id'] = array('integer', $next_id = $this->db->nextId('il_meta_requirement'));
162 
163  if ($this->db->insert('il_meta_requirement', $fields)) {
164  $this->setMetaId($next_id);
165  $this->createOrUpdateOrs();
166  return $this->getMetaId();
167  }
168  return 0;
169  }
setMetaId(int $a_meta_id, bool $a_read_data=true)
Compatibility fix for legacy MD classes for new db tables.
createOrUpdateOrs()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:

◆ setBrowserMaximumVersion()

ilMDRequirement::setBrowserMaximumVersion ( string  $a_val)

Definition at line 148 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

148  : void
149  {
150  $this->browser_maximum_version = $a_val;
151  }
+ Here is the caller graph for this function:

◆ setBrowserMinimumVersion()

ilMDRequirement::setBrowserMinimumVersion ( string  $a_val)

Definition at line 138 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

138  : void
139  {
140  $this->browser_minimum_version = $a_val;
141  }
+ Here is the caller graph for this function:

◆ setBrowserName()

ilMDRequirement::setBrowserName ( string  $a_val)

Definition at line 116 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

116  : bool
117  {
118  switch ($a_val) {
119  case 'Any':
120  case 'NetscapeCommunicator':
121  case 'MS-InternetExplorer':
122  case 'Opera':
123  case 'Amaya':
124  case 'Mozilla':
125  $this->browser_name = $a_val;
126  return true;
127 
128  default:
129  return false;
130  }
131  }
+ Here is the caller graph for this function:

◆ setMetaId()

ilMDRequirement::setMetaId ( int  $a_meta_id,
bool  $a_read_data = true 
)

Compatibility fix for legacy MD classes for new db tables.

Definition at line 473 of file class.ilMDRequirement.php.

References readOrIds().

Referenced by save().

473  : void
474  {
475  $this->readOrIds($a_meta_id);
476  parent::setMetaId($a_meta_id, $a_read_data);
477  }
readOrIds(int $parent_id)
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOperatingSystemMaximumVersion()

ilMDRequirement::setOperatingSystemMaximumVersion ( string  $a_val)

Definition at line 106 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

106  : void
107  {
108  $this->operating_system_maximum_version = $a_val;
109  }
+ Here is the caller graph for this function:

◆ setOperatingSystemMinimumVersion()

ilMDRequirement::setOperatingSystemMinimumVersion ( string  $a_val)

Definition at line 96 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

96  : void
97  {
98  $this->operating_system_minimum_version = $a_val;
99  }
+ Here is the caller graph for this function:

◆ setOperatingSystemName()

ilMDRequirement::setOperatingSystemName ( string  $a_val)

Definition at line 74 of file class.ilMDRequirement.php.

Referenced by readFirstOrs().

74  : bool
75  {
76  switch ($a_val) {
77  case 'PC-DOS':
78  case 'MS-Windows':
79  case 'MacOS':
80  case 'Unix':
81  case 'Multi-OS':
82  case 'None':
83  $this->operating_system_name = $a_val;
84  return true;
85 
86  default:
87  return false;
88  }
89  }
+ Here is the caller graph for this function:

◆ setOrCompositeId()

ilMDRequirement::setOrCompositeId ( int  $a_or_composite_id)

Definition at line 64 of file class.ilMDRequirement.php.

Referenced by read().

64  : void
65  {
66  $this->or_composite_id = $a_or_composite_id;
67  }
+ Here is the caller graph for this function:

◆ toXML()

ilMDRequirement::toXML ( ilXmlWriter  $writer)

Definition at line 252 of file class.ilMDRequirement.php.

References getBrowserMaximumVersion(), getBrowserMinimumVersion(), getBrowserName(), getOperatingSystemMaximumVersion(), getOperatingSystemMinimumVersion(), getOperatingSystemName(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

252  : void
253  {
254  $writer->xmlStartTag('Requirement');
255  $writer->xmlStartTag('Type');
256 
257  if ($this->getOperatingSystemName() !== '') {
258  $writer->xmlElement('OperatingSystem', array(
259  'Name' => $this->getOperatingSystemName() ?: 'None',
260  'MinimumVersion' => $this->getOperatingSystemMinimumVersion(),
261  'MaximumVersion' => $this->getOperatingSystemMaximumVersion()
262  ));
263  }
264  if ($this->getBrowserName() !== '') {
265  $writer->xmlElement('Browser', array(
266  'Name' => $this->getBrowserName() ?: 'Any',
267  'MinimumVersion' => $this->getBrowserMinimumVersion(),
268  'MaximumVersion' => $this->getBrowserMaximumVersion()
269  ));
270  }
271  $writer->xmlEndTag('Type');
272  $writer->xmlEndTag('Requirement');
273  }
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
+ Here is the call graph for this function:

◆ update()

ilMDRequirement::update ( )

Definition at line 171 of file class.ilMDRequirement.php.

References __getFields(), createOrUpdateOrs(), and ilMDBase\getMetaId().

171  : bool
172  {
173  if (!$this->getMetaId()) {
174  return false;
175  }
176 
177  $this->createOrUpdateOrs();
178 
179  return (bool) $this->db->update(
180  'il_meta_requirement',
181  $this->__getFields(),
182  array("meta_requirement_id" => array('integer', $this->getMetaId()))
183  );
184  }
createOrUpdateOrs()
Compatibility fix for legacy MD classes for new db tables.
+ Here is the call graph for this function:

Field Documentation

◆ $browser_maximum_version

string ilMDRequirement::$browser_maximum_version = ''
private

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

Referenced by getBrowserMaximumVersion().

◆ $browser_minimum_version

string ilMDRequirement::$browser_minimum_version = ''
private

Definition at line 54 of file class.ilMDRequirement.php.

Referenced by getBrowserMinimumVersion().

◆ $browser_name

string ilMDRequirement::$browser_name = ''
private

Definition at line 53 of file class.ilMDRequirement.php.

Referenced by getBrowserName().

◆ $operating_system_maximum_version

string ilMDRequirement::$operating_system_maximum_version = ''
private

Definition at line 52 of file class.ilMDRequirement.php.

Referenced by getOperatingSystemMaximumVersion().

◆ $operating_system_minimum_version

string ilMDRequirement::$operating_system_minimum_version = ''
private

Definition at line 51 of file class.ilMDRequirement.php.

Referenced by getOperatingSystemMinimumVersion().

◆ $operating_system_name

string ilMDRequirement::$operating_system_name = ''
private

Definition at line 50 of file class.ilMDRequirement.php.

Referenced by getOperatingSystemName().

◆ $or_composite_id

const const int ilMDRequirement::$or_composite_id = 0
private

Definition at line 49 of file class.ilMDRequirement.php.

Referenced by getOrCompositeId().

◆ $or_id_browser

int ilMDRequirement::$or_id_browser = 0
private

Compatibility fix for legacy MD classes for new db tables.

Definition at line 60 of file class.ilMDRequirement.php.

◆ $or_id_os

int ilMDRequirement::$or_id_os = 0
private

Definition at line 61 of file class.ilMDRequirement.php.

◆ BROWSER_TRANSLATION

const const ilMDRequirement::BROWSER_TRANSLATION
private
Initial value:
= [
'any' => 'Any'

Definition at line 41 of file class.ilMDRequirement.php.

◆ OS_TRANSLATION

const ilMDRequirement::OS_TRANSLATION
private
Initial value:
= [
'pc-dos' => 'PC-DOS'

Compatibility fix for legacy MD classes for new db tables.

Definition at line 32 of file class.ilMDRequirement.php.


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