ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilMStListUsersGUI Class Reference

Class ilMStListUsersGUI. More...

+ Collaboration diagram for ilMStListUsersGUI:

Public Member Functions

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

Data Fields

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

Protected Member Functions

 checkAccessOrFail ()
 

Protected Attributes

ilMStListUsersTableGUI $table
 
ilMyStaffAccess $access
 

Private Attributes

ilGlobalTemplateInterface $main_tpl
 
ilHelpGUI $help
 
ilCtrlInterface $ctrl
 
ilLanguage $language
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListUsersGUI::__construct ( )

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

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

44  {
45  global $DIC;
46  $this->main_tpl = $DIC->ui()->mainTemplate();
47  $this->access = ilMyStaffAccess::getInstance();
48  $this->help = $DIC->help();
49  $this->ctrl = $DIC->ctrl();
50  $this->language = $DIC->language();
51  $this->help->setScreenIdComponent('msta');
52  }
global $DIC
Definition: shib_login.php:26
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilMStListUsersGUI::applyFilter ( )
final

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

References index().

102  : void
103  {
104  $this->table = new ilMStListUsersTableGUI($this, self::CMD_APPLY_FILTER);
105  $this->table->writeFilterToSession();
106  $this->table->resetOffset();
107  $this->index();
108  }
+ Here is the call graph for this function:

◆ cancel()

ilMStListUsersGUI::cancel ( )
final

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

References $DIC.

118  : void
119  {
120  global $DIC;
121 
122  $DIC->ctrl()->redirect($this);
123  }
global $DIC
Definition: shib_login.php:26

◆ checkAccessOrFail()

ilMStListUsersGUI::checkAccessOrFail ( )
protected

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by executeCommand().

54  : void
55  {
56  if ($this->access->hasCurrentUserAccessToMyStaff()) {
57  return;
58  } else {
59  $this->main_tpl->setOnScreenMessage('failure', $this->language->txt("permission_denied"), true);
60  $this->ctrl->redirectByClass(ilDashboardGUI::class, "");
61  }
62  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMStListUsersGUI::executeCommand ( )
final

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

References $DIC, checkAccessOrFail(), and index().

64  : void
65  {
66  global $DIC;
67 
68  $this->checkAccessOrFail();
69 
70  $cmd = $DIC->ctrl()->getCmd();
71 
72  switch ($cmd) {
73  case self::CMD_RESET_FILTER:
74  case self::CMD_APPLY_FILTER:
75  case self::CMD_INDEX:
76  case self::CMD_ADD_USER_AUTO_COMPLETE:
77  case self::CMD_GET_ACTIONS:
78  $this->$cmd();
79  break;
80  default:
81  $this->index();
82  break;
83  }
84  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

◆ index()

ilMStListUsersGUI::index ( )
final

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

References listUsers().

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

86  : void
87  {
88  $this->listUsers();
89  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilMStListUsersGUI::listUsers ( )
final

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

References $DIC, ilUtil\getImagePath(), and ILIAS\Repository\help().

Referenced by index().

91  : void
92  {
93  global $DIC;
94 
95  $this->help->setScreenId('users_list');
96  $this->table = new ilMStListUsersTableGUI($this, self::CMD_INDEX);
97  $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_users'));
98  $DIC->ui()->mainTemplate()->setTitleIcon(ilUtil::getImagePath('standard/icon_stff.svg'));
99  $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
100  }
global $DIC
Definition: shib_login.php:26
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilter()

ilMStListUsersGUI::resetFilter ( )
final

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

References index().

110  : void
111  {
112  $this->table = new ilMStListUsersTableGUI($this, self::CMD_RESET_FILTER);
113  $this->table->resetOffset();
114  $this->table->resetFilter();
115  $this->index();
116  }
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMyStaffAccess ilMStListUsersGUI::$access
protected

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

◆ $ctrl

ilCtrlInterface ilMStListUsersGUI::$ctrl
private

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

◆ $help

ilHelpGUI ilMStListUsersGUI::$help
private

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

◆ $language

ilLanguage ilMStListUsersGUI::$language
private

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

◆ $main_tpl

ilGlobalTemplateInterface ilMStListUsersGUI::$main_tpl
private

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

◆ $table

ilMStListUsersTableGUI ilMStListUsersGUI::$table
protected

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

◆ CMD_ADD_USER_AUTO_COMPLETE

const string ilMStListUsersGUI::CMD_ADD_USER_AUTO_COMPLETE = 'addUserAutoComplete'

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

◆ CMD_APPLY_FILTER

const string ilMStListUsersGUI::CMD_APPLY_FILTER = 'applyFilter'

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

◆ CMD_GET_ACTIONS

const string ilMStListUsersGUI::CMD_GET_ACTIONS = "getActions"

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

◆ CMD_INDEX

◆ CMD_RESET_FILTER

const string ilMStListUsersGUI::CMD_RESET_FILTER = 'resetFilter'

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


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