ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPaymentAdminGUI Class Reference
+ Collaboration diagram for ilPaymentAdminGUI:

Public Member Functions

 ilPaymentAdminGUI ($user_obj)
 
 executeCommand ()
 

Protected Member Functions

 buildSubTabs ()
 

Private Member Functions

 forwardToDefault ()
 

Detailed Description

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

Member Function Documentation

◆ buildSubTabs()

ilPaymentAdminGUI::buildSubTabs ( )
protected

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

25 {
26 global $ilUser, $ilTabs, $ilCtrl;
27
29
30 if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
32 {
33 $ilTabs->addSubTabTarget('bookings', $ilCtrl->getLinkTargetByClass('ilpaymentstatisticgui'), '', '', '');
34 }
35
36 if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
38 {
39 $ilTabs->addSubTabTarget('paya_object', $ilCtrl->getLinkTargetByClass('ilpaymentobjectgui'), '', '', '');
40
41 }
42
43 if(ilPaymentVendors::_isVendor($ilUser->getId()))
44 {
45 $ilTabs->addSubTabTarget('paya_trustees', $ilCtrl->getLinkTargetByClass('ilpaymenttrusteegui'), '', '', '');
46 }
47
48 if(!(bool)$settings->get('hide_coupons'))
49 {
50 if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
52 {
53 $ilTabs->addSubTabTarget('paya_coupons_coupons', $ilCtrl->getLinkTargetByClass('ilpaymentcoupongui'), '', '', '');
54 }
55 }
56 }
static _hasCouponsPermission($a_trustee)
static _hasStatisticPermission($a_trustee)
static _hasObjectPermission($a_trustee)
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15

References $ilCtrl, $ilUser, ilPaymentSettings\_getInstance(), ilPaymentTrustees\_hasCouponsPermission(), ilPaymentTrustees\_hasObjectPermission(), and ilPaymentTrustees\_hasStatisticPermission().

Referenced by executeCommand().

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

◆ executeCommand()

ilPaymentAdminGUI::executeCommand ( )

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

59 {
60 global $ilCtrl;
61
62 $next_class = $ilCtrl->getNextClass($this);
63 $this->buildSubTabs();
64
65 switch($next_class)
66 {
67 case 'ilpaymenttrusteegui':
68 include_once './Services/Payment/classes/class.ilPaymentTrusteeGUI.php';
69 $ilCtrl->forwardCommand(new ilPaymentTrusteeGUI($this->user_obj));
70 break;
71
72 case 'ilpaymentobjectgui':
73 include_once './Services/Payment/classes/class.ilPaymentObjectGUI.php';
74 $ilCtrl->forwardCommand(new ilPaymentObjectGUI($this->user_obj));
75 break;
76
77 case 'ilpaymentstatisticgui':
78 include_once './Services/Payment/classes/class.ilPaymentStatisticGUI.php';
79 $ilCtrl->forwardCommand(new ilPaymentStatisticGUI($this->user_obj));
80 break;
81
82 case 'ilpaymentcoupongui':
83 include_once './Services/Payment/classes/class.ilPaymentCouponGUI.php';
84 $ilCtrl->forwardCommand(new ilPaymentCouponGUI($this->user_obj));
85 break;
86
87 default:
88 $this->forwardToDefault();
89 break;
90 }
91 }

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

+ Here is the call graph for this function:

◆ forwardToDefault()

ilPaymentAdminGUI::forwardToDefault ( )
private

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

94 {
95 global $ilCtrl, $lng;
96
97 $is_vendor = ilPaymentVendors::_isVendor($this->user_obj->getId());
98 $has_stat_perm = ilPaymentTrustees::_hasStatisticPermission($this->user_obj->getId());
99 $has_obj_perm = ilPaymentTrustees::_hasObjectPermission($this->user_obj->getId());
100 $has_coup_perm = ilPaymentTrustees::_hasCouponsPermission($this->user_obj->getId());
101
102 if($is_vendor || $has_stat_perm)
103 {
104 $ilCtrl->redirectByClass('ilpaymentstatisticgui');
105 }
106 else if($has_obj_perm)
107 {
108 $ilCtrl->redirectByClass('ilpaymentobjectgui');
109 }
110 else if($has_coup_perm)
111 {
112 $ilCtrl->redirectByClass('ilpaymentcoupongui');
113 }
114
115 ilUtil::sendInfo($lng->txt("no_permission"));
116
117 return false;
118 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $lng
Definition: privfeed.php:40

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

Referenced by executeCommand().

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

◆ ilPaymentAdminGUI()

ilPaymentAdminGUI::ilPaymentAdminGUI (   $user_obj)

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

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

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