ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilLTIConsumerProviderSelectionFormTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
15{
19 protected $table;
20
29 public function __construct($newType, $parentGui, $parentCmd, $applyFilterCmd, $resetFilterCmd)
30 {
31 global $DIC; /* @var \ILIAS\DI\Container $DIC */
32
33 $this->table = new ilLTIConsumerProviderTableGUI($parentGui, $parentCmd);
34
35 $this->table->setFilterCommand($applyFilterCmd);
36 $this->table->setResetCommand($resetFilterCmd);
37
38 $this->table->setSelectProviderCmd('save');
39 $this->table->setOwnProviderColumnEnabled(true);
40
41 $this->table->setDefaultFilterVisiblity(true);
42 $this->table->setDisableFilterHiding(true);
43
44 $this->table->init();
45
46 $this->setTitle($DIC->language()->txt($newType . '_select_provider'));
47 }
48
49 public function setTitle($title)
50 {
51 $this->table->setTitle($title);
52 }
53
54 public function getTitle()
55 {
56 return $this->table->getTitle();
57 }
58
59 public function getHTML()
60 {
61 return $this->table->getHTML();
62 }
63
64 public function applyFilter()
65 {
66 $this->table->writeFilterToSession();
67 $this->table->resetOffset();
68 }
69
70 public function resetFilter()
71 {
72 $this->table->resetFilter();
73 $this->table->resetOffset();
74 }
75
76 public function getFilter($field)
77 {
78 $field = $this->table->getFilterItemByPostVar($field);
79
80 if ($field instanceof ilCheckboxInputGUI) {
81 return (bool) $field->getChecked();
82 }
83
84 return $field->getValue();
85 }
86
87 public function setData($data)
88 {
89 $this->table->setData($data);
90 }
91}
An exception for terminatinating execution or to throw for unit testing.
This class represents a checkbox property in a property form.
__construct($newType, $parentGui, $parentCmd, $applyFilterCmd, $resetFilterCmd)
ilLTIConsumerProviderSelectionFormGUI constructor.
This class represents a property form user interface.
$data
Definition: storeScorm.php:23
$DIC
Definition: xapitoken.php:46