ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTermsOfServiceRequestTargetAdjustmentCase.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
9 {
13  public function shouldStoreRequestTarget() : bool
14  {
15  return true;
16  }
17 
21  public function isInFulfillment() : bool
22  {
23  return (
24  strtolower($this->ctrl->getCmdClass()) === 'ilstartupgui' &&
25  strtolower($this->ctrl->getCmd()) === 'getacceptance'
26  );
27  }
28 
32  public function shouldAdjustRequest() : bool
33  {
34  if ($this->isInFulfillment()) {
35  return false;
36  }
37 
38  if (
39  $this->user->hasToAcceptTermsOfService() &&
40  $this->user->checkTimeLimit() &&
41  $this->user->hasToAcceptTermsOfServiceInSession()
42  ) {
43  return true;
44  }
45 
46  return false;
47  }
48 
52  public function adjust() : void
53  {
54  $this->ctrl->redirectToURL('ilias.php?baseClass=ilStartUpGUI&cmdClass=ilStartupGUI&cmd=getAcceptance');
55  }
56 }
Class ilUserRequestTargetAdjustmentCase.
user()
Definition: user.php:4