ILIAS  release_8 Revision v8.24
Presentation.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Implementation\Component\ComponentHelper;
27use Closure;
29
30class Presentation extends Table implements T\Presentation
31{
32 use ComponentHelper;
35
39 private array $environment = [];
40
41 private array $records;
43 private Closure $row_mapping;
44
45
46 public function __construct(
47 string $title,
48 array $view_controls,
49 Closure $row_mapping,
51 ) {
52 $this->title = $title;
53 $this->view_controls = $view_controls;
54 $this->row_mapping = $row_mapping;
55 $this->signal_generator = $signal_generator;
56 }
57
59 {
61 }
62
66 public function withRowMapping(Closure $row_mapping): T\Presentation
67 {
68 $clone = clone $this;
69 $clone->row_mapping = $row_mapping;
70 return $clone;
71 }
72
76 public function getRowMapping(): Closure
77 {
78 return $this->row_mapping;
79 }
80
85 {
86 $clone = clone $this;
87 $clone->environment = $environment;
88 return $clone;
89 }
90
94 public function getEnvironment(): array
95 {
96 return $this->environment;
97 }
98
102 public function withData(array $records): T\Presentation
103 {
104 $clone = clone $this;
105 $clone->records = $records;
106 return $clone;
107 }
108
112 public function getData(): array
113 {
114 return $this->records;
115 }
116}
__construct(string $title, array $view_controls, Closure $row_mapping, SignalGeneratorInterface $signal_generator)
clone(ilDclStandardField $original_record)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait HasViewControls
Trait for panels supporting view controls.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.