ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMStListCertificatesGUI Class Reference

Class ilMStListCertificatesGUI. More...

+ Collaboration diagram for ilMStListCertificatesGUI:

Public Member Functions

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

Data Fields

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

Protected Member Functions

 checkAccessOrFail ()
 

Protected Attributes

 $table
 
 $access
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCertificatesGUI::__construct ( )

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

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

Member Function Documentation

◆ applyFilter()

ilMStListCertificatesGUI::applyFilter ( )

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

125 {
126 $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_APPLY_FILTER);
127 $this->table->writeFilterToSession();
128 $this->table->resetOffset();
129 $this->index();
130 }

References index().

+ Here is the call graph for this function:

◆ cancel()

ilMStListCertificatesGUI::cancel ( )

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

160 {
161 global $DIC;
162
163 $DIC->ctrl()->redirect($this);
164 }
global $DIC
Definition: goto.php:24

References $DIC.

◆ checkAccessOrFail()

ilMStListCertificatesGUI::checkAccessOrFail ( )
protected

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

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

References $DIC, and ilUtil\sendFailure().

Referenced by executeCommand(), and listUsers().

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

◆ executeCommand()

ilMStListCertificatesGUI::executeCommand ( )

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

60 {
61 global $DIC;
62
63 $cmd = $DIC->ctrl()->getCmd();
64 $next_class = $DIC->ctrl()->getNextClass();
65
66 switch ($next_class) {
67 case strtolower(ilFormPropertyDispatchGUI::class):
68 $this->checkAccessOrFail();
69
70 $DIC->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 $DIC->ctrl()->forwardCommand(new ilUserCertificateApiGUI());
77 break;
78 default:
79 switch ($cmd) {
80
83 case self::CMD_INDEX:
85 $this->$cmd();
86 break;
87 default:
88 $this->index();
89 break;
90 }
91 break;
92 }
93 }

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

+ Here is the call graph for this function:

◆ getId()

ilMStListCertificatesGUI::getId ( )
Returns
string

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

149 {
150 $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_INDEX);
151
152 return $this->table->getId();
153 }

◆ index()

ilMStListCertificatesGUI::index ( )

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

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()

ilMStListCertificatesGUI::listUsers ( )

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

109 {
110 global $DIC;
111
112 $this->checkAccessOrFail();
113
114 $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_INDEX);
115 $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_certificates'));
116 $DIC->ui()->mainTemplate()->setTitleIcon(ilUtil::getImagePath('icon_cert.svg'));
117 $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
118 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $DIC, checkAccessOrFail(), and ilUtil\getImagePath().

Referenced by index().

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

◆ resetFilter()

ilMStListCertificatesGUI::resetFilter ( )

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

137 {
138 $this->table = new ilMStListCertificatesTableGUI($this, self::CMD_RESET_FILTER);
139 $this->table->resetOffset();
140 $this->table->resetFilter();
141 $this->index();
142 }

References index().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMStListCertificatesGUI::$access
protected

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

◆ $table

ilMStListCertificatesGUI::$table
protected

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

◆ CMD_APPLY_FILTER

const ilMStListCertificatesGUI::CMD_APPLY_FILTER = 'applyFilter'

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

Referenced by executeCommand().

◆ CMD_GET_ACTIONS

const ilMStListCertificatesGUI::CMD_GET_ACTIONS = "getActions"

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

Referenced by executeCommand().

◆ CMD_INDEX

const ilMStListCertificatesGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const ilMStListCertificatesGUI::CMD_RESET_FILTER = 'resetFilter'

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

Referenced by executeCommand().


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