ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Presentation.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2017 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
5
9
11{
13
18
22 private $title;
23
28
32 private $row_mapping;
33
37 private $records;
38
42 private $environment;
43
44
45
47 {
48 $this->checkStringArg("string", $title);
49 $this->title = $title;
50 $this->view_controls = $view_controls;
51 $this->row_mapping = $row_mapping;
52 $this->signal_generator = $signal_generator;
53 }
54
58 public function getSignalGenerator()
59 {
61 }
62
66 public function withTitle($title)
67 {
68 $this->checkStringArg("string", $title);
69 $clone = clone $this;
70 $clone->title = $title;
71 ;
72 return $clone;
73 }
74
78 public function getTitle()
79 {
80 return $this->title;
81 }
82
86 public function withViewControls(array $view_controls)
87 {
88 $clone = clone $this;
89 $clone->view_controls = $view_controls;
90 ;
91 return $clone;
92 }
93
97 public function getViewControls()
98 {
100 }
101
105 public function withRowMapping(\Closure $row_mapping)
106 {
107 $clone = clone $this;
108 $clone->row_mapping = $row_mapping;
109 ;
110 return $clone;
111 }
112
116 public function getRowMapping()
117 {
118 return $this->row_mapping;
119 }
120
124 public function withEnvironment(array $environment)
125 {
126 $clone = clone $this;
127 $clone->environment = $environment;
128 return $clone;
129 }
130
134 public function getEnvironment()
135 {
136 return $this->environment;
137 }
138
142 public function withData(array $records)
143 {
144 $clone = clone $this;
145 $clone->records = $records;
146 ;
147 return $clone;
148 }
149
153 public function getData()
154 {
155 return $this->records;
156 }
157}
An exception for terminatinating execution or to throw for unit testing.
__construct($title, array $view_controls, \Closure $row_mapping, SignalGeneratorInterface $signal_generator)
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
trait ComponentHelper
Provides common functionality for component implementations.