ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLocalUserGUI Class Reference

Class ilLocalUserGUI. More...

+ Collaboration diagram for ilLocalUserGUI:

Public Member Functions

 __construct (ilObjectGUI $parentGui)
 
 getRefId ()
 
 executeCommand ()
 
 getObject ()
 
 index (bool $show_delete=false)
 
 performDeleteUsers ()
 
 deleteUsers ()
 
 assignRoles ()
 
 assignSave ()
 
 checkGlobalRoles ($new_assigned)
 
 getAssignableRoles ()
 
 showRolesTable ($a_result_set, $a_from="")
 

Protected Member Functions

 getObjId ()
 
 getIntFromQuery (string $var)
 
 resetFilter ()
 
 applyFilter ()
 
 addUserAutoCompleteObject ()
 
 initTableGUI ()
 
 setTableGUIBasicData ($tbl, &$result_set, string $a_from="")
 
 checkPermission (string $permission)
 

Protected Attributes

ILIAS UI Factory $ui_factory
 
ILIAS HTTP Wrapper RequestWrapper $query_wrapper
 
ILIAS Refinery Factory $refinery
 

Private Attributes

ilObjectGUI $parentGui
 
ilTabsGUI $tabsGui
 
ilPropertyFormGUI $form
 
ilToolbarGUI $toolbar
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
 $object
 
ilLanguage $lng
 
ilAccessHandler $access
 
ilRbacSystem $rbacSystem
 
ilRbacReview $rbacReview
 
ilRbacAdmin $rbacAdmin
 
ilObjUser $user
 
ILIAS DI LoggingServices $logger
 
bool $set_unlimited
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLocalUserGUI::__construct ( ilObjectGUI  $parentGui)

Definition at line 48 of file class.ilLocalUserGUI.php.

References $DIC, $parentGui, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\refinery(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

49  {
50  global $DIC;
51 
52  $this->parentGui = $parentGui;
53  $this->object = $parentGui->getObject();
54  $this->tpl = $DIC->ui()->mainTemplate();
55  $this->ctrl = $DIC->ctrl();
56  $this->toolbar = $DIC->toolbar();
57  $this->lng = $DIC->language();
58  $this->rbacSystem = $DIC->rbac()->system();
59  $this->rbacReview = $DIC->rbac()->review();
60  $this->rbacAdmin = $DIC->rbac()->admin();
61  $this->user = $DIC->user();
62  $this->access = $DIC->access();
63  $this->tabsGui = $DIC->tabs();
64  $this->logger = $DIC->logger();
65  $this->ui_factory = $DIC['ui.factory'];
66  $this->refinery = $DIC['refinery'];
67  $this->query_wrapper = $DIC['http']->wrapper()->query();
68 
69  $this->lng->loadLanguageModule('user');
70  if (!$this->rbacSystem->checkAccess("cat_administrate_users", $this->parentGui->getObject()->getRefId())) {
71  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_perm_admin_users"), true);
72  }
73  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ addUserAutoCompleteObject()

ilLocalUserGUI::addUserAutoCompleteObject ( )
protected

Definition at line 173 of file class.ilLocalUserGUI.php.

References exit, and ilUserAutoComplete\MAX_ENTRIES.

173  : void
174  {
175  $auto = new ilUserAutoComplete();
176  $auto->setSearchFields(array('login', 'firstname', 'lastname', 'email'));
177  $auto->enableFieldSearchableCheck(true);
178  $auto->setMoreLinkAvailable(true);
179 
180  if (($_REQUEST['fetchall'])) {
181  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
182  }
183 
184  echo $auto->getList($_REQUEST['term']);
185  exit();
186  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ applyFilter()

ilLocalUserGUI::applyFilter ( )
protected

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

References index(), and ilUserTableGUI\MODE_LOCAL_USER.

125  : void
126  {
127  $table = new ilUserTableGUI($this, "index", ilUserTableGUI::MODE_LOCAL_USER);
128  $table->resetOffset();
129  $table->writeFilterToSession();
130  $this->index();
131  }
index(bool $show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRoles()

ilLocalUserGUI::assignRoles ( )
Exceptions
ilCtrlException
ilObjectNotFoundException
ilDatabaseException

Definition at line 237 of file class.ilLocalUserGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilLegacyFormElementsUtil\formCheckbox(), getAssignableRoles(), ilObjectFactory\getInstanceByObjId(), getObjId(), index(), ILIAS\Repository\lng(), and showRolesTable().

Referenced by assignSave().

237  : void
238  {
239  if (!$this->access->checkAccess("cat_administrate_users", "", $this->getRefId())) {
240  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
241  $this->ctrl->redirect($this, "");
242  }
243 
244  if (!$this->getObjId()) {
245  $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
246  $this->index();
247  return;
248  }
249  $roles = $this->getAssignableRoles();
250  $this->tpl->addBlockfile(
251  'ADM_CONTENT',
252  'adm_content',
253  'tpl.cat_role_assignment.html',
254  "components/ILIAS/Category"
255  );
256  $ass_roles = $this->rbacReview->assignedRoles($this->getObjId());
257  $counter = 0;
258  $f_result = [];
259  foreach ($roles as $role) {
260  $role_obj = ilObjectFactory::getInstanceByObjId($role['obj_id']);
261  $disabled = false;
262  $f_result[$counter][] = ilLegacyFormElementsUtil::formCheckbox(
263  in_array($role['obj_id'], $ass_roles) ? true : false,
264  'role_ids[]',
265  (string) $role['obj_id'],
266  $disabled
267  );
268  $f_result[$counter][] = $role_obj->getTitle();
269  $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() : '';
270  $f_result[$counter][] = (isset($role['role_type']) && $role['role_type'] == 'global')
271  ?
272  $this->lng->txt('global')
273  :
274  $this->lng->txt('local');
275  unset($role_obj);
276  ++$counter;
277  }
278  $this->showRolesTable($f_result, "assignRolesObject");
279  }
index(bool $show_delete=false)
static formCheckbox(bool $checked, string $varname, string $value, bool $disabled=false)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
showRolesTable($a_result_set, $a_from="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignSave()

ilLocalUserGUI::assignSave ( )

Definition at line 281 of file class.ilLocalUserGUI.php.

References ilLocalUser\_getAllUserIds(), ILIAS\Repository\access(), assignRoles(), checkGlobalRoles(), ILIAS\Repository\ctrl(), getAssignableRoles(), getObjId(), index(), and ILIAS\Repository\lng().

281  : bool
282  {
283  if (!$this->access->checkAccess("cat_administrate_users", "", $this->getRefId())) {
284  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
285  $this->ctrl->redirect($this, "");
286  }
287  // check hack
288  if (!$this->getObjId() or !in_array($this->getObjId(), ilLocalUser::_getAllUserIds())) {
289  $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
290  $this->index();
291 
292  return true;
293  }
294  $roles = $this->getAssignableRoles();
295  // check minimum one global role
296  if (!$this->checkGlobalRoles($_POST['role_ids'])) {
297  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_global_role_left'));
298  $this->assignRoles();
299 
300  return false;
301  }
302  $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
303  $assigned_roles = $this->rbacReview->assignedRoles($this->getObjId());
304  foreach ($roles as $role) {
305  if (in_array($role['obj_id'], $new_role_ids) and !in_array($role['obj_id'], $assigned_roles)) {
306  $this->rbacAdmin->assignUser($role['obj_id'], $this->getObjId());
307  }
308  if (in_array($role['obj_id'], $assigned_roles) and !in_array($role['obj_id'], $new_role_ids)) {
309  $this->rbacAdmin->deassignUser($role['obj_id'], $this->getObjId());
310  }
311  }
312  $this->tpl->setOnScreenMessage('success', $this->lng->txt('role_assignment_updated'));
313  $this->assignRoles();
314 
315  return true;
316  }
static _getAllUserIds(int $a_filter=0)
index(bool $show_delete=false)
checkGlobalRoles($new_assigned)
+ Here is the call graph for this function:

◆ checkGlobalRoles()

ilLocalUserGUI::checkGlobalRoles (   $new_assigned)

Definition at line 318 of file class.ilLocalUserGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByObjId(), getObjId(), ILIAS\Repository\lng(), and SYSTEM_ROLE_ID.

Referenced by assignSave().

318  : bool
319  {
320  if (!$this->access->checkAccess("cat_administrate_users", "", $this->getRefId())) {
321  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
322  $this->ctrl->redirect($this, "");
323  }
324  // return true if it's not a local user
325  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->getObjId());
326  if ($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
327  !in_array(SYSTEM_ROLE_ID, $this->rbacReview->assignedRoles($this->user->getId()))
328  ) {
329  return true;
330  }
331  // new assignment by form
332  $new_assigned = $new_assigned ? $new_assigned : array();
333  $assigned = $this->rbacReview->assignedRoles((int) $this->getObjId());
334  // all assignable globals
335  if (!in_array(SYSTEM_ROLE_ID, $this->rbacReview->assignedRoles($this->user->getId()))) {
336  $ga = $this->rbacReview->getGlobalAssignableRoles();
337  } else {
338  $ga = $this->rbacReview->getGlobalRolesArray();
339  }
340  $global_assignable = array();
341  foreach ($ga as $role) {
342  $global_assignable[] = $role['obj_id'];
343  }
344  $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
345  $all_assigned_roles = array_intersect($assigned, $this->rbacReview->getGlobalRoles());
346  $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
347  if (!count($new_visible_assigned_roles) and !count($main_assigned_roles)) {
348  return false;
349  }
350 
351  return true;
352  }
const SYSTEM_ROLE_ID
Definition: constants.php:29
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkPermission()

ilLocalUserGUI::checkPermission ( string  $permission)
protected

Definition at line 479 of file class.ilLocalUserGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by deleteUsers(), and performDeleteUsers().

479  : void
480  {
481  if (!$this->access->checkAccess($permission, "", $this->getRefId())) {
482  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
483  $this->ctrl->redirect($this, "");
484  }
485  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteUsers()

ilLocalUserGUI::deleteUsers ( )

Definition at line 207 of file class.ilLocalUserGUI.php.

References ilObjUser\_lookupName(), checkPermission(), ILIAS\Repository\ctrl(), index(), and ILIAS\Repository\lng().

207  : void
208  {
209  $this->checkPermission("cat_administrate_users");
210  if (!count($_POST['id'])) {
211  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_users_selected'));
212  $this->index();
213  return;
214  }
215  $confirm = new ilConfirmationGUI();
216  $confirm->setFormAction($this->ctrl->getFormAction($this));
217  $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
218  $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
219  $confirm->setCancel($this->lng->txt('cancel'), 'index');
220  foreach ($_POST['id'] as $user) {
221  $name = ilObjUser::_lookupName((int) $user);
222  $confirm->addItem(
223  'user_ids[]',
224  $user,
225  $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
226  );
227  }
228  $this->tpl->setContent($confirm->getHTML());
229  }
index(bool $show_delete=false)
static _lookupName(int $a_user_id)
lookup user name
checkPermission(string $permission)
+ Here is the call graph for this function:

◆ executeCommand()

ilLocalUserGUI::executeCommand ( )

Definition at line 92 of file class.ilLocalUserGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

92  : bool
93  {
94  $cmd = $this->ctrl->getCmd();
95  switch ($cmd) {
96  case "assignRoles":
97  case "assignSave":
98  $this->tabsGui->clearTargets();
99  $this->tabsGui->setBackTarget(
100  $this->lng->txt("back"),
101  $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
102  );
103  $this->$cmd();
104  break;
105  default:
106  $this->$cmd();
107  break;
108  }
109 
110  return true;
111  }
+ Here is the call graph for this function:

◆ getAssignableRoles()

ilLocalUserGUI::getAssignableRoles ( )
Exceptions
ilObjectNotFoundException
ilDatabaseException

Definition at line 359 of file class.ilLocalUserGUI.php.

References ilObjectFactory\getInstanceByObjId(), getObjId(), and SYSTEM_ROLE_ID.

Referenced by assignRoles(), and assignSave().

359  : array
360  {
361  // check local user
362  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->getObjId());
363  // Admin => all roles
364  if (in_array(SYSTEM_ROLE_ID, $this->rbacReview->assignedRoles($this->user->getId())) === true) {
365  $global_roles = $this->rbacReview->getGlobalRolesArray();
366  } elseif ($tmp_obj->getTimeLimitOwner() == $this->object->getRefId()) {
367  $global_roles = $this->rbacReview->getGlobalAssignableRoles();
368  } else {
369  $global_roles = array();
370  }
371 
372  return array_merge($global_roles, $this->rbacReview->getAssignableChildRoles($this->object->getRefId()));
373  }
const SYSTEM_ROLE_ID
Definition: constants.php:29
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntFromQuery()

ilLocalUserGUI::getIntFromQuery ( string  $var)
protected

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

References ILIAS\Repository\refinery().

Referenced by getObjId(), and getRefId().

84  : ?int
85  {
86  return $this->query_wrapper->retrieve(
87  $var,
88  $this->refinery->kindlyTo()->int()
89  );
90  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObject()

ilLocalUserGUI::getObject ( )

Definition at line 112 of file class.ilLocalUserGUI.php.

References $object.

112  : ilObjOrgUnit
113  {
114  return $this->object;
115  }

◆ getObjId()

ilLocalUserGUI::getObjId ( )
protected

Definition at line 79 of file class.ilLocalUserGUI.php.

References getIntFromQuery().

Referenced by assignRoles(), assignSave(), checkGlobalRoles(), getAssignableRoles(), and showRolesTable().

80  {
81  return $this->getIntFromQuery('obj_id');
82  }
getIntFromQuery(string $var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRefId()

ilLocalUserGUI::getRefId ( )

Definition at line 75 of file class.ilLocalUserGUI.php.

References getIntFromQuery().

Referenced by performDeleteUsers().

76  {
77  return $this->getIntFromQuery('ref_id');
78  }
getIntFromQuery(string $var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index()

ilLocalUserGUI::index ( bool  $show_delete = false)

Definition at line 133 of file class.ilLocalUserGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilUserTableGUI\MODE_LOCAL_USER, SYSTEM_ROLE_ID, and ILIAS\Repository\toolbar().

Referenced by applyFilter(), assignRoles(), assignSave(), deleteUsers(), and resetFilter().

133  : bool
134  {
135  $this->tpl->addBlockfile(
136  'ADM_CONTENT',
137  'adm_content',
138  'tpl.cat_admin_users.html',
139  "components/ILIAS/Category"
140  );
141  if (count($this->rbacReview->getGlobalAssignableRoles())
142  or in_array(SYSTEM_ROLE_ID, $this->rbacReview->assignedRoles($this->user->getId()))
143  ) {
144  $this->toolbar->addComponent(
145  $this->ui_factory->link()->standard(
146  $this->lng->txt('add_user'),
147  $this->ctrl->getLinkTargetByClass("ilobjusergui", "create")
148  )
149  );
150  $this->toolbar->addComponent(
151  $this->ui_factory->link()->standard(
152  $this->lng->txt('import_users'),
153  $this->ctrl->getLinkTargetByClass("ilobjuserfoldergui", "importUserForm")
154  )
155  );
156  } else {
157  $this->tpl->setOnScreenMessage('info', $this->lng->txt('no_roles_user_can_be_assigned_to'));
158  }
159  if ($show_delete) {
160  $this->tpl->setCurrentBlock("confirm_delete");
161  $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
162  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
163  $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
164  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
165  $this->tpl->parseCurrentBlock();
166  }
167  $table = new ilUserTableGUI($this, 'index', ilUserTableGUI::MODE_LOCAL_USER);
168  $this->tpl->setVariable('USERS_TABLE', $table->getHTML());
169 
170  return true;
171  }
const SYSTEM_ROLE_ID
Definition: constants.php:29
TableGUI class for user administration.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTableGUI()

ilLocalUserGUI::initTableGUI ( )
protected

Definition at line 441 of file class.ilLocalUserGUI.php.

Referenced by showRolesTable().

441  : ilTableGUI
442  {
443  return new ilTableGUI([], false);
444  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ performDeleteUsers()

ilLocalUserGUI::performDeleteUsers ( )

Definition at line 188 of file class.ilLocalUserGUI.php.

References $user_id, ilLocalUser\_getAllUserIds(), checkPermission(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByObjId(), getRefId(), ILIAS\Repository\lng(), and ILIAS\Repository\logger().

188  : bool
189  {
190  $this->checkPermission("cat_administrate_users");
191  foreach ($_POST['user_ids'] as $user_id) {
192  if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->getRefId()))) {
193  $this->logger->write(__FILE__ . ":" . __LINE__ . " User with id $user_id could not be found.");
194  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('user_not_found_to_delete'));
195  }
196  if (!$tmp_obj = ilObjectFactory::getInstanceByObjId((int) $user_id, false)) {
197  continue;
198  }
199  $tmp_obj->delete();
200  }
201  $this->tpl->setOnScreenMessage('success', $this->lng->txt('deleted_users'), true);
202  $this->ctrl->redirect($this, 'index');
203 
204  return true;
205  }
static _getAllUserIds(int $a_filter=0)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission(string $permission)
+ Here is the call graph for this function:

◆ resetFilter()

ilLocalUserGUI::resetFilter ( )
protected

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

References index(), and ilUserTableGUI\MODE_LOCAL_USER.

117  : void
118  {
119  $table = new ilUserTableGUI($this, "index", ilUserTableGUI::MODE_LOCAL_USER);
120  $table->resetOffset();
121  $table->resetFilter();
122  $this->index();
123  }
index(bool $show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ setTableGUIBasicData()

ilLocalUserGUI::setTableGUIBasicData (   $tbl,
$result_set,
string  $a_from = "" 
)
protected

Definition at line 446 of file class.ilLocalUserGUI.php.

References $r, $refinery, and ILIAS\Repository\lng().

Referenced by showRolesTable().

446  : void
447  {
449  $order = $this->query_wrapper->retrieve("sort_by", $r->byTrying([
450  $r->kindlyTo()->string(),
451  $r->always('title')
452  ]));
453  $direction = $this->query_wrapper->retrieve("sort_order", $r->byTrying([
454  $r->kindlyTo()->string(),
455  $r->always('asc')
456  ]));
457  $offset = $this->query_wrapper->retrieve("offset", $r->byTrying([
458  $r->kindlyTo()->int(),
459  $r->always(0)
460  ]));
461  $limit = $this->query_wrapper->retrieve("limit", $r->byTrying([
462  $r->kindlyTo()->int(),
463  $r->always(0)
464  ]));
465 
466  if ($a_from == 'clipboardObject') {
467  $tbl->disable("footer");
468  }
469  $tbl->disable("linkbar");
470 
471  $tbl->setOrderColumn((string) $order);
472  $tbl->setOrderDirection((string) $direction);
473  $tbl->setOffset((int) $offset);
474  $tbl->setLimit((int) $limit);
475  $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
476  $tbl->setData($result_set);
477  }
ILIAS Refinery Factory $refinery
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showRolesTable()

ilLocalUserGUI::showRolesTable (   $a_result_set,
  $a_from = "" 
)
Exceptions
ilObjectNotFoundException
ilDatabaseException
ilTemplateException
ilCtrlException

Definition at line 382 of file class.ilLocalUserGUI.php.

References $_GET, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilObjectFactory\getInstanceByObjId(), getObjId(), initTableGUI(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), setTableGUIBasicData(), and ILIAS\UICore\GlobalTemplate\setVariable().

Referenced by assignRoles().

382  : bool
383  {
384  if ($this->access->checkAccess("cat_administrate_users", "", $this->getRefId()) === false) {
385  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
386  $this->ctrl->redirect($this, "");
387  }
388  $tbl = $this->initTableGUI();
389  $tpl = $tbl->getTemplateObject();
390  // SET FORMAACTION
391  $tpl->setCurrentBlock("tbl_form_header");
392  $this->ctrl->setParameter($this, 'obj_id', $this->getObjId());
393  $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
395  // SET FOOTER BUTTONS
396  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("nav/arrow_downright.svg"));
397  $tpl->setVariable("BTN_NAME", "assignSave");
398  $tpl->setVariable("BTN_VALUE", $this->lng->txt("change_assignment"));
399  $tpl->setCurrentBlock("tbl_action_row");
401  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->getObjId());
402  $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
403  $tbl->setTitle($title, "standard/icon_role.svg", $this->lng->txt("role_assignment"));
404  $tbl->setHeaderNames(array(
405  '',
406  $this->lng->txt("title"),
407  $this->lng->txt('description'),
408  $this->lng->txt("type"),
409  ));
410  $tbl->setHeaderVars(array(
411  "",
412  "title",
413  "description",
414  "type",
415  ), (get_class($this->parentGui) == 'ilObjOrgUnitGUI')
416  ? array(
417  "ref_id" => $this->object->getRefId(),
418  "cmd" => "assignRoles",
419  "obj_id" => $this->getObjId(),
420  "cmdNode" => $_GET["cmdNode"],
421  "baseClass" => 'ilAdministrationGUI',
422  "admin_mode" => "settings",
423  )
424  : array(
425  "ref_id" => $this->object->getRefId(),
426  "cmd" => "assignRoles",
427  "obj_id" => $this->getObjId(),
428  "cmdClass" => "ilobjcategorygui",
429  "baseClass" => 'ilRepositoryGUI',
430  "cmdNode" => $_GET["cmdNode"],
431  ));
432  $tbl->setColumnWidth(array("4%", "35%", "45%", "16%"));
433  $this->set_unlimited = true;
434  $this->setTableGUIBasicData($tbl, $a_result_set, $a_from);
435  $tbl->render();
436  $this->tpl->setVariable('OBJECTS', $tbl->getTemplateObject()->get());
437 
438  return true;
439  }
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
$_GET["client_id"]
Definition: webdav.php:30
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ilGlobalTemplateInterface $tpl
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
setTableGUIBasicData($tbl, &$result_set, string $a_from="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilLocalUserGUI::$access
private

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

◆ $ctrl

ilCtrl ilLocalUserGUI::$ctrl
private

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

◆ $form

ilPropertyFormGUI ilLocalUserGUI::$form
private

Definition at line 30 of file class.ilLocalUserGUI.php.

◆ $lng

ilLanguage ilLocalUserGUI::$lng
private

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

◆ $logger

ILIAS DI LoggingServices ilLocalUserGUI::$logger
private

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

◆ $object

ilLocalUserGUI::$object
private

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

Referenced by getObject().

◆ $parentGui

ilObjectGUI ilLocalUserGUI::$parentGui
private

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

Referenced by __construct().

◆ $query_wrapper

ILIAS HTTP Wrapper RequestWrapper ilLocalUserGUI::$query_wrapper
protected

Definition at line 44 of file class.ilLocalUserGUI.php.

◆ $rbacAdmin

ilRbacAdmin ilLocalUserGUI::$rbacAdmin
private

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

◆ $rbacReview

ilRbacReview ilLocalUserGUI::$rbacReview
private

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

◆ $rbacSystem

ilRbacSystem ilLocalUserGUI::$rbacSystem
private

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

◆ $refinery

ILIAS Refinery Factory ilLocalUserGUI::$refinery
protected

Definition at line 45 of file class.ilLocalUserGUI.php.

Referenced by setTableGUIBasicData().

◆ $set_unlimited

bool ilLocalUserGUI::$set_unlimited
private

Definition at line 46 of file class.ilLocalUserGUI.php.

◆ $tabsGui

ilTabsGUI ilLocalUserGUI::$tabsGui
private

Definition at line 29 of file class.ilLocalUserGUI.php.

◆ $toolbar

ilToolbarGUI ilLocalUserGUI::$toolbar
private

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

◆ $tpl

ilGlobalTemplateInterface ilLocalUserGUI::$tpl
private

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

◆ $ui_factory

ILIAS UI Factory ilLocalUserGUI::$ui_factory
protected

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

◆ $user

ilObjUser ilLocalUserGUI::$user
private

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


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