ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilObjCategoryGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
37 {
38  public const CONTAINER_SETTING_TAXBLOCK = "tax_sblock_";
39  protected \ILIAS\Taxonomy\Service $taxonomy;
40 
42  protected ilHelpGUI $help;
43  protected bool $info_screen_enabled = false;
44  protected ilObjectGUI $gui_obj;
45  protected bool $creation_mode;
48 
49  public function __construct(
50  $a_data,
51  int $a_id,
52  bool $a_call_by_reference = true,
53  bool $a_prepare_output = true
54  ) {
55  global $DIC;
56 
57  $this->rbacsystem = $DIC->rbac()->system();
58  $this->nav_history = $DIC["ilNavigationHistory"];
59  $this->access = $DIC->access();
60  $this->ctrl = $DIC->ctrl();
61  $this->tabs = $DIC->tabs();
62  $this->help = $DIC["ilHelp"];
63  $this->lng = $DIC->language();
64  $this->user = $DIC->user();
65  $this->tree = $DIC->repositoryTree();
66  $this->error = $DIC["ilErr"];
67  $this->settings = $DIC->settings();
68  $this->tpl = $DIC["tpl"];
69  $this->toolbar = $DIC->toolbar();
70  $this->rbacreview = $DIC->rbac()->review();
71  $this->rbacadmin = $DIC->rbac()->admin();
72 
73  $this->lng->loadLanguageModule('cat');
74  $this->lng->loadLanguageModule('obj');
75 
76  $this->type = "cat";
77  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
78 
79  if (is_object($this->object)) {
80  $this->info_screen_enabled = (bool) ilContainer::_lookupContainerSetting(
81  $this->object->getId(),
83  '1'
84  );
85 
86  }
87  $this->cat_request = $DIC
88  ->category()
89  ->internal()
90  ->gui()
91  ->standardRequest();
92  $this->taxonomy = $DIC->taxonomy();
93  }
94 
95  public function executeCommand(): void
96  {
97  $ilNavigationHistory = $this->nav_history;
98  $ilAccess = $this->access;
99  $ilCtrl = $this->ctrl;
100  $ilTabs = $this->tabs;
101 
102  $next_class = $this->ctrl->getNextClass($this);
103  $cmd = $this->ctrl->getCmd();
104 
105  $header_action = true;
106  switch ($next_class) {
107  case strtolower(ilRepositoryTrashGUI::class):
108  $ru = new ilRepositoryTrashGUI($this);
109  $this->ctrl->setReturn($this, 'trash');
110  $this->ctrl->forwardCommand($ru);
111  break;
112 
113  case "ilobjusergui":
114  $this->tabs_gui->setTabActive('administrate_users');
115  if ($this->cat_request->getObjId() === 0) {
116  $this->gui_obj = new ilObjUserGUI(
117  "",
118  $this->cat_request->getRefId(),
119  true,
120  false
121  );
122  } else {
123  $this->gui_obj = new ilObjUserGUI(
124  "",
125  $this->cat_request->getObjId(),
126  false,
127  false
128  );
129  }
130  $this->gui_obj->setCreationMode($this->creation_mode);
131  $this->ctrl->forwardCommand($this->gui_obj);
132 
133  $ilTabs->clearTargets();
134  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
135  $ilHelp = $this->help;
136  $ilHelp->setScreenIdComponent("cat");
137  $ilHelp->setScreenId("administrate_user");
138  $ilHelp->setSubScreenId($ilCtrl->getCmd());
139  break;
140 
141  case "ilobjuserfoldergui":
142  $this->gui_obj = new ilObjUserFolderGUI(
143  "",
144  $this->cat_request->getRefId(),
145  true
146  );
147  $this->gui_obj->setUserOwnerId($this->cat_request->getRefId());
148  $this->gui_obj->setCreationMode($this->creation_mode);
149  $this->ctrl->forwardCommand($this->gui_obj);
150 
151  $ilTabs->clearTargets();
152  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
153  $ilHelp = $this->help;
154  $ilHelp->setScreenIdComponent("cat");
155  $ilHelp->setScreenId("administrate_user");
156  $ilHelp->setSubScreenId($ilCtrl->getCmd());
157  break;
158 
159  case "ilcolumngui":
160  $this->checkPermission("read");
161  $this->prepareOutput();
162  $this->content_style_gui->addCss(
163  $this->tpl,
164  $this->object->getRefId()
165  );
166  $this->renderObject();
167  break;
168 
169  case 'ilpermissiongui':
170  $this->prepareOutput();
171  $this->tabs_gui->setTabActive('perm_settings');
172  $perm_gui = new ilPermissionGUI($this);
173  $this->ctrl->forwardCommand($perm_gui);
174  break;
175 
176  case 'ilinfoscreengui':
177  if ($this->info_screen_enabled) {
178  $this->prepareOutput();
179  $this->infoScreen();
180  }
181  break;
182 
183  // container page editing
184  case "ilcontainerpagegui":
185  $this->prepareOutput(false);
186  $ret = $this->forwardToPageObject();
187  if ($ret !== "") {
188  $this->tpl->setContent($ret);
189  }
190  $header_action = false;
191  break;
192 
193  case 'ilobjectcopygui':
194  $this->prepareOutput();
195 
196  $cp = new ilObjectCopyGUI($this);
197  $cp->setType('cat');
198  $this->ctrl->forwardCommand($cp);
199  break;
200 
201  case "ilobjectcontentstylesettingsgui":
202  $this->checkPermission("write");
203  $this->setTitleAndDescription();
204  $this->showContainerPageTabs();
205  $settings_gui = $this->content_style_gui
206  ->objectSettingsGUIForRefId(
207  null,
208  $this->object->getRefId()
209  );
210  $this->ctrl->forwardCommand($settings_gui);
211  break;
212 
213  case 'ilusertablegui':
214  $u_table = new ilUserTableGUI($this, "listUsers");
215  $u_table->initFilter();
216  $this->ctrl->setReturn($this, 'listUsers');
217  $this->ctrl->forwardCommand($u_table);
218  break;
219 
220  case "ilcommonactiondispatchergui":
221  $this->prepareOutput();
223  $this->ctrl->forwardCommand($gui);
224  break;
225 
226  case 'ildidactictemplategui':
227  $this->ctrl->setReturn($this, 'edit');
228  $did = new ilDidacticTemplateGUI($this);
229  $this->ctrl->forwardCommand($did);
230  break;
231 
232  case 'ilexportgui':
233  $this->prepareOutput();
234  $this->tabs_gui->setTabActive('export');
235  $exp = new ilExportGUI($this);
236  $exp->addFormat('xml');
237  $this->ctrl->forwardCommand($exp);
238  break;
239 
240  case 'ilobjecttranslationgui':
241  $this->checkPermissionBool("write");
242  $this->prepareOutput();
243  //$this->tabs_gui->setTabActive('export');
244  $this->setEditTabs("settings_trans");
245  $transgui = new ilObjectTranslationGUI($this);
246  $this->ctrl->forwardCommand($transgui);
247  break;
248 
249  case strtolower(ilTaxonomySettingsGUI::class):
250  $this->checkPermissionBool("write");
251  $this->prepareOutput();
252  $this->setEditTabs("taxonomy");
253  $tax_gui = $this->taxonomy->gui()->getSettingsGUI(
254  $this->object->getId(),
255  $this->lng->txt("cntr_tax_settings_info"),
256  true,
257  $this
258  );
259  $this->ctrl->forwardCommand($tax_gui);
260  break;
261 
262  case 'ilobjectmetadatagui':
263  $this->checkPermissionBool("write");
264  $this->prepareOutput();
265  $this->tabs_gui->activateTab('meta_data');
266  $this->ctrl->forwardCommand($this->getObjectMetadataGUI());
267  break;
268 
269  case "ilcontainernewssettingsgui":
270  $this->prepareOutput();
271  $this->tabs_gui->setTabActive('settings');
272  $this->setEditTabs();
273  $this->tabs_gui->activateSubTab('obj_news_settings');
274  $news_set_gui = new ilContainerNewsSettingsGUI($this);
275  $news_set_gui->setHideByDate(true);
276  $this->ctrl->forwardCommand($news_set_gui);
277  break;
278 
279  case 'ilcontainerfilteradmingui':
280  $this->checkPermissionBool("write");
281  $this->prepareOutput();
282  $this->setEditTabs($active_tab = "settings_filter");
283  $this->tabs_gui->activateTab('settings');
284  $this->ctrl->forwardCommand(new ilContainerFilterAdminGUI($this));
285  break;
286 
287  default:
288  if ($cmd === "infoScreen") {
289  $this->checkPermission("visible");
290  } else {
291  $this->checkPermission("read");
292  }
293 
294  // add entry to navigation history
295  if (!$this->getCreationMode() &&
296  $ilAccess->checkAccess("read", "", $this->cat_request->getRefId())) {
297  $ilNavigationHistory->addItem(
298  $this->cat_request->getRefId(),
299  ilLink::_getLink($this->cat_request->getRefId(), "cat"),
300  "cat"
301  );
302  }
303 
304  $this->prepareOutput();
305  if (is_object($this->object)) {
306  $this->content_style_gui->addCss(
307  $this->tpl,
308  $this->object->getRefId()
309  );
310  }
311 
312  if (!$cmd) {
313  $cmd = "render";
314  }
315  $cmd .= "Object";
316  $this->tabs_gui->activateTab("view_content"); // see #19868
317  $this->$cmd();
318 
319  break;
320  }
321 
322  if ($header_action) {
323  $this->addHeaderAction();
324  }
325  }
326 
327 
329  {
330  $md_gui = new ilObjectMetaDataGUI($this->object);
331  /*
332  if (ilContainer::_lookupContainerSetting(
333  $this->object->getId(),
334  ilObjectServiceSettingsGUI::TAXONOMIES,
335  '0'
336  )) {
337  $md_gui->enableTaxonomyDefinition(true);
338  $tax = $md_gui->getTaxonomyObjGUI();
339  $tax->setMultiple(true);
340  $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
341  $taxonomies = $this->getTaxonomiesForRefId();
342  if (count($taxonomies)) {
343  $md_gui->setTaxonomySettings(function ($form) {
344  $tax = $this->getTaxonomiesForRefId();
345  $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
346  $form->addItem($block);
347 
348  $current = $this->getActiveBlocks();
349 
350  $value = null;
351  foreach ($tax as $tax_id => $tax_item) {
352  $option = new ilCheckboxOption(
353  $tax_item["title"],
354  (string) $tax_id,
355  ilObject::_lookupDescription($tax_id)
356  );
357 
358  if ((int) $tax_item["source"] !== $this->object->getRefId()) {
359  $loc = new ilLocatorGUI();
360  $loc->setTextOnly(true);
361  $loc->addRepositoryItems((int) $tax_item["source"]);
362  $option->setInfo($loc->getHTML());
363  }
364 
365  $block->addOption($option);
366 
367  if (in_array($tax_id, $current)) {
368  $value[] = $tax_id;
369  }
370  }
371 
372  $block->setValue($value);
373  }, function ($form) {
374  $taxonomies = $this->getTaxonomiesForRefId();
375  if (count($taxonomies)) {
376  $sblock = $form->getInput("sblock");
377 
378  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
379 
380  ilContainer::_deleteContainerSettings(
381  $this->object->getId(),
382  $prefix . "%",
383  true
384  );
385 
386  if (is_array($sblock)) {
387  foreach ($sblock as $tax_id) {
388  ilContainer::_writeContainerSetting(
389  $this->object->getId(),
390  $prefix . $tax_id,
391  '1'
392  );
393  }
394  }
395  }
396  });
397  }
398  }*/
399  return $md_gui;
400  }
401 
402  protected function showTaxAsSideBlockObject(): void
403  {
404  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
405  $tax_id = $this->cat_request->getTaxId();
407  $this->object->getId(),
408  $prefix . $tax_id,
409  '1'
410  );
411  $this->ctrl->redirectByClass(ilTaxonomySettingsGUI::class, "");
412  }
413 
414  protected function hideTaxAsSideBlockObject(): void
415  {
416  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
417  $tax_id = $this->cat_request->getTaxId();
419  $this->object->getId(),
420  $prefix . $tax_id
421  );
422  $this->ctrl->redirectByClass(ilTaxonomySettingsGUI::class, "");
423  }
424 
425  public function getProperties(
426  int $tax_id
427  ): array {
428  $active = in_array($tax_id, $this->getActiveBlocks());
429  $value = $active
430  ? $this->lng->txt("yes")
431  : $this->lng->txt("no");
432 
433  return [
434  $this->lng->txt("cntr_taxonomy_show_sideblock") => $value
435  ];
436  }
437 
438  public function getActions(
439  int $tax_id
440  ): array {
441  $actions = [];
442  $this->ctrl->setParameterByClass(self::class, "cat_tax_id", $tax_id);
443  $active = in_array($tax_id, $this->getActiveBlocks());
444  if (!$active) {
445  $actions[] = $this->ui->factory()->button()->shy(
446  $this->lng->txt("cat_show_tax_in_side_block"),
447  $this->ctrl->getLinkTargetByClass(
448  self::class,
449  "showTaxAsSideBlock"
450  )
451  );
452  } else {
453  $actions[] = $this->ui->factory()->button()->shy(
454  $this->lng->txt("cat_hide_tax_in_side_block"),
455  $this->ctrl->getLinkTargetByClass(
456  self::class,
457  "hideTaxAsSideBlock"
458  )
459  );
460  }
461  $this->ctrl->setParameterByClass(self::class, "cat_tax_id", null);
462 
463  return $actions;
464  }
465 
466 
467  protected function getTabs(): void
468  {
470  $lng = $this->lng;
471  $ilHelp = $this->help;
472  $ilAccess = $this->access;
473 
474  if ($this->ctrl->getCmd() === "editPageContent") {
475  return;
476  }
477 
478  $ilHelp->setScreenIdComponent("cat");
479 
480  if ($rbacsystem->checkAccess('read', $this->ref_id)) {
481  $this->tabs_gui->addTab(
482  "view_content",
483  $lng->txt("content"),
484  $this->ctrl->getLinkTarget($this, "")
485  );
486 
487  //BEGIN ChangeEvent add info tab to category object
488  if ($this->info_screen_enabled) {
489  $force_active = $this->ctrl->getNextClass() === "ilinfoscreengui"
490  || strtolower($this->cat_request->getCmdClass()) === "ilnotegui";
491  $this->tabs_gui->addTarget(
492  "info_short",
493  $this->ctrl->getLinkTargetByClass(
494  ["ilobjcategorygui", "ilinfoscreengui"],
495  "showSummary"
496  ),
497  ["showSummary", "", "infoScreen"],
498  "",
499  "",
500  $force_active
501  );
502  }
503  //END ChangeEvent add info tab to category object
504  }
505 
506  if ($rbacsystem->checkAccess('write', $this->ref_id)) {
507  $force_active = ($this->ctrl->getCmd() === "edit");
508  $this->tabs_gui->addTarget(
509  "settings",
510  $this->ctrl->getLinkTarget($this, "edit"),
511  "edit",
512  get_class($this),
513  "",
514  $force_active
515  );
516 
517 
518 
519  // metadata / taxonomies
520  $mdgui = new ilObjectMetaDataGUI($this->object);
521  /*if (ilContainer::_lookupContainerSetting(
522  $this->object->getId(),
523  ilObjectServiceSettingsGUI::TAXONOMIES,
524  '0'
525  )) {
526  $mdgui->enableTaxonomyDefinition(true);
527  }*/
528  $mdtab = $mdgui->getTab();
529  if ($mdtab) {
530  $this->tabs_gui->addTab(
531  "meta_data",
532  $this->lng->txt("meta_data"),
533  $mdtab
534  );
535  }
536  }
537 
538  if (ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() &&
539  $rbacsystem->checkAccess('cat_administrate_users', $this->ref_id)) {
540  $this->tabs_gui->addTarget(
541  "administrate_users",
542  $this->ctrl->getLinkTarget($this, "listUsers"),
543  "listUsers",
544  get_class($this)
545  );
546  }
547 
548  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
549  $this->tabs_gui->addTarget(
550  'export',
551  $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
552  'export',
553  'ilexportgui'
554  );
555  }
556 
557  // parent tabs (all container: edit_permission, clipboard, trash
558  parent::getTabs();
559  }
560 
564  public function renderObject(): void
565  {
566  $ilTabs = $this->tabs;
567 
568  $ilTabs->activateTab("view_content");
569  parent::renderObject();
570 
572  $this->object->getType(),
573  $this->object->getRefId(),
574  $this->object->getId(),
575  $this->user->getId()
576  );
577  }
578 
579  public function viewObject(): void
580  {
581  if (strtolower($this->cat_request->getBaseClass()) === "iladministrationgui") {
582  parent::viewObject();
583  return;
584  }
585  $this->renderObject();
586  }
587 
588  protected function initCreationForms(string $new_type): array
589  {
590  $forms = parent::initCreationForms($new_type);
591  //unset($forms[self::CFORM_IMPORT]);
592  return $forms;
593  }
594 
595  protected function afterSave(ilObject $new_object): void
596  {
597  $tree = $this->tree;
598 
599  // default: sort by title
600  $settings = new ilContainerSortingSettings($new_object->getId());
601  $settings->setSortMode(ilContainer::SORT_TITLE);
602  $settings->save();
603 
604  // inherit parents content style, if not individual
605  $this->content_style_domain
606  ->styleForRefId($new_object->getRefId())
607  ->inheritFromParent();
608 
609  // always send a message
610  $this->tpl->setOnScreenMessage('success', $this->lng->txt("cat_added"), true);
611  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
612  $this->redirectToRefId($new_object->getRefId(), "");
613  }
614 
620  public function infoScreenObject(): void
621  {
622  $this->ctrl->setCmd("showSummary");
623  $this->ctrl->setCmdClass("ilinfoscreengui");
624  $this->infoScreen();
625  }
626 
630  public function infoScreen(): string
631  {
632  $ilAccess = $this->access;
633  $ilCtrl = $this->ctrl;
635 
636  if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
637  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
638  }
639 
640  if (!$this->info_screen_enabled) {
641  return "";
642  }
643 
644  // #10986
645  $this->tabs_gui->setTabActive('info_short');
646 
647  $info = new ilInfoScreenGUI($this);
648 
649  $info->enablePrivateNotes();
650 
651  if ($ilAccess->checkAccess("read", "", $this->cat_request->getRefId())) {
652  $info->enableNews();
653  }
654 
655  // no news editing for files, just notifications
656  $info->enableNewsEditing(false);
657  if ($ilAccess->checkAccess("write", "", $this->cat_request->getRefId())) {
658  $news_set = new ilSetting("news");
659  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
660 
661  if ($enable_internal_rss) {
662  $info->setBlockProperty("news", "settings", '1');
663  $info->setBlockProperty("news", "public_notifications_option", '1');
664  }
665  }
666 
667  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'cat', $this->object->getId());
668  $record_gui->setInfoObject($info);
669  $record_gui->parse();
670 
671 
672  // standard meta data
673  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
674 
675  // forward the command
676  if ($ilCtrl->getNextClass() === "ilinfoscreengui") {
677  $ilCtrl->forwardCommand($info);
678  } else {
679  return $ilCtrl->getHTML($info);
680  }
681  return "";
682  }
683 
684  protected function editInfoObject(): void
685  {
686  $this->checkPermission("write");
687  $this->setEditTabs();
688  $this->tabs_gui->activateTab('settings');
689  $this->tabs_gui->setSubTabActive('edit_cat_settings');
690 
691  $this->initExtendedSettings();
692  $this->tpl->setContent($this->form->getHTML());
693  }
694 
695  // Update info (extended meta data)
696  protected function updateInfoObject(): void
697  {
698  $this->checkPermission("write");
699 
700  // init form
701  $this->initExtendedSettings();
702 
703  // still needed for date conversion and so on
704  $this->form->checkInput();
705 
706  if ($this->record_gui->importEditFormPostValues()) {
707  $this->record_gui->writeEditForm();
708 
709  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
710  $this->ctrl->redirect($this, "editInfo");
711  }
712 
713  $this->editInfoObject();
714  }
715 
716 
717  // build property form for extended category settings
718  protected function initExtendedSettings(): bool
719  {
720  if (is_object($this->form)) {
721  return true;
722  }
723 
724  $this->form = new ilPropertyFormGUI();
725  $this->form->setFormAction($this->ctrl->getFormAction($this));
726  $this->form->setTitle($this->lng->txt('ext_cat_settings'));
727  $this->form->addCommandButton('updateInfo', $this->lng->txt('save'));
728  $this->form->addCommandButton('editInfo', $this->lng->txt('cancel'));
729 
730  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'cat', $this->object->getId());
731  $this->record_gui->setPropertyForm($this->form);
732  $this->record_gui->parse();
733 
734  return true;
735  }
736 
737  protected function setEditTabs($active_tab = "settings_misc"): void
738  {
739  $this->tabs_gui->addSubTab(
740  "settings_misc",
741  $this->lng->txt("settings"),
742  $this->ctrl->getLinkTarget($this, "edit")
743  );
744 
745  $this->tabs_gui->addSubTab(
746  "settings_trans",
747  $this->lng->txt("obj_multilinguality"),
748  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
749  );
750 
751  //news tab
753  $this->object->getId(),
755  '1'
756  );
757 
758  if ($news_active) {
759  $this->tabs_gui->addSubTab(
760  'obj_news_settings',
761  $this->lng->txt("cont_news_settings"),
762  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
763  );
764  }
765 
766  $this->tabs_gui->addSubTab(
767  "settings_filter",
768  $this->lng->txt("cont_filter"),
769  $this->ctrl->getLinkTargetByClass("ilcontainerfilteradmingui", "")
770  );
771 
772  if ($obj = $this->getObject()) {
773  $this->taxonomy->gui()->addSettingsSubTab($obj->getId());
774  }
775 
776  $this->tabs_gui->activateTab("settings");
777  $this->tabs_gui->activateSubTab($active_tab);
778  }
779 
780  protected function initEditForm(): ilPropertyFormGUI
781  {
782  $obj_service = $this->getObjectService();
783 
784  $this->lng->loadLanguageModule($this->object->getType());
785  $this->setEditTabs();
786 
787  $form = new ilPropertyFormGUI();
788  $form->setFormAction($this->ctrl->getFormAction($this));
789  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
790 
791  // title/description
792  $this->initFormTitleDescription($form);
793 
794  // Show didactic template type
795  $this->initDidacticTemplate($form);
796 
797  // presentation
798  $pres = new ilFormSectionHeaderGUI();
799  $pres->setTitle($this->lng->txt('obj_presentation'));
800  $form->addItem($pres);
801 
802  // title and icon visibility
803  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
804 
805  // top actions visibility
806  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
807 
808  // custom icon
809  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
810 
811  // tile image
812  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
813 
814  // list presentation
816 
817  // sorting
818  $form = $this->initSortingForm(
819  $form,
820  [
824  ]
825  );
826 
827  // block limit
828  $bl = new ilNumberInputGUI($this->lng->txt("cont_block_limit"), "block_limit");
829  $bl->setInfo($this->lng->txt("cont_block_limit_info"));
830  $bl->setValue(ilContainer::_lookupContainerSetting($this->object->getId(), "block_limit"));
831  $form->addItem($bl);
832 
833  // icon settings
834 
835  // Edit ecs export settings
836  $ecs = new ilECSCategorySettings($this->object);
837  $ecs->addSettingsToForm($form, 'cat');
838 
839  // services
840  $sh = new ilFormSectionHeaderGUI();
841  $sh->setTitle($this->lng->txt('obj_features'));
842  $form->addItem($sh);
843 
845  $this->object->getId(),
846  $form,
847  [
854  ]
855  );
856 
857  $form->addCommandButton("update", $this->lng->txt("save"));
858 
859  return $form;
860  }
861 
862  protected function getEditFormValues(): array
863  {
864  return [];
865  }
866 
867  public function updateObject(): void
868  {
870  $ilUser = $this->user;
871  $obj_service = $this->getObjectService();
872 
873  if (!$this->checkPermissionBool("write")) {
874  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
875  } else {
876  $form = $this->initEditForm();
877  if ($form->checkInput()) {
878  $title = $form->getInput("title");
879  $desc = $form->getInput("desc");
880 
881  $this->object->setTitle($title);
882  $this->object->setDescription($desc);
883  $this->object->update();
884 
885  $this->saveSortingSettings($form);
886 
887  // title icon visibility
888  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
889 
890  // top actions visibility
891  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
892 
893  // custom icon
894  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
895 
896  // tile image
897  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
898 
899  // list presentation
900  $this->saveListPresentation($form);
901 
902  // BEGIN ChangeEvent: Record update
903  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
904  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
905  // END ChangeEvent: Record update
906 
907  // services
909  $this->object->getId(),
910  $form,
911  [
918  ]
919  );
920 
921  // block limit
922  if ((int) $form->getInput("block_limit") > 0) {
924  $this->object->getId(),
925  "block_limit",
926  (string) ((int) $form->getInput("block_limit"))
927  );
928  } else {
929  ilContainer::_deleteContainerSettings($this->object->getId(), "block_limit");
930  }
931  // Update ecs export settings
932  $ecs = new ilECSCategorySettings($this->object);
933  if ($ecs->handleSettingsUpdate($form)) {
934  $this->afterUpdate();
935  return;
936  }
937  }
938 
939  // display form to correct errors
940  $this->setEditTabs();
942  $this->tpl->setContent($form->getHTML());
943  }
944  }
945 
946 
947  public static function _getImportDir(): string
948  {
949  return ilFileUtils::getDataDir() . "/cat_import";
950  }
951 
960  protected function resetFilterObject(): void
961  {
962  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
963  $utab->resetOffset();
964  $utab->resetFilter();
965 
966  // from "old" implementation
967  $this->listUsersObject();
968  }
969 
974  protected function applyFilterObject(): void
975  {
976  $ilTabs = $this->tabs;
977 
978  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
979  $utab->resetOffset();
980  $utab->writeFilterToSession();
981  $this->listUsersObject();
982  }
983 
984  // METHODS for local user administration
985  public function listUsersObject(bool $show_delete = false): void
986  {
987  $ilUser = $this->user;
989  $ilToolbar = $this->toolbar;
990 
993 
994  if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
995  $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
996  }
997  $this->tabs_gui->setTabActive('administrate_users');
998 
999 
1000 
1001  $this->tpl->addBlockfile(
1002  'ADM_CONTENT',
1003  'adm_content',
1004  'tpl.cat_admin_users.html',
1005  "Modules/Category"
1006  );
1007 
1008  if (count($rbacreview->getGlobalAssignableRoles()) ||
1009  in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1010  $ilToolbar->addButton(
1011  $this->lng->txt('add_user'),
1012  $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
1013  );
1014 
1015  $ilToolbar->addButton(
1016  $this->lng->txt('import_users'),
1017  $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
1018  );
1019  } else {
1020  $this->tpl->setOnScreenMessage('info', $this->lng->txt('no_roles_user_can_be_assigned_to'));
1021  }
1022 
1023  if ($show_delete) {
1024  $this->tpl->setCurrentBlock("confirm_delete");
1025  $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
1026  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
1027  $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
1028  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
1029  $this->tpl->parseCurrentBlock();
1030  }
1031 
1032  $this->lng->loadLanguageModule('user');
1033 
1034  $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
1035  $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
1036  }
1037 
1041  protected function addUserAutoCompleteObject(): void
1042  {
1043  $auto = new ilUserAutoComplete();
1044  $auto->setSearchFields(['login', 'firstname', 'lastname', 'email']);
1045  $auto->enableFieldSearchableCheck(true);
1046  //$auto->isMoreLinkAvailable(true);
1047 
1048  if (($this->cat_request->getFetchAll())) {
1049  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1050  }
1051 
1052  echo $auto->getList($this->cat_request->getTerm());
1053  exit();
1054  }
1055 
1056  public function performDeleteUsersObject(): void
1057  {
1058  $this->checkPermission("cat_administrate_users");
1059 
1060  foreach ($this->cat_request->getUserIds() as $user_id) {
1061  if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()), true)) {
1062  throw new ilException('user id not valid');
1063  }
1064  if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
1065  continue;
1066  }
1067  $tmp_obj->delete();
1068  }
1069  $this->tpl->setOnScreenMessage('success', $this->lng->txt('deleted_users'));
1070  $this->listUsersObject();
1071  }
1072 
1073  public function deleteUsersObject(): void
1074  {
1075  $this->checkPermission("cat_administrate_users");
1076  if ($this->cat_request->getIds() === []) {
1077  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_users_selected'));
1078  $this->listUsersObject();
1079  return;
1080  }
1081 
1082  $confirm = new ilConfirmationGUI();
1083  $confirm->setFormAction($this->ctrl->getFormAction($this));
1084  $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1085  $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1086  $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1087 
1088  foreach ($this->cat_request->getIds() as $user) {
1089  $name = ilObjUser::_lookupName($user);
1090 
1091  $confirm->addItem(
1092  'user_ids[]',
1093  (string) $user,
1094  $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1095  );
1096  }
1097  $this->tpl->setContent($confirm->getHTML());
1098  }
1099 
1100  public function assignRolesObject(): void
1101  {
1103  $ilTabs = $this->tabs;
1104 
1105  $this->checkPermission("cat_administrate_users");
1106 
1107  if ($this->cat_request->getObjId() === 0) {
1108  $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
1109  $this->listUsersObject();
1110  return;
1111  }
1112 
1113  $ilTabs->clearTargets();
1114  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1115  $ilHelp = $this->help;
1116  $ilHelp->setScreenIdComponent("cat");
1117  $ilHelp->setScreenId("administrate_user");
1118  $ilHelp->setSubScreenId("assign_roles");
1119 
1120 
1121  $roles = $this->getAssignableRoles();
1122 
1123  $ass_roles = $rbacreview->assignedRoles($this->cat_request->getObjId());
1124 
1125  $counter = 0;
1126  $f_result = [];
1127 
1128  foreach ($roles as $role) {
1129  $role_obj = ilObjectFactory::getInstanceByObjId((int) $role['obj_id']);
1130 
1131  $disabled = false;
1132  $f_result[$counter]['checkbox'] = ilLegacyFormElementsUtil::formCheckbox(
1133  in_array((int) $role['obj_id'], $ass_roles, true),
1134  'role_ids[]',
1135  (string) $role['obj_id'],
1136  $disabled
1137  );
1138  $f_result[$counter]['title'] = $role_obj->getTitle() ?: "";
1139  $f_result[$counter]['desc'] = $role_obj->getDescription() ?: "";
1140  $f_result[$counter]['type'] = ($role['role_type'] ?? '') === 'global' ?
1141  $this->lng->txt('global') :
1142  $this->lng->txt('local');
1143 
1144  unset($role_obj);
1145  ++$counter;
1146  }
1147 
1148  $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1149  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1150  $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1151  $table->setTitle($title, "standard/icon_role.svg", $this->lng->txt("role_assignment"));
1152  $table->setData($f_result);
1153  $this->tpl->setContent($table->getHTML());
1154  }
1155 
1156  public function assignSaveObject(): void
1157  {
1160  $this->checkPermission("cat_administrate_users");
1161 
1162  // check hack
1163  if ($this->cat_request->getObjId() === 0 ||
1164  !in_array($this->cat_request->getObjId(), ilLocalUser::_getAllUserIds(), true)) {
1165  $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
1166  $this->listUsersObject();
1167  return;
1168  }
1169  $roles = $this->getAssignableRoles();
1170 
1171  // check minimum one global role
1172  if (!$this->checkGlobalRoles($this->cat_request->getRoleIds())) {
1173  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_global_role_left'));
1174  $this->assignRolesObject();
1175  return;
1176  }
1177 
1178  $new_role_ids = $this->cat_request->getRoleIds();
1179  $assigned_roles = $rbacreview->assignedRoles($this->cat_request->getObjId());
1180  foreach ($roles as $role) {
1181  if (in_array((int) $role['obj_id'], $new_role_ids, true) && !in_array((int) $role['obj_id'], $assigned_roles, true)) {
1182  $rbacadmin->assignUser((int) $role['obj_id'], $this->cat_request->getObjId());
1183  }
1184  if (in_array((int) $role['obj_id'], $assigned_roles, true) && !in_array((int) $role['obj_id'], $new_role_ids, true)) {
1185  $rbacadmin->deassignUser((int) $role['obj_id'], $this->cat_request->getObjId());
1186  }
1187  }
1188  $this->tpl->setOnScreenMessage('success', $this->lng->txt('role_assignment_updated'));
1189  $this->assignRolesObject();
1190  }
1191 
1192  // PRIVATE
1193  private function getAssignableRoles(): array
1194  {
1196  $ilUser = $this->user;
1197 
1198  // check local user
1199  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1200  // Admin => all roles
1201  if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1202  $global_roles = $rbacreview->getGlobalRolesArray();
1203  } elseif ($tmp_obj->getTimeLimitOwner() === $this->object->getRefId()) {
1204  $global_roles = $rbacreview->getGlobalAssignableRoles();
1205  } else {
1206  $global_roles = [];
1207  }
1208  return array_merge(
1209  $global_roles,
1210  $rbacreview->getAssignableChildRoles($this->object->getRefId())
1211  );
1212  }
1213 
1214  private function checkGlobalRoles($new_assigned): bool
1215  {
1217  $ilUser = $this->user;
1218 
1219  $this->checkPermission("cat_administrate_users");
1220 
1221  // return true if it's not a local user
1222  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1223  if ($tmp_obj->getTimeLimitOwner() !== $this->object->getRefId() &&
1224  !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1225  return true;
1226  }
1227 
1228  // new assignment by form
1229  $new_assigned = $new_assigned ?: [];
1230  $assigned = $rbacreview->assignedRoles($this->cat_request->getObjId());
1231 
1232  // all assignable globals
1233  if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1235  } else {
1237  }
1238  $global_assignable = [];
1239  foreach ($ga as $role) {
1240  $global_assignable[] = $role['obj_id'];
1241  }
1242 
1243  $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1244  $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1245  $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1246 
1247  if (!count($new_visible_assigned_roles) && !count($main_assigned_roles)) {
1248  return false;
1249  }
1250  return true;
1251  }
1252 
1253  public static function _goto(string $a_target): void
1254  {
1255  global $DIC;
1256  $main_tpl = $DIC->ui()->mainTemplate();
1257 
1258  $ilAccess = $DIC->access();
1259  $ilErr = $DIC["ilErr"];
1260  $lng = $DIC->language();
1261  if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
1262  ilObjectGUI::_gotoRepositoryNode((int) $a_target);
1263  } elseif ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
1264  ilObjectGUI::_gotoRepositoryNode((int) $a_target, "infoScreen");
1265  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1266  $main_tpl->setOnScreenMessage('failure', sprintf(
1267  $lng->txt("msg_no_perm_read_item"),
1269  ), true);
1271  }
1272 
1273  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1274  }
1275 
1276  //
1277  // taxonomy
1278  //
1279 
1280  protected function initTaxSubTabs($a_active = "tax_list"): void
1281  {
1282  $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1283  $this->tabs_gui->addSubTab(
1284  "tax_settings",
1285  $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1286  $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1287  );
1288  $this->tabs_gui->addSubTab(
1289  "tax_list",
1290  $this->lng->txt("cntr_taxonomy_definitions"),
1291  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1292  );
1293  $this->tabs_gui->activateSubTab($a_active);
1294  }
1295 
1296  protected function getTaxonomiesForRefId(): array
1297  {
1298  $tree = $this->tree;
1299 
1300  // see ilTaxMDGUI::getSelectableTaxonomies()
1301 
1302  $res = [];
1303  foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1304  //if ($node["ref_id"] != $this->object->getRefId())
1305  {
1306  // find all defined taxes for parent node, activation is not relevant
1307  $node_taxes = ilObjTaxonomy::getUsageOfObject((int) $node["obj_id"], true);
1308  if (count($node_taxes)) {
1309  foreach ($node_taxes as $node_tax) {
1310  $res[$node_tax["tax_id"]] = [
1311  "title" => $node_tax["title"]
1312  , "source" => $node["child"]
1313  ];
1314  }
1315  }
1316  }
1317  }
1318 
1319  asort($res);
1320  return $res;
1321  }
1322 
1323  protected function getActiveBlocks(): array
1324  {
1325  $res = [];
1326 
1327  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1328 
1329  foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1330  if ($value && strpos($keyword, $prefix) === 0) {
1331  $res[] = substr($keyword, strlen($prefix));
1332  }
1333  }
1334 
1335  return $res;
1336  }
1337 }
static _getAllUserIds(int $a_filter=0)
Class ilObjCategoryGUI.
prepareOutput(bool $show_subobjects=true)
ilRbacSystem $rbacsystem
StandardGUIRequest $cat_request
$res
Definition: ltiservices.php:69
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAdvancedMDRecordGUI $record_gui
setPropertyForm(ilPropertyFormGUI $form)
exit
Definition: login.php:29
Class ilInfoScreenGUI.
ilRbacReview $rbacreview
infoScreen()
show information screen
saveSortingSettings(ilPropertyFormGUI $form)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
GUI class for the workflow of copying objects.
const ROOT_FOLDER_ID
Definition: constants.php:32
const SYSTEM_ROLE_ID
Definition: constants.php:29
Help GUI class.
checkGlobalRoles($new_assigned)
redirectToRefId(int $ref_id, string $cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
assignUser(int $a_rol_id, int $a_usr_id)
Assigns an user to a role.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupName(int $a_user_id)
lookup user name
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
__construct( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
listUsersObject(bool $show_delete=false)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
initCreationForms(string $new_type)
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
$ilErr
Definition: raiseError.php:17
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setCreationMode(bool $mode=true)
If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode...
global $DIC
Definition: feed.php:28
Export User Interface Class.
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
ilLanguage $lng
TableGUI class for user administration.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getGlobalRolesArray()
get only &#39;global&#39; roles
getAssignableChildRoles(int $a_ref_id)
Get all assignable roles directly under a specific node.
__construct(VocabulariesInterface $vocabularies)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilNavigationHistory $nav_history
static _lookupTitle(int $obj_id)
setFormAction(string $a_formaction)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setScreenIdComponent(string $a_comp)
applyFilterObject()
Apply filter.
initDidacticTemplate(ilPropertyFormGUI $form)
Class ilObjectGUI Basic methods of all Output classes.
initTaxSubTabs($a_active="tax_list")
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
Repository GUI Utilities.
ilToolbarGUI $toolbar
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
resetFilterObject()
import categories (static, also called by RootFolderGUI)
afterSave(ilObject $new_object)
getGlobalRoles()
get only &#39;global&#39; roles
static getDataDir()
get data directory (outside webspace)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
Last visited history for repository items.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilErrorHandling $error
static _goto(string $a_target)
static formCheckbox(bool $checked, string $varname, string $value, bool $disabled=false)
saveListPresentation(ilPropertyFormGUI $form)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
ilPropertyFormGUI $form
Filter administration for containers.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
renderObject()
Render category.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
setEditTabs($active_tab="settings_misc")
activateTab(string $a_id)
getGlobalAssignableRoles()
get only &#39;global&#39; roles (with flag &#39;assign_users&#39;)
form( $class_path, string $cmd, string $submit_caption="")
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
ilAccessHandler $access
setInfoObject(ilInfoScreenGUI $info)
get info sections
ILIAS Container InternalGUIService $gui
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjUserGUI.
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
ILIAS Taxonomy Service $taxonomy
addHeaderAction()
Add header action menu.
ilSetting $settings
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _getContainerSettings(int $a_id)
addUserAutoCompleteObject()
Show auto complete results.
assignedRoles(int $a_usr_id)
get all assigned roles to a given user
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static _deleteContainerSettings(int $a_id, string $a_keyword="", bool $a_keyword_like=false)
GUI class for object translation handling.
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
deassignUser(int $a_rol_id, int $a_usr_id)
Deassigns a user from a role.