ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilADTLocalizedTextPresentationBridge Class Reference

Class ilADTLocalizedTextPresentationBridge. More...

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

Public Member Functions

 __construct (ilADT $a_adt)
 
 getHTML ()
 
 getSortable ()
 
- Public Member Functions inherited from ilADTTextPresentationBridge
 getHTML ()
 
 getSortable ()
 
- Public Member Functions inherited from ilADTPresentationBridge
 __construct (ilADT $a_adt)
 
 getADT ()
 
 getList ()
 
 getHTML ()
 
 getSortable ()
 Get sortable value presentation. More...
 
 setDecoratorCallBack (?array $a_callback)
 Takes as input an array consisting of the object that the method that should be called back to belongs to, and a string with the name of the method. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 
- Protected Member Functions inherited from ilADTTextPresentationBridge
 isValidADT (ilADT $a_adt)
 
- Protected Member Functions inherited from ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 
 decorate ($a_value)
 Decorate value. More...
 

Private Member Functions

 getTextForCurrentLanguageIfAvailable ()
 

Additional Inherited Members

- Protected Attributes inherited from ilADTPresentationBridge
ilADT $adt
 
 $decorator
 
ilLanguage $lng
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilADTLocalizedTextPresentationBridge::__construct ( ilADT  $a_adt)

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

References ILIAS\GlobalScreen\Provider\__construct().

27  {
28  parent::__construct($a_adt);
29  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilADTLocalizedTextPresentationBridge::getHTML ( )

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

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

36  : string
37  {
38  if (!$this->getADT()->isNull()) {
39  return $this->decorate(nl2br($this->getTextForCurrentLanguageIfAvailable()));
40  }
41  return '';
42  }
decorate($a_value)
Decorate value.
+ Here is the call graph for this function:

◆ getSortable()

ilADTLocalizedTextPresentationBridge::getSortable ( )

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

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

44  : string
45  {
46  if (!$this->getADT()->isNull()) {
47  return strtolower($this->getTextForCurrentLanguageIfAvailable());
48  }
49  return '';
50  }
+ Here is the call graph for this function:

◆ getTextForCurrentLanguageIfAvailable()

ilADTLocalizedTextPresentationBridge::getTextForCurrentLanguageIfAvailable ( )
private

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

References ilADTPresentationBridge\getADT(), and ILIAS\Repository\lng().

Referenced by getHTML(), and getSortable().

52  : string
53  {
54  $language = $this->lng->getLangKey();
55  if (!$this->getADT()->getCopyOfDefinition()->getMultilingualValueSupport()) {
56  $language = $this->getADT()->getCopyOfDefinition()->getDefaultLanguage();
57  }
58  return $this->getADT()->getTextForLanguage($language);
59  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValidADT()

ilADTLocalizedTextPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

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

31  : bool
32  {
33  return $a_adt instanceof ilADTLocalizedText;
34  }
Class ilADTLocalizedText.

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