ILIAS  release_8 Revision v8.23
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)
 
 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 ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 
 decorate ($a_value)
 Decorate value. More...
 

Additional Inherited Members

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

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 ilADTPresentationBridge\decorate(), and ilADTPresentationBridge\getADT().

12  : string
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  return '';
30  }
decorate($a_value)
Decorate value.
+ Here is the call graph for this function:

◆ getSortable()

ilADTFloatPresentationBridge::getSortable ( )

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

References ilADTPresentationBridge\getADT().

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

◆ isValidADT()

ilADTFloatPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

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

7  : bool
8  {
9  return ($a_adt instanceof ilADTFloat);
10  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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