ILIAS  release_8 Revision v8.23
class.ilADTEnumPresentationBridge.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 {
7  protected function isValidADT(ilADT $a_adt): bool
8  {
9  return ($a_adt instanceof ilADTEnum);
10  }
11 
12  public function getHTML(): string
13  {
14  if (!$this->getADT()->isNull()) {
15  $options = $this->getADT()->getCopyOfDefinition()->getOptions();
16  $value = $this->getADT()->getSelection();
17  if (array_key_exists($value, $options)) {
18  return $this->decorate($options[$value]);
19  }
20  }
21  return '';
22  }
23 
24  public function getSortable()
25  {
26  if (!$this->getADT()->isNull()) {
27  return $this->getADT()->getSelection();
28  }
29  return '';
30  }
31 }
decorate($a_value)
Decorate value.
ADT base class.
Definition: class.ilADT.php:11
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...