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

Class ilMStListCertificatesGUI. More...

+ Collaboration diagram for ilMStListCertificatesGUI:

Public Member Functions

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

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 123 of file class.ilMStListCertificatesGUI.php.

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

References index().

+ Here is the call graph for this function:

◆ cancel()

ilMStListCertificatesGUI::cancel ( )

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

159 {
160 global $DIC;
161
162 $DIC->ctrl()->redirect($this);
163 }
$DIC
Definition: xapitoken.php:46

References $DIC.

◆ checkAccessOrFail()

ilMStListCertificatesGUI::checkAccessOrFail ( )
protected

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

44 {
45 global $DIC;
46
47 if ($this->access->hasCurrentUserAccessToMyStaff()) {
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:

◆ getActions()

ilMStListCertificatesGUI::getActions ( )

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

170 {
171 global $DIC;
172
173 $mst_co_usr_id = $DIC->http()->request()->getQueryParams()['mst_lco_usr_id'];
174 $mst_lco_crs_ref_id = $DIC->http()->request()->getQueryParams()['mst_lco_crs_ref_id'];
175
176 if ($mst_co_usr_id > 0 && $mst_lco_crs_ref_id > 0) {
177 $selection = new ilAdvancedSelectionListGUI();
178
179 if ($DIC->access()->checkAccess("visible", "", $mst_lco_crs_ref_id)) {
180 $link = ilLink::_getStaticLink($mst_lco_crs_ref_id, ilMyStaffAccess::DEFAULT_CONTEXT);
181 $selection->addItem(ilObject2::_lookupTitle(ilObject2::_lookupObjectId($mst_lco_crs_ref_id)), '', $link);
182 };
183
185 foreach (ilOrgUnitUserAssignment::innerjoin('object_reference', 'orgu_id', 'ref_id')->where(array(
186 'user_id' => $mst_co_usr_id,
187 'object_reference.deleted' => null
188 ), array( 'user_id' => '=', 'object_reference.deleted' => '!=' ))->get() as $org_unit_assignment) {
189 if ($DIC->access()->checkAccess("read", "", $org_unit_assignment->getOrguId())) {
190 $link = ilLink::_getStaticLink($org_unit_assignment->getOrguId(), 'orgu');
191 $selection->addItem($org_units[$org_unit_assignment->getOrguId()], '', $link);
192 }
193 }
194
195 $selection = ilMyStaffGUI::extendActionMenuWithUserActions($selection, $mst_co_usr_id, rawurlencode($DIC->ctrl()
196 ->getLinkTarget($this, self::CMD_INDEX)));
197
198 echo $selection->getHTML(true);
199 }
200 exit;
201 }
static innerjoin($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
User interface class for advanced drop-down selection lists.
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
static getTextRepresentationOfOrgUnits($sort_by_title=true)
Get ref id path array.
exit
Definition: login.php:29

References $DIC, ilLink\_getStaticLink(), ilObject2\_lookupObjectId(), ilObject2\_lookupTitle(), exit, ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), and ActiveRecord\innerjoin().

+ Here is the call graph for this function:

◆ getId()

ilMStListCertificatesGUI::getId ( )
Returns
string

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

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

◆ 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()->setContent($this->table->getHTML());
117 }

References $DIC, and checkAccessOrFail().

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 135 of file class.ilMStListCertificatesGUI.php.

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

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: