ILIAS  release_7 Revision v7.30-3-g800a261c036
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
10
11class Presentation extends Table implements T\Presentation
12{
15
20
24 private $row_mapping;
25
29 private $records;
30
34 private $environment;
35
36
37
38 public function __construct($title, array $view_controls, \Closure $row_mapping, SignalGeneratorInterface $signal_generator)
39 {
40 $this->checkStringArg("string", $title);
41 $this->title = $title;
42 $this->view_controls = $view_controls;
43 $this->row_mapping = $row_mapping;
44 $this->signal_generator = $signal_generator;
45 }
46
50 public function getSignalGenerator()
51 {
53 }
54
58 public function withRowMapping(\Closure $row_mapping)
59 {
60 $clone = clone $this;
61 $clone->row_mapping = $row_mapping;
62 return $clone;
63 }
64
68 public function getRowMapping()
69 {
70 return $this->row_mapping;
71 }
72
76 public function withEnvironment(array $environment)
77 {
78 $clone = clone $this;
79 $clone->environment = $environment;
80 return $clone;
81 }
82
86 public function getEnvironment()
87 {
88 return $this->environment;
89 }
90
94 public function withData(array $records)
95 {
96 $clone = clone $this;
97 $clone->records = $records;
98 return $clone;
99 }
100
104 public function getData()
105 {
106 return $this->records;
107 }
108}
An exception for terminatinating execution or to throw for unit testing.
__construct($title, array $view_controls, \Closure $row_mapping, SignalGeneratorInterface $signal_generator)
clone(int $target_parent_obj_id)
trait HasViewControls
Trait for panels supporting view controls.
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
trait ComponentHelper
Provides common functionality for component implementations.