ILIAS  release_7 Revision v7.30-3-g800a261c036
ilADTMultiEnumPresentationBridge Class Reference
+ Inheritance diagram for ilADTMultiEnumPresentationBridge:
+ Collaboration diagram for ilADTMultiEnumPresentationBridge:

Public Member Functions

 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...
 
- 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...
 

Additional Inherited Members

- Protected Attributes inherited from ilADTPresentationBridge
 $adt
 
 $decorator
 

Detailed Description

Definition at line 5 of file class.ilADTMultiEnumPresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTMultiEnumPresentationBridge::getHTML ( )

Get HTML presentation.

Returns
string

Reimplemented from ilADTPresentationBridge.

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

13 {
14 if (!$this->getADT()->isNull()) {
15 $res = array();
16
17 $options = $this->getADT()->getCopyOfDefinition()->getOptions();
18 foreach ($this->getADT()->getSelections() as $value) {
19 if (array_key_exists($value, $options)) {
20 $res[] = $this->decorate($options[$value]);
21 }
22 }
23
24 return implode(", ", $res);
25 }
26 }
foreach($_POST as $key=> $value) $res

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

+ Here is the call graph for this function:

◆ getSortable()

ilADTMultiEnumPresentationBridge::getSortable ( )

Get sortable value presentation.

Returns
mixed

Reimplemented from ilADTPresentationBridge.

Definition at line 28 of file class.ilADTMultiEnumPresentationBridge.php.

29 {
30 if (!$this->getADT()->isNull()) {
31 return implode(";", $this->getADT()->getSelections());
32 }
33 }

References ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ isValidADT()

ilADTMultiEnumPresentationBridge::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 ilADTPresentationBridge.

Definition at line 7 of file class.ilADTMultiEnumPresentationBridge.php.

8 {
9 return ($a_adt instanceof ilADTMultiEnum);
10 }

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