ILIAS  release_8 Revision v8.24
ilTermsOfServiceAcceptanceHistoryGUI Class Reference

Class ilTermsOfServiceAcceptanceHistoryGUI. More...

+ Inheritance diagram for ilTermsOfServiceAcceptanceHistoryGUI:
+ Collaboration diagram for ilTermsOfServiceAcceptanceHistoryGUI:

Public Member Functions

 __construct (ilObjTermsOfService $tos, ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, ilGlobalTemplateInterface $tpl, ilCtrlInterface $ctrl, ilLanguage $lng, ilRbacSystem $rbacsystem, ilErrorHandling $error, GlobalHttpState $http, \ILIAS\Refinery\Factory $refinery, Factory $uiFactory, Renderer $uiRenderer, ilTermsOfServiceTableDataProviderFactory $tableDataProviderFactory)
 
 executeCommand ()
 The implemented class should be ilCtrlInterface enabled and execute or forward the given command. More...
 
 executeCommand ()
 The implemented class should be ilCtrlInterface enabled and execute or forward the given command. More...
 

Protected Member Functions

 getAcceptanceHistoryTable ()
 
 showAcceptanceHistory ()
 
 applyAcceptanceHistoryFilter ()
 
 resetAcceptanceHistoryFilter ()
 
 addUserAutoComplete ()
 

Protected Attributes

ilTermsOfServiceTableDataProviderFactory $tableDataProviderFactory
 
ilObjTermsOfService $tos
 
ilGlobalTemplateInterface $tpl
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
ilRbacSystem $rbacsystem
 
ilErrorHandling $error
 
Factory $uiFactory
 
Renderer $uiRenderer
 
GlobalHttpState $http
 
ILIAS Refinery Factory $refinery
 
ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTermsOfServiceAcceptanceHistoryGUI::__construct ( ilObjTermsOfService  $tos,
ilTermsOfServiceCriterionTypeFactoryInterface  $criterionTypeFactory,
ilGlobalTemplateInterface  $tpl,
ilCtrlInterface  $ctrl,
ilLanguage  $lng,
ilRbacSystem  $rbacsystem,
ilErrorHandling  $error,
GlobalHttpState  $http,
\ILIAS\Refinery\Factory  $refinery,
Factory  $uiFactory,
Renderer  $uiRenderer,
ilTermsOfServiceTableDataProviderFactory  $tableDataProviderFactory 
)

Definition at line 46 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

59 {
60 $this->tos = $tos;
61 $this->criterionTypeFactory = $criterionTypeFactory;
62 $this->tpl = $tpl;
63 $this->ctrl = $ctrl;
64 $this->lng = $lng;
65 $this->rbacsystem = $rbacsystem;
66 $this->error = $error;
67 $this->http = $http;
68 $this->refinery = $refinery;
69 $this->uiFactory = $uiFactory;
70 $this->uiRenderer = $uiRenderer;
71 $this->tableDataProviderFactory = $tableDataProviderFactory;
72 }
error(string $a_errmsg)
ilTermsOfServiceTableDataProviderFactory $tableDataProviderFactory
ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory
static http()
Fetches the global http state from ILIAS.

References $criterionTypeFactory, $ctrl, $error, $http, $lng, $rbacsystem, $refinery, $tableDataProviderFactory, $tos, $tpl, $uiFactory, $uiRenderer, ILIAS\Repository\ctrl(), error(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ addUserAutoComplete()

ilTermsOfServiceAcceptanceHistoryGUI::addUserAutoComplete ( )
protected

Definition at line 138 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

138 : void
139 {
140 $auto = new ilUserAutoComplete();
141 $auto->setSearchFields(['login', 'firstname', 'lastname', 'email']);
142 $auto->enableFieldSearchableCheck(false);
143 $auto->setMoreLinkAvailable(true);
144
145 if ($this->http->wrapper()->query()->has('fetchall')) {
146 $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
147 }
148
149 if ($this->http->wrapper()->query()->has('term')) {
151 $this->http->wrapper()->query()->retrieve('term', $this->refinery->kindlyTo()->string())
152 );
153 $this->http->saveResponse(
154 $this->http->response()
155 ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
156 ->withBody(
157 Streams::ofString($auto->getList($query))
158 )
159 );
160 }
161
162 $this->http->sendResponse();
163 $this->http->close();
164 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$query

References $query, ILIAS\FileDelivery\http(), ilUserAutoComplete\MAX_ENTRIES, and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ applyAcceptanceHistoryFilter()

ilTermsOfServiceAcceptanceHistoryGUI::applyAcceptanceHistoryFilter ( )
protected

Definition at line 120 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

120 : void
121 {
122 $table = $this->getAcceptanceHistoryTable();
123 $table->resetOffset();
124 $table->writeFilterToSession();
125
126 $this->showAcceptanceHistory();
127 }

References getAcceptanceHistoryTable(), and showAcceptanceHistory().

+ Here is the call graph for this function:

◆ executeCommand()

ilTermsOfServiceAcceptanceHistoryGUI::executeCommand ( )

The implemented class should be ilCtrlInterface enabled and execute or forward the given command.

Implements ilTermsOfServiceControllerEnabled.

Definition at line 74 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

74 : void
75 {
76 $nextClass = $this->ctrl->getNextClass($this);
77 $cmd = $this->ctrl->getCmd();
78
79 if (
80 (defined('USER_FOLDER_ID') && !$this->rbacsystem->checkAccess('read', USER_FOLDER_ID)) ||
81 !$this->rbacsystem->checkAccess('read', $this->tos->getRefId())
82 ) {
83 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
84 }
85
86 switch (strtolower($nextClass)) {
87 default:
88 if ($cmd === null || $cmd === '' || !method_exists($this, $cmd)) {
89 $cmd = 'showAcceptanceHistory';
90 }
91 $this->$cmd();
92 break;
93 }
94 }
const USER_FOLDER_ID
Definition: constants.php:33

References ILIAS\Repository\ctrl(), error(), ILIAS\Repository\lng(), and USER_FOLDER_ID.

+ Here is the call graph for this function:

◆ getAcceptanceHistoryTable()

ilTermsOfServiceAcceptanceHistoryGUI::getAcceptanceHistoryTable ( )
protected

Definition at line 96 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

97 {
99 $this,
100 'showAcceptanceHistory',
101 $this->criterionTypeFactory,
102 $this->uiFactory,
103 $this->uiRenderer,
104 $this->tpl
105 );
106 $table->setProvider($this->tableDataProviderFactory->getByContext(ilTermsOfServiceTableDataProviderFactory::CONTEXT_ACCEPTANCE_HISTORY));
107
108 return $table;
109 }

References ilTermsOfServiceTableDataProviderFactory\CONTEXT_ACCEPTANCE_HISTORY.

Referenced by applyAcceptanceHistoryFilter(), resetAcceptanceHistoryFilter(), and showAcceptanceHistory().

+ Here is the caller graph for this function:

◆ resetAcceptanceHistoryFilter()

ilTermsOfServiceAcceptanceHistoryGUI::resetAcceptanceHistoryFilter ( )
protected

Definition at line 129 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

129 : void
130 {
131 $table = $this->getAcceptanceHistoryTable();
132 $table->resetOffset();
133 $table->resetFilter();
134
135 $this->showAcceptanceHistory();
136 }

References getAcceptanceHistoryTable(), and showAcceptanceHistory().

+ Here is the call graph for this function:

◆ showAcceptanceHistory()

ilTermsOfServiceAcceptanceHistoryGUI::showAcceptanceHistory ( )
protected

Definition at line 111 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

111 : void
112 {
113 $table = $this->getAcceptanceHistoryTable();
114
115 $table->populate();
116
117 $this->tpl->setContent($table->getHTML());
118 }

References getAcceptanceHistoryTable().

Referenced by applyAcceptanceHistoryFilter(), and resetAcceptanceHistoryFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $criterionTypeFactory

ilTermsOfServiceCriterionTypeFactoryInterface ilTermsOfServiceAcceptanceHistoryGUI::$criterionTypeFactory
protected

Definition at line 44 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $ctrl

ilCtrlInterface ilTermsOfServiceAcceptanceHistoryGUI::$ctrl
protected

Definition at line 36 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $error

ilErrorHandling ilTermsOfServiceAcceptanceHistoryGUI::$error
protected

Definition at line 39 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $http

GlobalHttpState ilTermsOfServiceAcceptanceHistoryGUI::$http
protected

Definition at line 42 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $lng

ilLanguage ilTermsOfServiceAcceptanceHistoryGUI::$lng
protected

Definition at line 37 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $rbacsystem

ilRbacSystem ilTermsOfServiceAcceptanceHistoryGUI::$rbacsystem
protected

Definition at line 38 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $refinery

ILIAS Refinery Factory ilTermsOfServiceAcceptanceHistoryGUI::$refinery
protected

Definition at line 43 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $tableDataProviderFactory

ilTermsOfServiceTableDataProviderFactory ilTermsOfServiceAcceptanceHistoryGUI::$tableDataProviderFactory
protected

Definition at line 33 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $tos

ilObjTermsOfService ilTermsOfServiceAcceptanceHistoryGUI::$tos
protected

Definition at line 34 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $tpl

ilGlobalTemplateInterface ilTermsOfServiceAcceptanceHistoryGUI::$tpl
protected

Definition at line 35 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $uiFactory

Factory ilTermsOfServiceAcceptanceHistoryGUI::$uiFactory
protected

Definition at line 40 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().

◆ $uiRenderer

Renderer ilTermsOfServiceAcceptanceHistoryGUI::$uiRenderer
protected

Definition at line 41 of file class.ilTermsOfServiceAcceptanceHistoryGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: