ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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)
 Check if given ADT is valid. More...
 
 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 32 of file class.ilADTGroupPresentationBridge.php.

33 {
34 $res = array();
35
36 $this->prepareElements();
37 foreach($this->elements as $element)
38 {
39 $res[] = $this->decorate($element->getHTML());
40 }
41
42 if(sizeof($res))
43 {
44 return implode($delimiter, $res);
45 }
46 }

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

+ Here is the call graph for this function:

◆ getSortable()

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

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

49 {
50 $res = array();
51
52 $this->prepareElements();
53 foreach($this->elements as $element)
54 {
55 $res[] = $element->getSortable();
56 }
57
58 if(sizeof($res))
59 {
60 return implode($delimiter, $res);
61 }
62 }

References $res, and prepareElements().

+ Here is the call graph for this function:

◆ isValidADT()

ilADTGroupPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Check if given ADT is valid.

:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?

Parameters
ilADT$a_adt

Reimplemented from ilADTPresentationBridge.

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.

15 {
16 if(sizeof($this->elements))
17 {
18 return;
19 }
20
21 $this->elements = array();
22 $factory = ilADTFactory::getInstance();
23
24 // convert ADTs to presentation bridges
25
26 foreach($this->getADT()->getElements() as $name => $element)
27 {
28 $this->elements[$name] = $factory->getPresentationBridgeForInstance($element);
29 }
30 }
static getInstance()
Get singleton.

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

Referenced by getHTML(), and getSortable().

+ 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: