ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTFloatPresentationBridge Class Reference
+ Inheritance diagram for ilADTFloatPresentationBridge:
+ Collaboration diagram for ilADTFloatPresentationBridge:

Public Member Functions

 getHTML ()
 
 getSortable ()
 
- 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)
 
- 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.ilADTFloatPresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTFloatPresentationBridge::getHTML ( )

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

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

13  {
14  if (!$this->getADT()->isNull()) {
15  $def = $this->getADT()->getCopyOfDefinition();
16  $suffix = $def->getSuffix() ? " " . $def->getSuffix() : null;
17 
18  // :TODO: language specific?
19  $presentation_value = number_format(
20  $this->getADT()->getNumber(),
21  $this->getADT()->getCopyOfDefinition()->getDecimals(),
22  ",",
23  "."
24  ) .
25  $suffix;
26 
27  return $this->decorate($presentation_value);
28  }
29  }
decorate($a_value)
Decorate value.
$def
Definition: croninfo.php:21
+ Here is the call graph for this function:

◆ getSortable()

ilADTFloatPresentationBridge::getSortable ( )

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

References ilADTPresentationBridge\getADT().

32  {
33  if (!$this->getADT()->isNull()) {
34  return $this->getADT()->getNumber();
35  }
36  }
+ Here is the call graph for this function:

◆ isValidADT()

ilADTFloatPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

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: