ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjCategoryGUI Class Reference

Class ilObjCategoryGUI. More...

+ Inheritance diagram for ilObjCategoryGUI:
+ Collaboration diagram for ilObjCategoryGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getObjectMetadataGUI ()
 
 getProperties (int $tax_id)
 
 getActions (int $tax_id)
 
 renderObject ()
 Render category. More...
 
 viewObject ()
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 updateObject ()
 
 listUsersObject (bool $show_delete=false)
 
 performDeleteUsersObject ()
 
 deleteUsersObject ()
 
 assignRolesObject ()
 
 assignSaveObject ()
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 prepareOutput (bool $show_subobjects=true)
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
 
 addMessageRow (ilTemplate $a_tpl, string $a_message, string $a_type)
 
 setPageEditorTabs ()
 
 addStandardContainerSubTabs (bool $a_include_view=true)
 Add standard container subtabs for view, manage, oderdering and text/media editor link. More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 editOrderObject ()
 
 isActiveOrdering ()
 
 isActiveItemOrdering ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard public More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 getAsynchItemListObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 
 competencesObject ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _getImportDir ()
 
static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath (int $a_ref_id, int $a_course_ref_id)
 build path More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const CONTAINER_SETTING_TAXBLOCK = "tax_sblock_"
 
- Data Fields inherited from ilContainerGUI
int $bl_cnt = 1
 
bool $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 showTaxAsSideBlockObject ()
 
 hideTaxAsSideBlockObject ()
 
 getTabs ()
 
 initCreationForms (string $new_type)
 
 afterSave (ilObject $new_object)
 
 editInfoObject ()
 
 updateInfoObject ()
 
 initExtendedSettings ()
 
 setEditTabs ($active_tab="settings_misc")
 
 initEditForm ()
 
 getEditFormValues ()
 
 resetFilterObject ()
 import categories (static, also called by RootFolderGUI) More...
 
 applyFilterObject ()
 Apply filter. More...
 
 addUserAutoCompleteObject ()
 Show auto complete results. More...
 
 initTaxSubTabs ($a_active="tax_list")
 
 getTaxonomiesForRefId ()
 
 getActiveBlocks ()
 
- Protected Member Functions inherited from ilContainerGUI
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 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 save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 

Protected Attributes

ILIAS Taxonomy Service $taxonomy
 
ilNavigationHistory $nav_history
 
ilHelpGUI $help
 
bool $info_screen_enabled = false
 
ilObjectGUI $gui_obj
 
bool $creation_mode
 
ilAdvancedMDRecordGUI $record_gui
 
StandardGUIRequest $cat_request
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 getAssignableRoles ()
 
 checkGlobalRoles ($new_assigned)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjCategoryGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)

Definition at line 49 of file class.ilObjCategoryGUI.php.

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ilContainer\_lookupContainerSetting(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

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  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ _getImportDir()

static ilObjCategoryGUI::_getImportDir ( )
static

Definition at line 947 of file class.ilObjCategoryGUI.php.

References ilFileUtils\getDataDir().

947  : string
948  {
949  return ilFileUtils::getDataDir() . "/cat_import";
950  }
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:

◆ _goto()

static ilObjCategoryGUI::_goto ( string  $a_target)
static

Definition at line 1253 of file class.ilObjCategoryGUI.php.

References $DIC, $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ROOT_FOLDER_ID, and ilLanguage\txt().

Referenced by ilObjCategoryReferenceGUI\_goto().

1253  : 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  }
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...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _gotoRepositoryNode(int $ref_id, string $cmd="")
$ilErr
Definition: raiseError.php:17
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupTitle(int $obj_id)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addUserAutoCompleteObject()

ilObjCategoryGUI::addUserAutoCompleteObject ( )
protected

Show auto complete results.

Definition at line 1041 of file class.ilObjCategoryGUI.php.

References exit, and ilUserAutoComplete\MAX_ENTRIES.

1041  : 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  }
exit
Definition: login.php:29
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $new_object)
protected

Definition at line 595 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$settings, ilObjectGUI\$tree, ILIAS\Repository\ctrl(), ilObject\getId(), ilObject\getRefId(), ILIAS\Repository\lng(), ilObjectGUI\redirectToRefId(), and ilContainer\SORT_TITLE.

595  : 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  }
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSetting $settings
+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjCategoryGUI::applyFilterObject ( )
protected

Apply filter.

Returns

Definition at line 974 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$tabs, listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

974  : 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  }
listUsersObject(bool $show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

Definition at line 1100 of file class.ilObjCategoryGUI.php.

References $help, ilContainerGUI\$rbacreview, ilContainerGUI\$tabs, ilRbacReview\assignedRoles(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilLegacyFormElementsUtil\formCheckbox(), getAssignableRoles(), ilObjectFactory\getInstanceByObjId(), listUsersObject(), ILIAS\Repository\lng(), and ilHelpGUI\setScreenIdComponent().

Referenced by assignSaveObject().

1100  : 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  }
ilRbacReview $rbacreview
listUsersObject(bool $show_delete=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setScreenIdComponent(string $a_comp)
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
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
assignedRoles(int $a_usr_id)
get all assigned roles to a given user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignSaveObject()

ilObjCategoryGUI::assignSaveObject ( )

Definition at line 1156 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$rbacadmin, ilContainerGUI\$rbacreview, ilLocalUser\_getAllUserIds(), ilRbacReview\assignedRoles(), assignRolesObject(), ilRbacAdmin\assignUser(), checkGlobalRoles(), ilObjectGUI\checkPermission(), ilRbacAdmin\deassignUser(), getAssignableRoles(), listUsersObject(), and ILIAS\Repository\lng().

1156  : 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  }
static _getAllUserIds(int $a_filter=0)
ilRbacReview $rbacreview
checkGlobalRoles($new_assigned)
assignUser(int $a_rol_id, int $a_usr_id)
Assigns an user to a role.
listUsersObject(bool $show_delete=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
assignedRoles(int $a_usr_id)
get all assigned roles to a given user
deassignUser(int $a_rol_id, int $a_usr_id)
Deassigns a user from a role.
+ Here is the call graph for this function:

◆ checkGlobalRoles()

ilObjCategoryGUI::checkGlobalRoles (   $new_assigned)
private

Definition at line 1214 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$rbacreview, ilObjectGUI\$user, ilRbacReview\assignedRoles(), ilObjectGUI\checkPermission(), ilRbacReview\getGlobalAssignableRoles(), ilRbacReview\getGlobalRoles(), ilRbacReview\getGlobalRolesArray(), ilObjectFactory\getInstanceByObjId(), and SYSTEM_ROLE_ID.

Referenced by assignSaveObject().

1214  : 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  }
ilRbacReview $rbacreview
const SYSTEM_ROLE_ID
Definition: constants.php:29
getGlobalRolesArray()
get only 'global' roles
getGlobalRoles()
get only 'global' roles
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
getGlobalAssignableRoles()
get only 'global' roles (with flag 'assign_users')
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
assignedRoles(int $a_usr_id)
get all assigned roles to a given user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

Definition at line 1073 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$user, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), listUsersObject(), and ILIAS\Repository\lng().

1073  : 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  }
static _lookupName(int $a_user_id)
lookup user name
listUsersObject(bool $show_delete=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

Definition at line 684 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\checkPermission(), ILIAS\Repository\form(), initExtendedSettings(), and setEditTabs().

Referenced by updateInfoObject().

684  : 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  }
setEditTabs($active_tab="settings_misc")
form( $class_path, string $cmd, string $submit_caption="")
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjCategoryGUI::executeCommand ( )

Definition at line 95 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilContainerGUI\$gui, $help, $nav_history, ilContainerGUI\$tabs, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilContainerGUI\forwardToPageObject(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getObjectMetadataGUI(), infoScreen(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilContainerGUI\prepareOutput(), renderObject(), ilObjectGUI\setCreationMode(), setEditTabs(), ilHelpGUI\setScreenIdComponent(), ilContainerGUI\setTitleAndDescription(), and ilContainerGUI\showContainerPageTabs().

95  : 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  }
prepareOutput(bool $show_subobjects=true)
infoScreen()
show information screen
GUI class for the workflow of copying objects.
setCreationMode(bool $mode=true)
If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode...
Export User Interface Class.
TableGUI class for user administration.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilNavigationHistory $nav_history
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setScreenIdComponent(string $a_comp)
Repository GUI Utilities.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Filter administration for containers.
renderObject()
Render category.
setEditTabs($active_tab="settings_misc")
ilAccessHandler $access
ILIAS Container InternalGUIService $gui
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjUserGUI.
addHeaderAction()
Add header action menu.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

◆ getActions()

ilObjCategoryGUI::getActions ( int  $tax_id)

Implements ILIAS\Taxonomy\Settings\ModifierGUIInterface.

Definition at line 438 of file class.ilObjCategoryGUI.php.

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

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  }
+ Here is the call graph for this function:

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

Definition at line 1323 of file class.ilObjCategoryGUI.php.

References $res, ilContainer\_getContainerSettings(), and ILIAS\Repository\object().

Referenced by getActions(), and getProperties().

1323  : 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  }
$res
Definition: ltiservices.php:69
static _getContainerSettings(int $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignableRoles()

ilObjCategoryGUI::getAssignableRoles ( )
private

Definition at line 1193 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$rbacreview, ilObjectGUI\$user, ilRbacReview\assignedRoles(), ilRbacReview\getAssignableChildRoles(), ilRbacReview\getGlobalAssignableRoles(), ilRbacReview\getGlobalRolesArray(), ilObjectFactory\getInstanceByObjId(), and SYSTEM_ROLE_ID.

Referenced by assignRolesObject(), and assignSaveObject().

1193  : 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  }
ilRbacReview $rbacreview
const SYSTEM_ROLE_ID
Definition: constants.php:29
getGlobalRolesArray()
get only 'global' roles
getAssignableChildRoles(int $a_ref_id)
Get all assignable roles directly under a specific node.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
getGlobalAssignableRoles()
get only 'global' roles (with flag 'assign_users')
assignedRoles(int $a_usr_id)
get all assigned roles to a given user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )
protected

Definition at line 862 of file class.ilObjCategoryGUI.php.

862  : array
863  {
864  return [];
865  }

◆ getObjectMetadataGUI()

ilObjCategoryGUI::getObjectMetadataGUI ( )

Definition at line 328 of file class.ilObjCategoryGUI.php.

Referenced by executeCommand().

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  }
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:

◆ getProperties()

ilObjCategoryGUI::getProperties ( int  $tax_id)

Implements ILIAS\Taxonomy\Settings\ModifierGUIInterface.

Definition at line 425 of file class.ilObjCategoryGUI.php.

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

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  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjCategoryGUI::getTabs ( )
protected

Definition at line 467 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$access, $help, ilObjectGUI\$lng, ilContainerGUI\$rbacsystem, ilRbacSystem\checkAccess(), ILIAS\Repository\ctrl(), ilUserAccountSettings\getInstance(), ILIAS\Repository\lng(), and ilLanguage\txt().

467  : 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  }
ilRbacSystem $rbacsystem
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
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
ilAccessHandler $access
+ Here is the call graph for this function:

◆ getTaxonomiesForRefId()

ilObjCategoryGUI::getTaxonomiesForRefId ( )
protected

Definition at line 1296 of file class.ilObjCategoryGUI.php.

References $res, ilObjectGUI\$tree, ilTree\getPathFull(), and ilObjTaxonomy\getUsageOfObject().

1296  : 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  }
$res
Definition: ltiservices.php:69
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=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...
+ Here is the call graph for this function:

◆ hideTaxAsSideBlockObject()

ilObjCategoryGUI::hideTaxAsSideBlockObject ( )
protected

Definition at line 414 of file class.ilObjCategoryGUI.php.

References ilContainer\_deleteContainerSettings(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

414  : 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  }
static _deleteContainerSettings(int $a_id, string $a_keyword="", bool $a_keyword_like=false)
+ Here is the call graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

Definition at line 630 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilContainerGUI\$error, $ilErr, ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), ilAdvancedMDRecordGUI\parse(), and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

630  : 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 
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  }
ilAdvancedMDRecordGUI $record_gui
Class ilInfoScreenGUI.
$ilErr
Definition: raiseError.php:17
ilErrorHandling $error
ilAccessHandler $access
setInfoObject(ilInfoScreenGUI $info)
get info sections
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjCategoryGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 620 of file class.ilObjCategoryGUI.php.

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

620  : void
621  {
622  $this->ctrl->setCmd("showSummary");
623  $this->ctrl->setCmdClass("ilinfoscreengui");
624  $this->infoScreen();
625  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms ( string  $new_type)
protected

Definition at line 588 of file class.ilObjCategoryGUI.php.

588  : array
589  {
590  $forms = parent::initCreationForms($new_type);
591  //unset($forms[self::CFORM_IMPORT]);
592  return $forms;
593  }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )
protected

Definition at line 780 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$form, ilContainer\_lookupContainerSetting(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\FILTER, ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ILIAS\Repository\lng(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ILIAS\Repository\object(), setEditTabs(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\TAXONOMIES.

Referenced by updateObject().

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  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
setFormAction(string $a_formaction)
initDidacticTemplate(ilPropertyFormGUI $form)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilPropertyFormGUI $form
setEditTabs($active_tab="settings_misc")
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initExtendedSettings()

ilObjCategoryGUI::initExtendedSettings ( )
protected

Definition at line 718 of file class.ilObjCategoryGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, ILIAS\Repository\object(), and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by editInfoObject(), and updateInfoObject().

718  : 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  }
setPropertyForm(ilPropertyFormGUI $form)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTaxSubTabs()

ilObjCategoryGUI::initTaxSubTabs (   $a_active = "tax_list")
protected

Definition at line 1280 of file class.ilObjCategoryGUI.php.

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

1280  : 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  }
+ Here is the call graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject ( bool  $show_delete = false)

Definition at line 985 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$error, $ilErr, ilContainerGUI\$rbacreview, ilContainerGUI\$rbacsystem, ilObjectGUI\$toolbar, ilObjectGUI\$user, ilRbacReview\assignedRoles(), ilRbacSystem\checkAccess(), ILIAS\Repository\ctrl(), ilRbacReview\getGlobalAssignableRoles(), ILIAS\Repository\lng(), ilUserTableGUI\MODE_LOCAL_USER, and SYSTEM_ROLE_ID.

Referenced by applyFilterObject(), assignRolesObject(), assignSaveObject(), deleteUsersObject(), performDeleteUsersObject(), and resetFilterObject().

985  : 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  }
ilRbacSystem $rbacsystem
ilRbacReview $rbacreview
const SYSTEM_ROLE_ID
Definition: constants.php:29
$ilErr
Definition: raiseError.php:17
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.
ilToolbarGUI $toolbar
ilErrorHandling $error
getGlobalAssignableRoles()
get only 'global' roles (with flag 'assign_users')
assignedRoles(int $a_usr_id)
get all assigned roles to a given user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performDeleteUsersObject()

ilObjCategoryGUI::performDeleteUsersObject ( )

Definition at line 1056 of file class.ilObjCategoryGUI.php.

References ilLocalUser\_getAllUserIds(), ilObjectGUI\checkPermission(), ilObjectFactory\getInstanceByObjId(), listUsersObject(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

1056  : 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  }
static _getAllUserIds(int $a_filter=0)
listUsersObject(bool $show_delete=false)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

Definition at line 564 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$tabs, ilChangeEvent\_recordReadEvent(), ilTabsGUI\activateTab(), ILIAS\Repository\object(), and ILIAS\Repository\user().

Referenced by executeCommand(), and viewObject().

564  : 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  }
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)
activateTab(string $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilterObject()

ilObjCategoryGUI::resetFilterObject ( )
protected

import categories (static, also called by RootFolderGUI)

Reset filter (note: this function existed before data table filter has been introduced

Definition at line 960 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

960  : 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  }
listUsersObject(bool $show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ setEditTabs()

ilObjCategoryGUI::setEditTabs (   $active_tab = "settings_misc")
protected

Definition at line 737 of file class.ilObjCategoryGUI.php.

References ilContainer\_lookupContainerSetting(), ILIAS\Repository\ctrl(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, and ILIAS\Repository\object().

Referenced by editInfoObject(), executeCommand(), initEditForm(), and updateObject().

737  : 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  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxAsSideBlockObject()

ilObjCategoryGUI::showTaxAsSideBlockObject ( )
protected

Definition at line 402 of file class.ilObjCategoryGUI.php.

References ilContainer\_writeContainerSetting(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

402  : 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  }
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjCategoryGUI::updateInfoObject ( )
protected

Definition at line 696 of file class.ilObjCategoryGUI.php.

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), editInfoObject(), ILIAS\Repository\form(), initExtendedSettings(), and ILIAS\Repository\lng().

696  : 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  }
form( $class_path, string $cmd, string $submit_caption="")
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ updateObject()

ilObjCategoryGUI::updateObject ( )

Definition at line 867 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$error, ilContainerGUI\$form, $ilErr, ilObjectGUI\$user, ilChangeEvent\_catchupWriteEvents(), ilContainer\_deleteContainerSettings(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilContainerGUI\afterUpdate(), ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermissionBool(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\FILTER, ilPropertyFormGUI\getHTML(), ilPropertyFormGUI\getInput(), ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initEditForm(), ILIAS\Repository\lng(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ILIAS\Repository\object(), ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), setEditTabs(), ilPropertyFormGUI\setValuesByPost(), ilObjectServiceSettingsGUI\TAG_CLOUD, ilObjectServiceSettingsGUI\TAXONOMIES, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

867  : 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  }
saveSortingSettings(ilPropertyFormGUI $form)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
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-...
$ilErr
Definition: raiseError.php:17
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
ilErrorHandling $error
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
setEditTabs($active_tab="settings_misc")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _deleteContainerSettings(int $a_id, string $a_keyword="", bool $a_keyword_like=false)
+ Here is the call graph for this function:

◆ viewObject()

ilObjCategoryGUI::viewObject ( )

Definition at line 579 of file class.ilObjCategoryGUI.php.

References renderObject().

579  : void
580  {
581  if (strtolower($this->cat_request->getBaseClass()) === "iladministrationgui") {
582  parent::viewObject();
583  return;
584  }
585  $this->renderObject();
586  }
renderObject()
Render category.
+ Here is the call graph for this function:

Field Documentation

◆ $cat_request

StandardGUIRequest ilObjCategoryGUI::$cat_request
protected

Definition at line 47 of file class.ilObjCategoryGUI.php.

◆ $creation_mode

bool ilObjCategoryGUI::$creation_mode
protected

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

◆ $gui_obj

ilObjectGUI ilObjCategoryGUI::$gui_obj
protected

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

◆ $help

ilHelpGUI ilObjCategoryGUI::$help
protected

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

Referenced by assignRolesObject(), executeCommand(), and getTabs().

◆ $info_screen_enabled

bool ilObjCategoryGUI::$info_screen_enabled = false
protected

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

◆ $nav_history

ilNavigationHistory ilObjCategoryGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $record_gui

ilAdvancedMDRecordGUI ilObjCategoryGUI::$record_gui
protected

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

◆ $taxonomy

ILIAS Taxonomy Service ilObjCategoryGUI::$taxonomy
protected

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

◆ CONTAINER_SETTING_TAXBLOCK

const ilObjCategoryGUI::CONTAINER_SETTING_TAXBLOCK = "tax_sblock_"

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