ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTMultiEnumPresentationBridge.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected function isValidADT(ilADT $a_adt): bool
24 {
25 return ($a_adt instanceof ilADTMultiEnum);
26 }
27
28 public function getHTML(): string
29 {
30 if (!$this->getADT()->isNull()) {
31 $res = array();
32
33 $options = $this->getADT()->getCopyOfDefinition()->getOptions();
34 foreach ((array) $this->getADT()->getSelections() as $value) {
35 if (array_key_exists($value, $options)) {
36 $res[] = $this->decorate($options[$value]);
37 }
38 }
39
40 return implode(", ", $res);
41 }
42 return '';
43 }
44
45 public function getSortable()
46 {
47 if (!$this->getADT()->isNull()) {
48 return implode(";", (array) $this->getADT()->getSelections());
49 }
50 return '';
51 }
52}
ADT presentation bridge base class.
ADT base class.
Definition: class.ilADT.php:26
$res
Definition: ltiservices.php:69