ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTermsOfServiceAcceptanceHistoryGUI Class Reference

Class ilTermsOfServiceAcceptanceHistoryGUI. More...

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

Public Member Functions

 __construct (\ilObjTermsOfService $tos, \ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory, \ilTemplate $tpl, \ilCtrl $ctrl, \ilLanguage $lng, \ilRbacSystem $rbacsystem, \ilErrorHandling $error, ServerRequestInterface $request, Factory $uiFactory, Renderer $uiRenderer, ilTermsOfServiceTableDataProviderFactory $tableDataProviderFactory)
 ilTermsOfServiceDocumentGUI constructor. More...
 
 executeCommand ()
 The implemented class should be enabled and execute or forward the given command. More...
 

Protected Member Functions

 getAcceptanceHistoryTable ()
 
 showAcceptanceHistory ()
 
 applyAcceptanceHistoryFilter ()
 
 resetAcceptanceHistoryFilter ()
 
 addUserAutoComplete ()
 Show auto complete results. More...
 

Protected Attributes

 $tableDataProviderFactory
 
 $tos
 
 $tpl
 
 $ctrl
 
 $lng
 
 $rbacsystem
 
 $error
 
 $uiFactory
 
 $uiRenderer
 
 $request
 
 $criterionTypeFactory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTermsOfServiceAcceptanceHistoryGUI::__construct ( \ilObjTermsOfService  $tos,
\ilTermsOfServiceCriterionTypeFactoryInterface  $criterionTypeFactory,
\ilTemplate  $tpl,
\ilCtrl  $ctrl,
\ilLanguage  $lng,
\ilRbacSystem  $rbacsystem,
\ilErrorHandling  $error,
ServerRequestInterface  $request,
Factory  $uiFactory,
Renderer  $uiRenderer,
ilTermsOfServiceTableDataProviderFactory  $tableDataProviderFactory 
)

ilTermsOfServiceDocumentGUI constructor.

Parameters
\ilObjTermsOfService$tos
\ilTermsOfServiceCriterionTypeFactoryInterface$criterionTypeFactory
\ilTemplate$tpl
\ilCtrl$ctrl
\ilLanguage$lng
\ilRbacSystem$rbacsystem
\ilErrorHandling$error
ServerRequestInterface$request
Factory$uiFactory
Renderer$uiRenderer
\ilTermsOfServiceTableDataProviderFactory$tableDataProviderFactory

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

References $criterionTypeFactory, $ctrl, $error, $lng, $rbacsystem, $request, $tableDataProviderFactory, $tos, $tpl, $uiFactory, and $uiRenderer.

73  {
74  $this->tos = $tos;
75  $this->criterionTypeFactory = $criterionTypeFactory;
76  $this->tpl = $tpl;
77  $this->ctrl = $ctrl;
78  $this->lng = $lng;
79  $this->rbacsystem = $rbacsystem;
80  $this->error = $error;
81  $this->request = $request;
82  $this->uiFactory = $uiFactory;
83  $this->uiRenderer = $uiRenderer;
84  $this->tableDataProviderFactory = $tableDataProviderFactory;
85  }

Member Function Documentation

◆ addUserAutoComplete()

ilTermsOfServiceAcceptanceHistoryGUI::addUserAutoComplete ( )
protected

Show auto complete results.

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

References $query, exit, ilUserAutoComplete\MAX_ENTRIES, and ilUtil\stripSlashes().

171  {
172  $auto = new \ilUserAutoComplete();
173  $auto->setSearchFields(array('login', 'firstname', 'lastname', 'email'));
174  $auto->enableFieldSearchableCheck(false);
175  $auto->setMoreLinkAvailable(true);
176 
177  $isFetchAllRequest = $this->request->getQueryParams()['fetchall'] ?? false;
178  if ((bool) $isFetchAllRequest) {
179  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
180  }
181 
182  $query = \ilUtil::stripSlashes($this->request->getQueryParams()['term'] ?? '');
183  echo $auto->getList($query);
184  exit();
185  }
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
exit
Definition: backend.php:16
+ Here is the call graph for this function:

◆ applyAcceptanceHistoryFilter()

ilTermsOfServiceAcceptanceHistoryGUI::applyAcceptanceHistoryFilter ( )
protected

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

References $table, getAcceptanceHistoryTable(), and showAcceptanceHistory().

147  {
149  $table->resetOffset();
150  $table->writeFilterToSession();
151 
152  $this->showAcceptanceHistory();
153  }
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ executeCommand()

ilTermsOfServiceAcceptanceHistoryGUI::executeCommand ( )

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

Implements ilTermsOfServiceControllerEnabled.

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

References USER_FOLDER_ID.

91  {
92  $nextClass = $this->ctrl->getNextClass($this);
93  $cmd = $this->ctrl->getCmd();
94 
95  if (
96  !$this->rbacsystem->checkAccess('read', $this->tos->getRefId()) ||
97  !$this->rbacsystem->checkAccess('read', USER_FOLDER_ID)
98  ) {
99  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
100  }
101 
102  switch (strtolower($nextClass)) {
103  default:
104  if ($cmd == '' || !method_exists($this, $cmd)) {
105  $cmd = 'showAcceptanceHistory';
106  }
107  $this->$cmd();
108  break;
109  }
110  }
const USER_FOLDER_ID
Class ilObjUserFolder.

◆ getAcceptanceHistoryTable()

ilTermsOfServiceAcceptanceHistoryGUI::getAcceptanceHistoryTable ( )
protected
Returns
ilTermsOfServiceAcceptanceHistoryTableGUI
Exceptions
ilTermsOfServiceMissingDatabaseAdapterException

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

References $table, and ilTermsOfServiceTableDataProviderFactory\CONTEXT_ACCEPTANCE_HISTORY.

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

117  {
118  $table = new \ilTermsOfServiceAcceptanceHistoryTableGUI(
119  $this,
120  'showAcceptanceHistory',
121  $this->criterionTypeFactory,
122  $this->uiFactory,
123  $this->uiRenderer
124  );
125  $table->setProvider($this->tableDataProviderFactory->getByContext(\ilTermsOfServiceTableDataProviderFactory::CONTEXT_ACCEPTANCE_HISTORY));
126 
127  return $table;
128  }
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the caller graph for this function:

◆ resetAcceptanceHistoryFilter()

ilTermsOfServiceAcceptanceHistoryGUI::resetAcceptanceHistoryFilter ( )
protected

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

References $table, getAcceptanceHistoryTable(), and showAcceptanceHistory().

159  {
161  $table->resetOffset();
162  $table->resetFilter();
163 
164  $this->showAcceptanceHistory();
165  }
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ showAcceptanceHistory()

ilTermsOfServiceAcceptanceHistoryGUI::showAcceptanceHistory ( )
protected

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

References $table, and getAcceptanceHistoryTable().

Referenced by applyAcceptanceHistoryFilter(), and resetAcceptanceHistoryFilter().

134  {
136 
137  $table->populate();
138 
139  $this->tpl->setContent($table->getHTML());
140  }
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $criterionTypeFactory

ilTermsOfServiceAcceptanceHistoryGUI::$criterionTypeFactory
protected

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

Referenced by __construct().

◆ $ctrl

ilTermsOfServiceAcceptanceHistoryGUI::$ctrl
protected

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

Referenced by __construct().

◆ $error

ilTermsOfServiceAcceptanceHistoryGUI::$error
protected

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

Referenced by __construct().

◆ $lng

ilTermsOfServiceAcceptanceHistoryGUI::$lng
protected

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

Referenced by __construct().

◆ $rbacsystem

ilTermsOfServiceAcceptanceHistoryGUI::$rbacsystem
protected

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

Referenced by __construct().

◆ $request

ilTermsOfServiceAcceptanceHistoryGUI::$request
protected

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

Referenced by __construct().

◆ $tableDataProviderFactory

ilTermsOfServiceAcceptanceHistoryGUI::$tableDataProviderFactory
protected

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

Referenced by __construct().

◆ $tos

ilTermsOfServiceAcceptanceHistoryGUI::$tos
protected

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

Referenced by __construct().

◆ $tpl

ilTermsOfServiceAcceptanceHistoryGUI::$tpl
protected

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

Referenced by __construct().

◆ $uiFactory

ilTermsOfServiceAcceptanceHistoryGUI::$uiFactory
protected

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

Referenced by __construct().

◆ $uiRenderer

ilTermsOfServiceAcceptanceHistoryGUI::$uiRenderer
protected

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

Referenced by __construct().


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