ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilADTFloatPresentationBridge Class Reference
+ Inheritance diagram for ilADTFloatPresentationBridge:
+ Collaboration diagram for ilADTFloatPresentationBridge:

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

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

Additional Inherited Members

- Protected Attributes inherited from ilADTPresentationBridge
 $adt
 

Detailed Description

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

Member Function Documentation

◆ getHTML()

ilADTFloatPresentationBridge::getHTML ( )

Get HTML presentation.

Returns
string

Reimplemented from ilADTPresentationBridge.

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

13 {
14 if(!$this->getADT()->isNull())
15 {
16 $def = $this->getADT()->getCopyOfDefinition();
17 $suffix = $def->getSuffix() ? " ".$def->getSuffix() : null;
18
19 // :TODO: language specific?
20 return number_format($this->getADT()->getNumber(),
21 $this->getADT()->getCopyOfDefinition()->getDecimals(), ",", ".").
22 $suffix;
23 }
24 }

References ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ getSortable()

ilADTFloatPresentationBridge::getSortable ( )

Get sortable value presentation.

Returns
mixed

Reimplemented from ilADTPresentationBridge.

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

27 {
28 if(!$this->getADT()->isNull())
29 {
30 return $this->getADT()->getNumber();
31 }
32 }

References ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ isValidADT()

ilADTFloatPresentationBridge::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.ilADTFloatPresentationBridge.php.

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

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