ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 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)
 
 prepareElements ()
 
- 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...
 

Protected Attributes

 $elements = []
 
- Protected Attributes inherited from ilADTPresentationBridge
 $adt
 
 $decorator
 

Detailed Description

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

Member Function Documentation

◆ getHTML()

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

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

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

31  {
32  $res = array();
33 
34  $this->prepareElements();
35  foreach ($this->elements as $element) {
36  $res[] = $this->decorate($element->getHTML());
37  }
38 
39  if (sizeof($res)) {
40  return implode($delimiter, $res);
41  }
42  }
$delimiter
Definition: showstats.php:16
decorate($a_value)
Decorate value.
foreach($_POST as $key=> $value) $res
+ Here is the call graph for this function:

◆ getSortable()

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

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

References $delimiter, $res, and prepareElements().

45  {
46  $res = array();
47 
48  $this->prepareElements();
49  foreach ($this->elements as $element) {
50  $res[] = $element->getSortable();
51  }
52 
53  if (sizeof($res)) {
54  return implode($delimiter, $res);
55  }
56  }
$delimiter
Definition: showstats.php:16
foreach($_POST as $key=> $value) $res
+ Here is the call graph for this function:

◆ isValidADT()

ilADTGroupPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

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

10  {
11  return ($a_adt instanceof ilADTGroup);
12  }

◆ prepareElements()

ilADTGroupPresentationBridge::prepareElements ( )
protected

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

References $factory, $name, ilADTPresentationBridge\getADT(), and ilADTFactory\getInstance().

Referenced by getHTML(), and getSortable().

15  {
16  if (sizeof($this->elements)) {
17  return;
18  }
19 
20  $this->elements = array();
22 
23  // convert ADTs to presentation bridges
24 
25  foreach ($this->getADT()->getElements() as $name => $element) {
26  $this->elements[$name] = $factory->getPresentationBridgeForInstance($element);
27  }
28  }
$factory
Definition: metadata.php:43
static getInstance()
Get singleton.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $elements

ilADTGroupPresentationBridge::$elements = []
protected

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


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