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

Public Member Functions

 getHTML ($delimiter="<br />")
 
 getSortable ($delimiter=";")
 
- 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)
 
 prepareElements ()
 
- Protected Member Functions inherited from ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 
 decorate ($a_value)
 Decorate value. More...
 

Protected Attributes

array $elements = []
 
- Protected Attributes inherited from ilADTPresentationBridge
ilADT $adt
 
 $decorator
 
ilLanguage $lng
 

Detailed Description

Definition at line 21 of file class.ilADTGroupPresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTGroupPresentationBridge::getHTML (   $delimiter = "<br />")

Definition at line 45 of file class.ilADTGroupPresentationBridge.php.

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

45  : string
46  {
47  $res = array();
48 
49  $this->prepareElements();
50  foreach ($this->elements as $element) {
51  $res[] = $this->decorate($element->getHTML());
52  }
53 
54  if (count($res)) {
55  return implode($delimiter, $res);
56  }
57  return '';
58  }
$res
Definition: ltiservices.php:66
decorate($a_value)
Decorate value.
+ Here is the call graph for this function:

◆ getSortable()

ilADTGroupPresentationBridge::getSortable (   $delimiter = ";")

Definition at line 60 of file class.ilADTGroupPresentationBridge.php.

References $res, and prepareElements().

61  {
62  $res = array();
63 
64  $this->prepareElements();
65  foreach ($this->elements as $element) {
66  $res[] = $element->getSortable();
67  }
68 
69  if (count($res)) {
70  return implode($delimiter, $res);
71  }
72  return '';
73  }
$res
Definition: ltiservices.php:66
+ Here is the call graph for this function:

◆ isValidADT()

ilADTGroupPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Definition at line 25 of file class.ilADTGroupPresentationBridge.php.

25  : bool
26  {
27  return ($a_adt instanceof ilADTGroup);
28  }

◆ prepareElements()

ilADTGroupPresentationBridge::prepareElements ( )
protected

Definition at line 30 of file class.ilADTGroupPresentationBridge.php.

References ilADTPresentationBridge\getADT(), and ilADTFactory\getInstance().

Referenced by getHTML(), and getSortable().

30  : void
31  {
32  if (count($this->elements)) {
33  return;
34  }
35 
36  $this->elements = array();
37  $factory = ilADTFactory::getInstance();
38 
39  // convert ADTs to presentation bridges
40  foreach ($this->getADT()->getElements() as $name => $element) {
41  $this->elements[$name] = $factory->getPresentationBridgeForInstance($element);
42  }
43  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $elements

array ilADTGroupPresentationBridge::$elements = []
protected

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


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