ILIAS  release_8 Revision v8.23
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 5 of file class.ilADTGroupPresentationBridge.php.

Member Function Documentation

◆ getHTML()

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

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

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

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

◆ getSortable()

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

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

References $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 (count($res)) {
54  return implode($delimiter, $res);
55  }
56  return '';
57  }
$res
Definition: ltiservices.php:69
+ Here is the call graph for this function:

◆ isValidADT()

ilADTGroupPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

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

9  : bool
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().

14  : void
15  {
16  if (count($this->elements)) {
17  return;
18  }
19 
20  $this->elements = array();
22 
23  // convert ADTs to presentation bridges
24  foreach ($this->getADT()->getElements() as $name => $element) {
25  $this->elements[$name] = $factory->getPresentationBridgeForInstance($element);
26  }
27  }
if($format !==null) $name
Definition: metadata.php:247
$factory
Definition: metadata.php:75
+ 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 7 of file class.ilADTGroupPresentationBridge.php.


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