ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTEnumPresentationBridge.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 ilADTEnum);
26 }
27
28 public function getHTML(): string
29 {
30 if (!$this->getADT()->isNull()) {
31 $options = $this->getADT()->getCopyOfDefinition()->getOptions();
32 $value = $this->getADT()->getSelection();
33 if (array_key_exists($value, $options)) {
34 return $this->decorate($options[$value]);
35 }
36 }
37 return '';
38 }
39
40 public function getSortable()
41 {
42 if (!$this->getADT()->isNull()) {
43 return $this->getADT()->getSelection();
44 }
45 return '';
46 }
47}
getSortable()
Get sortable value presentation.
ADT presentation bridge base class.
ADT base class.
Definition: class.ilADT.php:26