ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTIntegerPresentationBridge.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 ilADTInteger);
26 }
27
28 public function getHTML(): string
29 {
30 if (!$this->getADT()->isNull()) {
31 $def = $this->getADT()->getCopyOfDefinition();
32 $suffix = $def->getSuffix() ? " " . $def->getSuffix() : null;
33
34 $presentation_value = $this->getADT()->getNumber() . $suffix;
35
36 return $this->decorate($presentation_value);
37 }
38 return '';
39 }
40
41 public function getSortable()
42 {
43 if (!$this->getADT()->isNull()) {
44 return $this->getADT()->getNumber();
45 }
46 return 0;
47 }
48}
getSortable()
Get sortable value presentation.
ADT presentation bridge base class.
ADT base class.
Definition: class.ilADT.php:26