ILIAS  release_7 Revision v7.30-3-g800a261c036
ilADTLocalizedTextPresentationBridge Class Reference

Class ilADTLocalizedTextPresentationBridge. More...

+ Inheritance diagram for ilADTLocalizedTextPresentationBridge:
+ Collaboration diagram for ilADTLocalizedTextPresentationBridge:

Public Member Functions

 __construct (ilADT $a_adt)
 Constructor. More...
 
 getHTML ()
 Get HTML presentation. More...
 
 getSortable ()
 Get sortable value presentation. More...
 
 getHTML ()
 Get HTML presentation. More...
 
 getSortable ()
 Get sortable value presentation. More...
 
- Public Member Functions inherited from ilADTPresentationBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 Get ADT. More...
 
 getList ()
 Get list presentation. More...
 
 getHTML ()
 Get HTML presentation. More...
 
 getSortable ()
 Get sortable value presentation. More...
 
 setDecoratorCallBack ($a_callback)
 Set decorator callback. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
- Protected Member Functions inherited from ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 
 decorate ($a_value)
 Decorate value. More...
 

Private Attributes

 $lng
 

Additional Inherited Members

- Protected Attributes inherited from ilADTPresentationBridge
 $adt
 
 $decorator
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilADTLocalizedTextPresentationBridge::__construct ( ilADT  $a_adt)

Constructor.

Parameters
ilADT$a_adt
Returns
self

Reimplemented from ilADTPresentationBridge.

Definition at line 12 of file class.ilADTLocalizedTextPresentationBridge.php.

13 {
14 global $DIC;
15
16 $this->lng = $DIC->language();
17
18 parent::__construct($a_adt);
19 }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilADTLocalizedTextPresentationBridge::getHTML ( )

Get HTML presentation.

Returns
string

Reimplemented from ilADTTextPresentationBridge.

Definition at line 26 of file class.ilADTLocalizedTextPresentationBridge.php.

27 {
28 if (!$this->getADT()->isNull()) {
29 return $this->decorate(nl2br($this->getADT()->getTextForLanguage($this->lng->getLangKey())));
30 }
31 }

References ilADTPresentationBridge\decorate(), and ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ getSortable()

ilADTLocalizedTextPresentationBridge::getSortable ( )

Get sortable value presentation.

Returns
mixed

Reimplemented from ilADTTextPresentationBridge.

Definition at line 33 of file class.ilADTLocalizedTextPresentationBridge.php.

34 {
35 if (!$this->getADT()->isNull()) {
36 return strtolower($this->getADT()->getTextForLanguage($this->lng->getLangKey()));
37 }
38 }

References ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ isValidADT()

ilADTLocalizedTextPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Check if given ADT is valid.

:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?

Parameters
ilADT$a_adt

Reimplemented from ilADTTextPresentationBridge.

Definition at line 21 of file class.ilADTLocalizedTextPresentationBridge.php.

22 {
23 return $a_adt instanceof ilADTLocalizedText;
24 }
Class ilADTLocalizedText.

Field Documentation

◆ $lng

ilADTLocalizedTextPresentationBridge::$lng
private

The documentation for this class was generated from the following file: