19 declare(strict_types=1);
42 protected \ILIAS\Category\InternalGUIService
$cat_gui;
56 bool $a_call_by_reference =
true,
57 bool $a_prepare_output =
true 61 $this->rbacsystem = $DIC->rbac()->system();
62 $this->nav_history = $DIC[
"ilNavigationHistory"];
63 $this->
access = $DIC->access();
64 $this->
ctrl = $DIC->ctrl();
65 $this->
tabs = $DIC->tabs();
66 $this->
help = $DIC[
"ilHelp"];
67 $this->
lng = $DIC->language();
68 $this->
user = $DIC->user();
69 $this->tree = $DIC->repositoryTree();
70 $this->error = $DIC[
"ilErr"];
72 $this->tpl = $DIC[
"tpl"];
73 $this->
toolbar = $DIC->toolbar();
74 $this->rbacreview = $DIC->rbac()->review();
75 $this->rbacadmin = $DIC->rbac()->admin();
77 $this->
lng->loadLanguageModule(
'cat');
78 $this->
lng->loadLanguageModule(
'obj');
83 if (is_object($this->
object)) {
91 $this->cat_request = $DIC
96 $this->taxonomy = $DIC->taxonomy();
97 $this->cat_gui = $DIC->category()->internal()->gui();
98 $this->cat_domain = $DIC->category()->internal()->domain();
108 $next_class = $this->
ctrl->getNextClass($this);
109 $cmd = $this->
ctrl->getCmd();
111 $header_action =
true;
112 switch ($next_class) {
113 case strtolower(ilRepositoryTrashGUI::class):
115 $this->
ctrl->setReturn($this,
'trash');
116 $this->
ctrl->forwardCommand($ru);
120 $this->tabs_gui->setTabActive(
'administrate_users');
121 if ($this->cat_request->getObjId() === 0) {
124 $this->cat_request->getRefId(),
131 $this->cat_request->getObjId(),
137 $this->
ctrl->forwardCommand($this->gui_obj);
139 $ilTabs->clearTargets();
140 $ilTabs->setBackTarget($this->
lng->txt(
'backto_lua'), $this->
ctrl->getLinkTarget($this,
'listUsers'));
143 $ilHelp->setScreenId(
"administrate_user");
144 $ilHelp->setSubScreenId($ilCtrl->getCmd());
147 case "ilobjuserfoldergui":
150 $this->cat_request->getRefId(),
153 $this->gui_obj->setUserOwnerId($this->cat_request->getRefId());
154 $this->gui_obj->setCreationMode($this->creation_mode);
155 $this->
ctrl->forwardCommand($this->gui_obj);
157 $ilTabs->clearTargets();
158 $ilTabs->setBackTarget($this->
lng->txt(
'backto_lua'), $this->
ctrl->getLinkTarget($this,
'listUsers'));
161 $ilHelp->setScreenId(
"administrate_user");
162 $ilHelp->setSubScreenId($ilCtrl->getCmd());
168 $this->content_style_gui->addCss(
175 case 'ilpermissiongui':
177 $this->tabs_gui->setTabActive(
'perm_settings');
179 $this->
ctrl->forwardCommand($perm_gui);
182 case 'ilinfoscreengui':
183 if ($this->info_screen_enabled) {
190 case "ilcontainerpagegui":
194 $this->tpl->setContent($ret);
196 $header_action =
false;
199 case 'ilobjectcopygui':
204 $this->
ctrl->forwardCommand($cp);
207 case "ilobjectcontentstylesettingsgui":
211 $settings_gui = $this->content_style_gui
212 ->objectSettingsGUIForRefId(
216 $this->
ctrl->forwardCommand($settings_gui);
219 case 'ilusertablegui':
221 $u_table->initFilter();
222 $this->
ctrl->setReturn($this,
'listUsers');
223 $this->
ctrl->forwardCommand($u_table);
226 case "ilcommonactiondispatchergui":
232 case 'ildidactictemplategui':
233 $this->
ctrl->setReturn($this,
'edit');
235 $this->
ctrl->forwardCommand($did);
240 $this->tabs_gui->setTabActive(
'export');
242 $exp->addFormat(
'xml');
243 $this->
ctrl->forwardCommand($exp);
246 case strtolower(TranslationGUI::class):
264 $this->
ctrl->forwardCommand($transgui);
267 case strtolower(ilTaxonomySettingsGUI::class):
271 $tax_gui = $this->taxonomy->gui()->getSettingsGUI(
273 $this->
lng->txt(
"cntr_tax_settings_info"),
277 $this->
ctrl->forwardCommand($tax_gui);
280 case 'ilobjectmetadatagui':
283 $this->tabs_gui->activateTab(
'meta_data');
287 case "ilcontainernewssettingsgui":
289 $this->tabs_gui->setTabActive(
'settings');
291 $this->tabs_gui->activateSubTab(
'obj_news_settings');
293 $news_set_gui->setHideByDate(
true);
294 $this->
ctrl->forwardCommand($news_set_gui);
297 case 'ilcontainerfilteradmingui':
300 $this->
setEditTabs($active_tab =
"settings_filter");
301 $this->tabs_gui->activateTab(
'settings');
306 if ($cmd ===
"infoScreen") {
314 $ilAccess->checkAccess(
"read",
"", $this->cat_request->getRefId())) {
315 $ilNavigationHistory->addItem(
316 $this->cat_request->getRefId(),
317 ilLink::_getLink($this->cat_request->getRefId(),
"cat"),
323 if (is_object($this->
object)) {
324 $this->content_style_gui->addCss(
334 $this->tabs_gui->activateTab(
"view_content");
340 if ($header_action) {
422 $prefix = self::CONTAINER_SETTING_TAXBLOCK;
423 $tax_id = $this->cat_request->getTaxId();
429 $this->
ctrl->redirectByClass(ilTaxonomySettingsGUI::class,
"");
434 $prefix = self::CONTAINER_SETTING_TAXBLOCK;
435 $tax_id = $this->cat_request->getTaxId();
440 $this->
ctrl->redirectByClass(ilTaxonomySettingsGUI::class,
"");
448 ? $this->
lng->txt(
"yes")
449 : $this->
lng->txt(
"no");
452 $this->
lng->txt(
"cntr_taxonomy_show_sideblock") => $value
460 $this->
ctrl->setParameterByClass(self::class,
"cat_tax_id", $tax_id);
463 $actions[] = $this->
ui->factory()->button()->shy(
464 $this->
lng->txt(
"cat_show_tax_in_side_block"),
465 $this->
ctrl->getLinkTargetByClass(
471 $actions[] = $this->
ui->factory()->button()->shy(
472 $this->
lng->txt(
"cat_hide_tax_in_side_block"),
473 $this->
ctrl->getLinkTargetByClass(
479 $this->
ctrl->setParameterByClass(self::class,
"cat_tax_id",
null);
492 if ($this->
ctrl->getCmd() ===
"editPageContent") {
496 $ilHelp->setScreenIdComponent(
"cat");
499 $this->tabs_gui->addTab(
502 $this->
ctrl->getLinkTarget($this,
"")
506 if ($this->info_screen_enabled) {
507 $force_active = $this->
ctrl->getNextClass() ===
"ilinfoscreengui" 508 || strtolower($this->cat_request->getCmdClass()) ===
"ilnotegui";
509 $this->tabs_gui->addTarget(
511 $this->
ctrl->getLinkTargetByClass(
512 [
"ilobjcategorygui",
"ilinfoscreengui"],
515 [
"showSummary",
"",
"infoScreen"],
525 $force_active = ($this->
ctrl->getCmd() ===
"edit");
526 $this->tabs_gui->addTarget(
528 $this->
ctrl->getLinkTarget($this,
"edit"),
546 $mdtab = $mdgui->getTab();
548 $this->tabs_gui->addTab(
550 $this->
lng->txt(
"meta_data"),
558 $this->tabs_gui->addTarget(
559 "administrate_users",
560 $this->
ctrl->getLinkTarget($this,
"listUsers"),
566 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
567 $this->tabs_gui->addTarget(
569 $this->
ctrl->getLinkTargetByClass([ilRepositoryGUI::class, self::class,
'ilexportgui'],
''),
587 parent::renderObject();
591 $this->
object->getRefId(),
592 $this->
object->getId(),
599 if (strtolower($this->cat_request->getBaseClass()) ===
"iladministrationgui") {
600 parent::viewObject();
616 $this->content_style_domain
617 ->styleForRefId($new_object->
getRefId())
618 ->inheritFromParent();
621 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cat_added"),
true);
622 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
633 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
645 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
646 $ilErr->raiseError($this->
lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
649 if (!$this->info_screen_enabled) {
654 $this->tabs_gui->setTabActive(
'info_short');
658 $info->enablePrivateNotes();
660 if ($ilAccess->checkAccess(
"read",
"", $this->cat_request->getRefId())) {
665 $info->enableNewsEditing(
false);
666 if ($ilAccess->checkAccess(
"write",
"", $this->cat_request->getRefId())) {
668 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
670 if ($enable_internal_rss) {
671 $info->setBlockProperty(
"news",
"settings",
'1');
672 $info->setBlockProperty(
"news",
"public_notifications_option",
'1');
678 $record_gui->
parse();
682 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
685 if ($ilCtrl->getNextClass() ===
"ilinfoscreengui") {
686 $ilCtrl->forwardCommand(
$info);
688 return $ilCtrl->getHTML(
$info);
697 $this->tabs_gui->activateTab(
'settings');
698 $this->tabs_gui->setSubTabActive(
'edit_cat_settings');
701 $this->tpl->setContent($this->
form->getHTML());
713 $this->
form->checkInput();
715 if ($this->record_gui->importEditFormPostValues()) {
716 $this->record_gui->writeEditForm();
718 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
719 $this->
ctrl->redirect($this,
"editInfo");
729 if (is_object($this->
form)) {
734 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
735 $this->
form->setTitle($this->
lng->txt(
'ext_cat_settings'));
736 $this->
form->addCommandButton(
'updateInfo', $this->
lng->txt(
'save'));
737 $this->
form->addCommandButton(
'editInfo', $this->
lng->txt(
'cancel'));
741 $this->record_gui->parse();
746 protected function setEditTabs($active_tab =
"settings_misc"): void
748 $this->tabs_gui->addSubTab(
750 $this->
lng->txt(
"general"),
751 $this->
ctrl->getLinkTarget($this,
"edit")
754 $this->tabs_gui->addSubTab(
756 $this->
lng->txt(
"obj_multilinguality"),
757 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"")
768 $this->tabs_gui->addSubTab(
770 $this->
lng->txt(
"cont_news_settings"),
771 $this->
ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
775 $this->tabs_gui->addSubTab(
777 $this->
lng->txt(
"cont_filter"),
778 $this->
ctrl->getLinkTargetByClass(
"ilcontainerfilteradmingui",
"")
782 $this->taxonomy->gui()->addSettingsSubTab($obj->getId());
785 $this->tabs_gui->activateTab(
"settings");
786 $this->tabs_gui->activateSubTab($active_tab);
793 $this->
lng->loadLanguageModule($this->
object->getType());
801 $this->initFormTitleDescription(
$form);
808 $pres->setTitle($this->
lng->txt(
'obj_presentation'));
812 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
815 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
818 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
821 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
838 $bl->
setInfo($this->
lng->txt(
"cont_block_limit_info"));
846 $ecs->addSettingsToForm(
$form,
'cat');
850 $sh->setTitle($this->
lng->txt(
'obj_features'));
883 $ilErr->raiseError($this->
lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
890 $this->
object->setTitle($title);
891 $this->
object->setDescription($desc);
892 $this->
object->update();
897 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
900 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
903 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
906 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
942 if ($ecs->handleSettingsUpdate(
$form)) {
972 $utab->resetOffset();
973 $utab->resetFilter();
988 $utab->resetOffset();
989 $utab->writeFilterToSession();
1004 $ilErr->raiseError($this->
lng->txt(
"msg_no_perm_admin_users"),
$ilErr->MESSAGE);
1006 $this->tabs_gui->setTabActive(
'administrate_users');
1010 $this->tpl->addBlockfile(
1013 'tpl.cat_admin_users.html',
1014 "components/ILIAS/Category" 1019 $ilToolbar->addButton(
1020 $this->
lng->txt(
'add_user'),
1021 $this->
ctrl->getLinkTargetByClass(
'ilobjusergui',
'create')
1024 $ilToolbar->addButton(
1025 $this->
lng->txt(
'import_users'),
1026 $this->
ctrl->getLinkTargetByClass(
'ilobjuserfoldergui',
'importUserForm')
1029 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'no_roles_user_can_be_assigned_to'));
1033 $this->tpl->setCurrentBlock(
"confirm_delete");
1034 $this->tpl->setVariable(
"CONFIRM_FORMACTION", $this->
ctrl->getFormAction($this));
1035 $this->tpl->setVariable(
"TXT_CANCEL", $this->
lng->txt(
'cancel'));
1036 $this->tpl->setVariable(
"CONFIRM_CMD",
'performDeleteUsers');
1037 $this->tpl->setVariable(
"TXT_CONFIRM", $this->
lng->txt(
'delete'));
1038 $this->tpl->parseCurrentBlock();
1041 $this->
lng->loadLanguageModule(
'user');
1044 $this->tpl->setVariable(
'USERS_TABLE', $utab->getHTML());
1053 $auto->setSearchFields([
'login',
'firstname',
'lastname',
'email']);
1054 $auto->enableFieldSearchableCheck(
true);
1057 if (($this->cat_request->getFetchAll())) {
1061 echo $auto->getList($this->cat_request->getTerm());
1069 foreach ($this->cat_request->getUserIds() as
$user_id) {
1078 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'deleted_users'));
1085 if ($this->cat_request->getIds() === []) {
1086 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'no_users_selected'));
1092 $confirm->setFormAction($this->
ctrl->getFormAction($this));
1093 $confirm->setHeaderText($this->
lng->txt(
'sure_delete_selected_users'));
1094 $confirm->setConfirm($this->
lng->txt(
'delete'),
'performDeleteUsers');
1095 $confirm->setCancel($this->
lng->txt(
'cancel'),
'listUsers');
1097 foreach ($this->cat_request->getIds() as
$user) {
1103 $name[
'lastname'] .
', ' . $name[
'firstname'] .
' [' . $name[
'login'] .
']' 1106 $this->tpl->setContent($confirm->getHTML());
1111 $this->
ctrl->saveParameterByClass(self::class,
"obj_id");
1116 if ($this->cat_request->getObjId() === 0) {
1117 $this->tpl->setOnScreenMessage(
'failure',
'no_user_selected');
1122 $ilTabs->clearTargets();
1123 $ilTabs->setBackTarget($this->
lng->txt(
'backto_lua'), $this->
ctrl->getLinkTarget($this,
'listUsers'));
1126 $ilHelp->setScreenId(
"administrate_user");
1127 $ilHelp->setSubScreenId(
"assign_roles");
1129 $table = $this->cat_gui->assignedRoleTableBuilder(
1131 $this->cat_request->getObjId(),
1132 $this->
user->getId(),
1136 if ($table->handleCommand()) {
1139 $this->tpl->setContent($table->render());
1144 $this->
ctrl->saveParameterByClass(self::class,
"obj_id");
1146 $lng = $this->domain->lng();
1149 if ($this->cat_request->getObjId() === 0 ||
1151 $this->tpl->setOnScreenMessage(
'failure',
'no_user_selected');
1156 $this->cat_domain->assignedRolesManager(
1158 $this->cat_request->getObjId(),
1159 $this->
user->getId()
1160 )->switchAssignment($ids);
1161 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1163 $this->tpl->setOnScreenMessage(
'failure', $e->getMessage(),
true);
1165 $this->
ctrl->redirectByClass(self::class,
"assignRoles");
1169 public static function _goto(
string $a_target): void
1172 $main_tpl = $DIC->ui()->mainTemplate();
1174 $ilAccess = $DIC->access();
1176 $lng = $DIC->language();
1177 if ($ilAccess->checkAccess(
"read",
"", (
int) $a_target)) {
1179 } elseif ($ilAccess->checkAccess(
"visible",
"", (
int) $a_target)) {
1182 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1183 $lng->
txt(
"msg_no_perm_read_item"),
1198 $this->tabs_gui->setTabActive(
"obj_tool_setting_taxonomies");
1199 $this->tabs_gui->addSubTab(
1201 $this->
lng->txt(
"cntr_taxonomy_sideblock_settings"),
1202 $this->
ctrl->getLinkTarget($this,
"editTaxonomySettings")
1204 $this->tabs_gui->addSubTab(
1206 $this->
lng->txt(
"cntr_taxonomy_definitions"),
1207 $this->
ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
"")
1209 $this->tabs_gui->activateSubTab($a_active);
1224 if (count($node_taxes)) {
1225 foreach ($node_taxes as $node_tax) {
1226 $res[$node_tax[
"tax_id"]] = [
1227 "title" => $node_tax[
"title"]
1228 ,
"source" => $node[
"child"]
1243 $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1246 if ($value && strpos($keyword, $prefix) === 0) {
1247 $res[] = substr($keyword, strlen($prefix));
static _getAllUserIds(int $a_filter=0)
StandardGUIRequest $cat_request
ilAdvancedMDRecordGUI $record_gui
setPropertyForm(ilPropertyFormGUI $form)
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.
prepareOutput(bool $show_sub_objects=true)
hideTaxAsSideBlockObject()
GUI class for object translation handling.
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...
showTaxAsSideBlockObject()
static _gotoRepositoryNode(int $ref_id, string $cmd="")
const CONTAINER_SETTING_TAXBLOCK
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)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
setCreationMode(bool $mode=true)
If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
bool $info_screen_enabled
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 ...
TableGUI class for user administration.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Category InternalGUIService $cat_gui
static http()
Fetches the global http state from ILIAS.
ilNavigationHistory $nav_history
static _lookupTitle(int $obj_id)
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.
performDeleteUsersObject()
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.
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)
static getDataDir()
get data directory (outside webspace)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
Last visited history for repository items.
static _goto(string $a_target)
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)
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 'global' roles (with flag 'assign_users')
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.
__construct(Container $dic, ilPlugin $plugin)
ILIAS Category InternalDomainService $cat_domain
setInfoObject(ilInfoScreenGUI $info)
get info sections
const INFO_TAB_VISIBILITY
ILIAS Container InternalGUIService $gui
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
Class ilECSCategorySettings.
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.
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)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
getProperties(int $tax_id)