ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPaymentAdminGUI Class Reference
+ Collaboration diagram for ilPaymentAdminGUI:

Public Member Functions

 ilPaymentAdminGUI ($user_obj)
 
 executeCommand ()
 

Private Member Functions

 forwardToDefault ()
 

Detailed Description

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

Member Function Documentation

◆ executeCommand()

ilPaymentAdminGUI::executeCommand ( )

Definition at line 25 of file class.ilPaymentAdminGUI.php.

References $cmd, $ilCtrl, and forwardToDefault().

26  {
27  global $ilCtrl;
28 
29  $next_class = $ilCtrl->getNextClass($this);
30  $cmd = $ilCtrl->getCmd();
31 
32  switch($next_class)
33  {
34  case 'ilpaymenttrusteegui':
35  include_once './Services/Payment/classes/class.ilPaymentTrusteeGUI.php';
36  $ilCtrl->forwardCommand(new ilPaymentTrusteeGUI($this->user_obj));
37  break;
38 
39  case 'ilpaymentobjectgui':
40  include_once './Services/Payment/classes/class.ilPaymentObjectGUI.php';
41  $ilCtrl->forwardCommand(new ilPaymentObjectGUI($this->user_obj));
42  break;
43 
44  case 'ilpaymentstatisticgui':
45  include_once './Services/Payment/classes/class.ilPaymentStatisticGUI.php';
46  $ilCtrl->forwardCommand(new ilPaymentStatisticGUI($this->user_obj));
47  break;
48 
49  case 'ilpaymentcoupongui':
50  include_once './Services/Payment/classes/class.ilPaymentCouponGUI.php';
51  $ilCtrl->forwardCommand(new ilPaymentCouponGUI($this->user_obj));
52  break;
53 
54  default:
55  $this->forwardToDefault();
56  break;
57  }
58  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ forwardToDefault()

ilPaymentAdminGUI::forwardToDefault ( )
private

Definition at line 60 of file class.ilPaymentAdminGUI.php.

References $ilCtrl, $lng, ilPaymentTrustees\_hasCouponsPermission(), ilPaymentTrustees\_hasObjectPermission(), ilPaymentTrustees\_hasStatisticPermission(), and ilUtil\sendInfo().

Referenced by executeCommand().

61  {
62  global $ilCtrl, $lng;
63 
64  $is_vendor = ilPaymentVendors::_isVendor($this->user_obj->getId());
65  $has_stat_perm = ilPaymentTrustees::_hasStatisticPermission($this->user_obj->getId());
66  $has_obj_perm =ilPaymentTrustees::_hasObjectPermission($this->user_obj->getId());
67  $has_coup_perm = ilPaymentTrustees::_hasCouponsPermission($this->user_obj->getId());
68 
69  if($is_vendor || $has_stat_perm)
70  {
71  $ilCtrl->redirectByClass('ilpaymentstatisticgui');
72  }
73  else if($has_obj_perm)
74  {
75  $ilCtrl->redirectByClass('ilpaymentobjectgui');
76  }
77  else if($has_coup_perm)
78  {
79  $ilCtrl->redirectByClass('ilpaymentcoupongui');
80  }
81 
82  ilUtil::sendInfo($lng->txt("no_permission"));
83 
84  return false;
85  }
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _hasCouponsPermission($a_trustee)
static _hasStatisticPermission($a_trustee)
global $lng
Definition: privfeed.php:40
static _hasObjectPermission($a_trustee)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ilPaymentAdminGUI()

ilPaymentAdminGUI::ilPaymentAdminGUI (   $user_obj)

Definition at line 20 of file class.ilPaymentAdminGUI.php.

21  {
22  $this->user_obj = $user_obj;
23  }

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