ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMStListUsersGUI Class Reference

Class ilMStListUsersGUI. More...

+ Collaboration diagram for ilMStListUsersGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 index ()
 
 listUsers ()
 
 applyFilter ()
 
 resetFilter ()
 
 cancel ()
 
 getActions ()
 

Data Fields

const CMD_RESET_FILTER = 'resetFilter'
 
const CMD_APPLY_FILTER = 'applyFilter'
 
const CMD_INDEX = 'index'
 
const CMD_GET_ACTIONS = "getActions"
 
const CMD_ADD_USER_AUTO_COMPLETE = 'addUserAutoComplete'
 

Protected Member Functions

 checkAccessOrFail ()
 

Protected Attributes

 $table
 
 $access
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListUsersGUI::__construct ( )

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

34 {
35 $this->access = ilMyStaffAccess::getInstance();
36 }

Member Function Documentation

◆ applyFilter()

ilMStListUsersGUI::applyFilter ( )

Definition at line 106 of file class.ilMStListUsersGUI.php.

107 {
108 $this->table = new ilMStListUsersTableGUI($this, self::CMD_APPLY_FILTER);
109 $this->table->writeFilterToSession();
110 $this->table->resetOffset();
111 $this->index();
112 }

References index().

+ Here is the call graph for this function:

◆ cancel()

ilMStListUsersGUI::cancel ( )

Definition at line 130 of file class.ilMStListUsersGUI.php.

131 {
132 global $DIC;
133
134 $DIC->ctrl()->redirect($this);
135 }
$DIC
Definition: xapitoken.php:46

References $DIC.

◆ checkAccessOrFail()

ilMStListUsersGUI::checkAccessOrFail ( )
protected

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

43 {
44 global $DIC;
45
46 if ($this->access->hasCurrentUserAccessToMyStaff()) {
47 return;
48 } else {
49 ilUtil::sendFailure($DIC->language()->txt("permission_denied"), true);
50 $DIC->ctrl()->redirectByClass(ilDashboardGUI::class, "");
51 }
52 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $DIC, and ilUtil\sendFailure().

Referenced by executeCommand().

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

◆ executeCommand()

ilMStListUsersGUI::executeCommand ( )

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

59 {
60 global $DIC;
61
62 $this->checkAccessOrFail();
63
64 $cmd = $DIC->ctrl()->getCmd();
65
66 switch ($cmd) {
69 case self::CMD_INDEX:
72 $this->$cmd();
73 break;
74 default:
75 $this->index();
76 break;
77 }
78 }

References $DIC, checkAccessOrFail(), CMD_ADD_USER_AUTO_COMPLETE, CMD_APPLY_FILTER, CMD_GET_ACTIONS, CMD_INDEX, CMD_RESET_FILTER, and index().

+ Here is the call graph for this function:

◆ getActions()

ilMStListUsersGUI::getActions ( )

Definition at line 141 of file class.ilMStListUsersGUI.php.

142 {
143 global $DIC;
144
145 $mst_lus_usr_id = $DIC->http()->request()->getQueryParams()['mst_lus_usr_id'];
146 if ($mst_lus_usr_id > 0) {
147 $selection = new ilAdvancedSelectionListGUI();
148
149 if ($this->access->hasCurrentUserAccessToMyStaff()) {
150 $DIC->ctrl()->setParameterByClass(ilMStShowUserCoursesGUI::class, 'usr_id', $mst_lus_usr_id);
151 $selection->addItem($DIC->language()->txt('mst_show_courses'), '', $DIC->ctrl()->getLinkTargetByClass(array(
152 ilDashboardGUI::class,
153 ilMyStaffGUI::class,
154 ilMStShowUserGUI::class,
155 ilMStShowUserCoursesGUI::class,
156 )));
157 }
158
159 if ($this->access->hasCurrentUserAccessToCertificates()) {
160 $DIC->ctrl()->setParameterByClass(ilUserCertificateGUI::class, 'usr_id', $mst_lus_usr_id);
161 $selection->addItem($DIC->language()->txt('mst_list_certificates'), '', $DIC->ctrl()->getLinkTargetByClass(array(
162 ilDashboardGUI::class,
163 ilMyStaffGUI::class,
164 ilMStShowUserGUI::class,
165 ilUserCertificateGUI::class,
166 )));
167 }
168
169 if ($this->access->hasCurrentUserAccessToCompetences()) {
170 $DIC->ctrl()->setParameterByClass(ilMStShowUserCompetencesGUI::class, 'usr_id', $mst_lus_usr_id);
171 $selection->addItem($DIC->language()->txt('mst_list_competences'), '', $DIC->ctrl()->getLinkTargetByClass(array(
172 ilDashboardGUI::class,
173 ilMyStaffGUI::class,
174 ilMStShowUserGUI::class,
175 ilMStShowUserCompetencesGUI::class,
176 )));
177 }
178
179
180 $selection = ilMyStaffGUI::extendActionMenuWithUserActions($selection, $mst_lus_usr_id, rawurlencode($DIC->ctrl()
181 ->getLinkTarget($this, self::CMD_INDEX)));
182
183 echo $selection->getHTML(true);
184 }
185 exit;
186 }
User interface class for advanced drop-down selection lists.
exit
Definition: login.php:29

References $DIC, and exit.

◆ index()

ilMStListUsersGUI::index ( )

Definition at line 84 of file class.ilMStListUsersGUI.php.

85 {
86 $this->listUsers();
87 }

References listUsers().

Referenced by applyFilter(), executeCommand(), and resetFilter().

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

◆ listUsers()

ilMStListUsersGUI::listUsers ( )

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

94 {
95 global $DIC;
96
97 $this->table = new ilMStListUsersTableGUI($this, self::CMD_INDEX);
98 $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_users'));
99 $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
100 }

References $DIC.

Referenced by index().

+ Here is the caller graph for this function:

◆ resetFilter()

ilMStListUsersGUI::resetFilter ( )

Definition at line 118 of file class.ilMStListUsersGUI.php.

119 {
120 $this->table = new ilMStListUsersTableGUI($this, self::CMD_RESET_FILTER);
121 $this->table->resetOffset();
122 $this->table->resetFilter();
123 $this->index();
124 }

References index().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMStListUsersGUI::$access
protected

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

◆ $table

ilMStListUsersGUI::$table
protected

Definition at line 23 of file class.ilMStListUsersGUI.php.

◆ CMD_ADD_USER_AUTO_COMPLETE

const ilMStListUsersGUI::CMD_ADD_USER_AUTO_COMPLETE = 'addUserAutoComplete'

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

Referenced by executeCommand().

◆ CMD_APPLY_FILTER

const ilMStListUsersGUI::CMD_APPLY_FILTER = 'applyFilter'

Definition at line 16 of file class.ilMStListUsersGUI.php.

Referenced by executeCommand().

◆ CMD_GET_ACTIONS

const ilMStListUsersGUI::CMD_GET_ACTIONS = "getActions"

◆ CMD_INDEX

const ilMStListUsersGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const ilMStListUsersGUI::CMD_RESET_FILTER = 'resetFilter'

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

Referenced by executeCommand().


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