ILIAS  release_8 Revision v8.24
class.ilADTLocalizedTextPresentationBridge.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
5
11{
12 public function __construct(ilADT $a_adt)
13 {
14 parent::__construct($a_adt);
15 }
16
17 protected function isValidADT(ilADT $a_adt): bool
18 {
19 return $a_adt instanceof ilADTLocalizedText;
20 }
21
22 public function getHTML(): string
23 {
24 if (!$this->getADT()->isNull()) {
25 return $this->decorate(nl2br($this->getADT()->getTextForLanguage($this->lng->getLangKey())));
26 }
27 return '';
28 }
29
30 public function getSortable()
31 {
32 if (!$this->getADT()->isNull()) {
33 return strtolower($this->getADT()->getTextForLanguage($this->lng->getLangKey()));
34 }
35 return '';
36 }
37}
Class ilADTLocalizedText.
ADT base class.
Definition: class.ilADT.php:12
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc