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

Class ilMStListCertificatesGUI. More...

+ Collaboration diagram for ilMStListCertificatesGUI:

Public Member Functions

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

Data Fields

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

Protected Member Functions

 checkAccessOrFail ()
 

Protected Attributes

ilTable2GUI $table
 
ilMyStaffAccess $access
 

Private Attributes

ilGlobalTemplateInterface $main_tpl
 
ilCtrlInterface $ctrl
 
ilLanguage $language
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCertificatesGUI::__construct ( )

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

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

43  {
44  global $DIC;
45  $this->main_tpl = $DIC->ui()->mainTemplate();
46  $this->ctrl = $DIC->ctrl();
47  $this->language = $DIC->language();
48  $this->access = ilMyStaffAccess::getInstance();
49  }
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()

ilMStListCertificatesGUI::applyFilter ( )
final

Definition at line 109 of file class.ilMStListCertificatesGUI.php.

References index().

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

◆ cancel()

ilMStListCertificatesGUI::cancel ( )
final

Definition at line 132 of file class.ilMStListCertificatesGUI.php.

References ILIAS\Repository\ctrl().

132  : void
133  {
134  $this->ctrl->redirect($this);
135  }
+ Here is the call graph for this function:

◆ checkAccessOrFail()

ilMStListCertificatesGUI::checkAccessOrFail ( )
protected

Definition at line 51 of file class.ilMStListCertificatesGUI.php.

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

Referenced by executeCommand(), and listUsers().

51  : void
52  {
53  if ($this->access->hasCurrentUserAccessToCertificates()) {
54  return;
55  } else {
56  $this->main_tpl->setOnScreenMessage('failure', $this->language->txt("permission_denied"), true);
57  $this->ctrl->redirectByClass(ilDashboardGUI::class, "");
58  }
59  }
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()

ilMStListCertificatesGUI::executeCommand ( )
final

Definition at line 61 of file class.ilMStListCertificatesGUI.php.

References checkAccessOrFail(), ILIAS\Repository\ctrl(), and index().

61  : void
62  {
63  $cmd = $this->ctrl->getCmd();
64  $next_class = $this->ctrl->getNextClass();
65 
66  switch ($next_class) {
67  case strtolower(ilFormPropertyDispatchGUI::class):
68  $this->checkAccessOrFail();
69 
70  $this->ctrl->setReturn($this, self::CMD_INDEX);
71  $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_INDEX);
72  $this->table->executeCommand();
73  break;
74  case strtolower(ilUserCertificateApiGUI::class):
75  $this->checkAccessOrFail();
76  $this->ctrl->forwardCommand(new ilUserCertificateApiGUI());
77  break;
78  default:
79  switch ($cmd) {
80  case self::CMD_RESET_FILTER:
81  case self::CMD_APPLY_FILTER:
82  case self::CMD_INDEX:
83  case self::CMD_GET_ACTIONS:
84  $this->$cmd();
85  break;
86  default:
87  $this->index();
88  break;
89  }
90  break;
91  }
92  }
+ Here is the call graph for this function:

◆ getId()

ilMStListCertificatesGUI::getId ( )
final

Definition at line 125 of file class.ilMStListCertificatesGUI.php.

125  : string
126  {
127  $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_INDEX);
128 
129  return $this->table->getId();
130  }

◆ index()

ilMStListCertificatesGUI::index ( )
final

Definition at line 94 of file class.ilMStListCertificatesGUI.php.

References listUsers().

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

94  : void
95  {
96  $this->listUsers();
97  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilMStListCertificatesGUI::listUsers ( )
final

Definition at line 99 of file class.ilMStListCertificatesGUI.php.

References checkAccessOrFail(), ilUtil\getImagePath(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by index().

99  : void
100  {
101  $this->checkAccessOrFail();
102 
103  $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_INDEX);
104  $this->main_tpl->setTitle($this->language->txt('mst_list_certificates'));
105  $this->main_tpl->setTitleIcon(ilUtil::getImagePath('standard/icon_cert.svg'));
106  $this->main_tpl->setContent($this->table->getHTML());
107  }
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
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:

◆ resetFilter()

ilMStListCertificatesGUI::resetFilter ( )
final

Definition at line 117 of file class.ilMStListCertificatesGUI.php.

References index().

117  : void
118  {
119  $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_RESET_FILTER);
120  $this->table->resetOffset();
121  $this->table->resetFilter();
122  $this->index();
123  }
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMyStaffAccess ilMStListCertificatesGUI::$access
protected

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

◆ $ctrl

ilCtrlInterface ilMStListCertificatesGUI::$ctrl
private

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

◆ $language

ilLanguage ilMStListCertificatesGUI::$language
private

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

◆ $main_tpl

ilGlobalTemplateInterface ilMStListCertificatesGUI::$main_tpl
private

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

◆ $table

ilTable2GUI ilMStListCertificatesGUI::$table
protected

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

◆ CMD_APPLY_FILTER

const string ilMStListCertificatesGUI::CMD_APPLY_FILTER = 'applyFilter'

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

◆ CMD_GET_ACTIONS

const string ilMStListCertificatesGUI::CMD_GET_ACTIONS = "getActions"

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

◆ CMD_INDEX

const string ilMStListCertificatesGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const string ilMStListCertificatesGUI::CMD_RESET_FILTER = 'resetFilter'

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


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