ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ilADTDatePresentationBridge Class Reference
+ Inheritance diagram for ilADTDatePresentationBridge:
+ Collaboration diagram for ilADTDatePresentationBridge:

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 21 of file class.ilADTDatePresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTDatePresentationBridge::getHTML ( )

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

References ilADTPresentationBridge\decorate(), ilDatePresentation\formatDate(), and ilADTPresentationBridge\getADT().

28  : string
29  {
30  if (!$this->getADT()->isNull()) {
31  // :TODO: relative dates?
32 
33  return $this->decorate(ilDatePresentation::formatDate($this->getADT()->getDate()));
34  }
35  return '';
36  }
decorate($a_value)
Decorate value.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
+ Here is the call graph for this function:

◆ getSortable()

ilADTDatePresentationBridge::getSortable ( )

Definition at line 38 of file class.ilADTDatePresentationBridge.php.

References ilADTPresentationBridge\getADT(), and IL_CAL_UNIX.

39  {
40  if (!$this->getADT()->isNull()) {
41  return (int) $this->getADT()->getDate()->get(IL_CAL_UNIX);
42  }
43  return 0;
44  }
const IL_CAL_UNIX
+ Here is the call graph for this function:

◆ isValidADT()

ilADTDatePresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Definition at line 23 of file class.ilADTDatePresentationBridge.php.

23  : bool
24  {
25  return ($a_adt instanceof ilADTDate);
26  }

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