ILIAS  release_8 Revision v8.24
class.ilLTIConsumerProviderSelectionFormTableGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
30{
35
39 public function __construct(string $newType, ilObjLTIConsumerGUI $parentGui, string $parentCmd, string $applyFilterCmd, string $resetFilterCmd)
40 {
41 global $DIC; /* @var \ILIAS\DI\Container $DIC */
42
44
45 $this->table = new ilLTIConsumerProviderTableGUI($parentGui, $parentCmd);
46
47 $this->table->setFilterCommand($applyFilterCmd);
48 $this->table->setResetCommand($resetFilterCmd);
49
50 $this->table->setSelectProviderCmd('save');
51 $this->table->setOwnProviderColumnEnabled(true);
52
53 $this->table->setDefaultFilterVisiblity(true);
54 $this->table->setDisableFilterHiding(true);
55
56 $this->table->init();
57
58 $this->setTitle($DIC->language()->txt($newType . '_select_provider'));
59 }
60
61 public function setTitle(string $a_title): void
62 {
63 $this->table->setTitle($a_title);
64 }
65
66 public function getTitle(): string
67 {
68 return $this->table->getTitle();
69 }
70
71 public function getHTML(): string
72 {
73 return $this->table->getHTML();
74 }
75
76 public function applyFilter(): void
77 {
78 $this->table->writeFilterToSession();
79 $this->table->resetOffset();
80 }
81
82 public function resetFilter(): void
83 {
84 $this->table->resetFilter();
85 $this->table->resetOffset();
86 }
87
91 public function getFilter(string $a_field)
92 {
93 $field = $this->table->getFilterItemByPostVar($a_field);
94
95 if ($field instanceof ilCheckboxInputGUI) {
96 return $field->getChecked();
97 }
98
99 return $field->getValue();
100 }
101
102 public function setData(array $data): void
103 {
104 $this->table->setData($data);
105 }
106}
This class represents a checkbox property in a property form.
__construct(string $newType, ilObjLTIConsumerGUI $parentGui, string $parentCmd, string $applyFilterCmd, string $resetFilterCmd)
ilLTIConsumerProviderSelectionFormGUI constructor.
This class represents a property form user interface.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc