ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilADTGroupPresentationBridge.php
Go to the documentation of this file.
1<?php
2
3require_once "Services/ADT/classes/Bridges/class.ilADTPresentationBridge.php";
4
6{
7 protected $elements = []; // [array]
8
9 protected function isValidADT(ilADT $a_adt)
10 {
11 return ($a_adt instanceof ilADTGroup);
12 }
13
14 protected function prepareElements()
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 }
29
30 public function getHTML($delimiter = "<br />")
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 }
43
44 public function getSortable($delimiter = ";")
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 }
57}
$factory
Definition: metadata.php:43
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get singleton.
isValidADT(ilADT $a_adt)
Check if given ADT is valid.
ADT presentation bridge base class.
ADT base class.
Definition: class.ilADT.php:12
foreach($_POST as $key=> $value) $res
$delimiter
Definition: showstats.php:16