ILIAS  release_8 Revision v8.24
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 ()
 
 renderObject ()
 Render category. More...
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 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 ()
 updates object entry in object_data More...
 
 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 ()
 
 clearAdminCommandsDetermination ()
 
 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 @access 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 ()
 administration tabs show only permissions and trash folder More...
 
 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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 ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 

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

 addHeaderAction ()
 Add header action menu. More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 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
 getEditFormValues ()
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 supportsPageEditor ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 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 ()
 
 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...
 
 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 ()
 @abstract 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

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 Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
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
 
ViewManager $view_manager
 
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
 
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 (   $data,
int  $id,
bool  $call_by_reference = true,
bool  $prepare_output = true 
)
Parameters
mixed$data
int$id
bool$call_by_reference
bool$prepare_output
Exceptions
ilCtrlException

Reimplemented from ilObjectGUI.

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

53 {
54 global $DIC;
55
56 $this->rbacsystem = $DIC->rbac()->system();
57 $this->nav_history = $DIC["ilNavigationHistory"];
58 $this->access = $DIC->access();
59 $this->ctrl = $DIC->ctrl();
60 $this->tabs = $DIC->tabs();
61 $this->help = $DIC["ilHelp"];
62 $this->lng = $DIC->language();
63 $this->user = $DIC->user();
64 $this->tree = $DIC->repositoryTree();
65 $this->error = $DIC["ilErr"];
66 $this->settings = $DIC->settings();
67 $this->tpl = $DIC["tpl"];
68 $this->toolbar = $DIC->toolbar();
69 $this->rbacreview = $DIC->rbac()->review();
70 $this->rbacadmin = $DIC->rbac()->admin();
71
72 $this->lng->loadLanguageModule('cat');
73 $this->lng->loadLanguageModule('obj');
74
75 $this->type = "cat";
76 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
77
78 if (is_object($this->object)) {
79 $this->info_screen_enabled = (bool) ilContainer::_lookupContainerSetting(
80 $this->object->getId(),
82 '1'
83 );
84 }
85 $this->cat_request = $DIC
86 ->category()
87 ->internal()
88 ->gui()
89 ->standardRequest();
90 }
error(string $a_errmsg)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilContainer\_lookupContainerSetting(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), error(), 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().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getImportDir()

static ilObjCategoryGUI::_getImportDir ( )
static

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

879 : string
880 {
881 return ilFileUtils::getDataDir() . "/cat_import";
882 }
static getDataDir()
get data directory (outside webspace)

References ilFileUtils\getDataDir().

+ Here is the call graph for this function:

◆ _goto()

static ilObjCategoryGUI::_goto ( string  $a_target)
static

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

1185 : void
1186 {
1187 global $DIC;
1188 $main_tpl = $DIC->ui()->mainTemplate();
1189
1190 $ilAccess = $DIC->access();
1191 $ilErr = $DIC["ilErr"];
1192 $lng = $DIC->language();
1193 if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
1194 ilObjectGUI::_gotoRepositoryNode((int) $a_target);
1195 } elseif ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
1196 ilObjectGUI::_gotoRepositoryNode((int) $a_target, "infoScreen");
1197 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1198 $main_tpl->setOnScreenMessage('failure', sprintf(
1199 $lng->txt("msg_no_perm_read_item"),
1201 ), true);
1203 }
1204
1205 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1206 }
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...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilLanguage $lng
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
$ilErr
Definition: raiseError.php:17

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

Referenced by ilObjCategoryReferenceGUI\_goto().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addHeaderAction()

ilObjCategoryGUI::addHeaderAction ( )
protected

Add header action menu.

Reimplemented from ilObjectGUI.

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

324 : void
325 {
327 parent::addHeaderAction();
328 }
static initPreview()
Initializes the preview and loads the needed javascripts and styles.

References ilPreviewGUI\initPreview().

Referenced by executeCommand().

+ 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 973 of file class.ilObjCategoryGUI.php.

973 : void
974 {
975 $auto = new ilUserAutoComplete();
976 $auto->setSearchFields(['login', 'firstname', 'lastname', 'email']);
977 $auto->enableFieldSearchableCheck(true);
978 //$auto->isMoreLinkAvailable(true);
979
980 if (($this->cat_request->getFetchAll())) {
981 $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
982 }
983
984 echo $auto->getList($this->cat_request->getTerm());
985 exit();
986 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exit
Definition: login.php:28

References exit, and ilUserAutoComplete\MAX_ENTRIES.

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

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

531 : void
532 {
534
535 // default: sort by title
536 $settings = new ilContainerSortingSettings($new_object->getId());
538 $settings->save();
539
540 // inherit parents content style, if not individual
541 $this->content_style_domain
542 ->styleForRefId($new_object->getRefId())
543 ->inheritFromParent();
544
545 // always send a message
546 $this->tpl->setOnScreenMessage('success', $this->lng->txt("cat_added"), true);
547 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
548 $this->redirectToRefId($new_object->getRefId(), "");
549 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSetting $settings
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...

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

+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjCategoryGUI::applyFilterObject ( )
protected

Apply filter.

Returns

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

906 : void
907 {
908 $ilTabs = $this->tabs;
909
910 $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
911 $utab->resetOffset();
912 $utab->writeFilterToSession();
913 $this->listUsersObject();
914 }
listUsersObject(bool $show_delete=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

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

1032 : void
1033 {
1035 $ilTabs = $this->tabs;
1036
1037 $this->checkPermission("cat_administrate_users");
1038
1039 if ($this->cat_request->getObjId() === 0) {
1040 $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
1041 $this->listUsersObject();
1042 return;
1043 }
1044
1045 $ilTabs->clearTargets();
1046 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1047 $ilHelp = $this->help;
1048 $ilHelp->setScreenIdComponent("cat");
1049 $ilHelp->setScreenId("administrate_user");
1050 $ilHelp->setSubScreenId("assign_roles");
1051
1052
1053 $roles = $this->getAssignableRoles();
1054
1055 $ass_roles = $rbacreview->assignedRoles($this->cat_request->getObjId());
1056
1057 $counter = 0;
1058 $f_result = [];
1059
1060 foreach ($roles as $role) {
1061 $role_obj = ilObjectFactory::getInstanceByObjId((int) $role['obj_id']);
1062
1063 $disabled = false;
1064 $f_result[$counter]['checkbox'] = ilLegacyFormElementsUtil::formCheckbox(
1065 in_array((int) $role['obj_id'], $ass_roles, true),
1066 'role_ids[]',
1067 (string) $role['obj_id'],
1068 $disabled
1069 );
1070 $f_result[$counter]['title'] = $role_obj->getTitle() ?: "";
1071 $f_result[$counter]['desc'] = $role_obj->getDescription() ?: "";
1072 $f_result[$counter]['type'] = ($role['role_type'] ?? '') === 'global' ?
1073 $this->lng->txt('global') :
1074 $this->lng->txt('local');
1075
1076 unset($role_obj);
1077 ++$counter;
1078 }
1079
1080 $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1081 $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1082 $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1083 $table->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
1084 $table->setData($f_result);
1085 $this->tpl->setContent($table->getHTML());
1086 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilRbacReview $rbacreview
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

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

Referenced by assignSaveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignSaveObject()

ilObjCategoryGUI::assignSaveObject ( )

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

1088 : void
1089 {
1092 $this->checkPermission("cat_administrate_users");
1093
1094 // check hack
1095 if ($this->cat_request->getObjId() === 0 ||
1096 !in_array($this->cat_request->getObjId(), ilLocalUser::_getAllUserIds(), true)) {
1097 $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
1098 $this->listUsersObject();
1099 return;
1100 }
1101 $roles = $this->getAssignableRoles();
1102
1103 // check minimum one global role
1104 if (!$this->checkGlobalRoles($this->cat_request->getRoleIds())) {
1105 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_global_role_left'));
1106 $this->assignRolesObject();
1107 return;
1108 }
1109
1110 $new_role_ids = $this->cat_request->getRoleIds();
1111 $assigned_roles = $rbacreview->assignedRoles($this->cat_request->getObjId());
1112 foreach ($roles as $role) {
1113 if (in_array((int) $role['obj_id'], $new_role_ids, true) && !in_array((int) $role['obj_id'], $assigned_roles, true)) {
1114 $rbacadmin->assignUser((int) $role['obj_id'], $this->cat_request->getObjId());
1115 }
1116 if (in_array((int) $role['obj_id'], $assigned_roles, true) && !in_array((int) $role['obj_id'], $new_role_ids, true)) {
1117 $rbacadmin->deassignUser((int) $role['obj_id'], $this->cat_request->getObjId());
1118 }
1119 }
1120 $this->tpl->setOnScreenMessage('success', $this->lng->txt('role_assignment_updated'));
1121 $this->assignRolesObject();
1122 }
static _getAllUserIds(int $a_filter=0)
checkGlobalRoles($new_assigned)
deassignUser(int $a_rol_id, int $a_usr_id)
Deassigns a user from a role.
assignUser(int $a_rol_id, int $a_usr_id)
Assigns an user to a role.

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

+ Here is the call graph for this function:

◆ checkGlobalRoles()

ilObjCategoryGUI::checkGlobalRoles (   $new_assigned)
private

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

1146 : bool
1147 {
1150
1151 $this->checkPermission("cat_administrate_users");
1152
1153 // return true if it's not a local user
1154 $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1155 if ($tmp_obj->getTimeLimitOwner() !== $this->object->getRefId() &&
1156 !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1157 return true;
1158 }
1159
1160 // new assignment by form
1161 $new_assigned = $new_assigned ?: [];
1162 $assigned = $rbacreview->assignedRoles($this->cat_request->getObjId());
1163
1164 // all assignable globals
1165 if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1167 } else {
1169 }
1170 $global_assignable = [];
1171 foreach ($ga as $role) {
1172 $global_assignable[] = $role['obj_id'];
1173 }
1174
1175 $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1176 $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1177 $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1178
1179 if (!count($new_visible_assigned_roles) && !count($main_assigned_roles)) {
1180 return false;
1181 }
1182 return true;
1183 }
getGlobalRoles()
get only 'global' roles
getGlobalAssignableRoles()
get only 'global' roles (with flag 'assign_users')
getGlobalRolesArray()
get only 'global' roles
const SYSTEM_ROLE_ID
Definition: constants.php:29
$ilUser
Definition: imgupload.php:34

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

Referenced by assignSaveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

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

1005 : void
1006 {
1007 $this->checkPermission("cat_administrate_users");
1008 if ($this->cat_request->getIds() === []) {
1009 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_users_selected'));
1010 $this->listUsersObject();
1011 return;
1012 }
1013
1014 $confirm = new ilConfirmationGUI();
1015 $confirm->setFormAction($this->ctrl->getFormAction($this));
1016 $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1017 $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1018 $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1019
1020 foreach ($this->cat_request->getIds() as $user) {
1022
1023 $confirm->addItem(
1024 'user_ids[]',
1025 (string) $user,
1026 $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1027 );
1028 }
1029 $this->tpl->setContent($confirm->getHTML());
1030 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupName(int $a_user_id)
lookup user name
if($format !==null) $name
Definition: metadata.php:247

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

+ Here is the call graph for this function:

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

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

620 : void
621 {
622 $this->checkPermission("write");
623 $this->setEditTabs();
624 $this->tabs_gui->activateTab('settings');
625 $this->tabs_gui->setSubTabActive('edit_cat_settings');
626
627 $this->initExtendedSettings();
628 $this->tpl->setContent($this->form->getHTML());
629 }
setEditTabs($active_tab="settings_misc")
form( $class_path, string $cmd)

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

Referenced by updateInfoObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjCategoryGUI::executeCommand ( )

Reimplemented from ilContainerGUI.

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

92 : void
93 {
94 $ilNavigationHistory = $this->nav_history;
95 $ilAccess = $this->access;
96 $ilCtrl = $this->ctrl;
97 $ilTabs = $this->tabs;
98
99 $next_class = $this->ctrl->getNextClass($this);
100 $cmd = $this->ctrl->getCmd();
101
102 $header_action = true;
103 switch ($next_class) {
104
105 case strtolower(ilRepositoryTrashGUI::class):
106 $ru = new ilRepositoryTrashGUI($this);
107 $this->ctrl->setReturn($this, 'trash');
108 $this->ctrl->forwardCommand($ru);
109 break;
110
111 case "ilobjusergui":
112 $this->tabs_gui->setTabActive('administrate_users');
113 if ($this->cat_request->getObjId() === 0) {
114 $this->gui_obj = new ilObjUserGUI(
115 "",
116 $this->cat_request->getRefId(),
117 true,
118 false
119 );
120 } else {
121 $this->gui_obj = new ilObjUserGUI(
122 "",
123 $this->cat_request->getObjId(),
124 false,
125 false
126 );
127 }
128 $this->gui_obj->setCreationMode($this->creation_mode);
129 $this->ctrl->forwardCommand($this->gui_obj);
130
131 $ilTabs->clearTargets();
132 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
133 $ilHelp = $this->help;
134 $ilHelp->setScreenIdComponent("cat");
135 $ilHelp->setScreenId("administrate_user");
136 $ilHelp->setSubScreenId($ilCtrl->getCmd());
137 break;
138
139 case "ilobjuserfoldergui":
140 $this->gui_obj = new ilObjUserFolderGUI(
141 "",
142 $this->cat_request->getRefId(),
143 true
144 );
145 $this->gui_obj->setUserOwnerId($this->cat_request->getRefId());
146 $this->gui_obj->setCreationMode($this->creation_mode);
147 $this->ctrl->forwardCommand($this->gui_obj);
148
149 $ilTabs->clearTargets();
150 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
151 $ilHelp = $this->help;
152 $ilHelp->setScreenIdComponent("cat");
153 $ilHelp->setScreenId("administrate_user");
154 $ilHelp->setSubScreenId($ilCtrl->getCmd());
155 break;
156
157 case "ilcolumngui":
158 $this->checkPermission("read");
159 $this->prepareOutput();
160 $this->content_style_gui->addCss(
161 $this->tpl,
162 $this->object->getRefId()
163 );
164 $this->renderObject();
165 break;
166
167 case 'ilpermissiongui':
168 $this->prepareOutput();
169 $this->tabs_gui->setTabActive('perm_settings');
170 $perm_gui = new ilPermissionGUI($this);
171 $this->ctrl->forwardCommand($perm_gui);
172 break;
173
174 case 'ilinfoscreengui':
175 if ($this->info_screen_enabled) {
176 $this->prepareOutput();
177 $this->infoScreen();
178 }
179 break;
180
181 // container page editing
182 case "ilcontainerpagegui":
183 $this->prepareOutput(false);
184 $ret = $this->forwardToPageObject();
185 if ($ret !== "") {
186 $this->tpl->setContent($ret);
187 }
188 $header_action = false;
189 break;
190
191 case 'ilobjectcopygui':
192 $this->prepareOutput();
193
194 $cp = new ilObjectCopyGUI($this);
195 $cp->setType('cat');
196 $this->ctrl->forwardCommand($cp);
197 break;
198
199 case "ilobjectcontentstylesettingsgui":
200 $this->checkPermission("write");
201 $this->setTitleAndDescription();
202 $this->showContainerPageTabs();
203 $settings_gui = $this->content_style_gui
204 ->objectSettingsGUIForRefId(
205 null,
206 $this->object->getRefId()
207 );
208 $this->ctrl->forwardCommand($settings_gui);
209 break;
210
211 case 'ilusertablegui':
212 $u_table = new ilUserTableGUI($this, "listUsers");
213 $u_table->initFilter();
214 $this->ctrl->setReturn($this, 'listUsers');
215 $this->ctrl->forwardCommand($u_table);
216 break;
217
218 case "ilcommonactiondispatchergui":
219 $this->prepareOutput();
221 $this->ctrl->forwardCommand($gui);
222 break;
223
224 case 'ildidactictemplategui':
225 $this->ctrl->setReturn($this, 'edit');
226 $did = new ilDidacticTemplateGUI($this);
227 $this->ctrl->forwardCommand($did);
228 break;
229
230 case 'ilexportgui':
231 $this->prepareOutput();
232 $this->tabs_gui->setTabActive('export');
233 $exp = new ilExportGUI($this);
234 $exp->addFormat('xml');
235 $this->ctrl->forwardCommand($exp);
236 break;
237
238 case 'ilobjecttranslationgui':
239 $this->checkPermissionBool("write");
240 $this->prepareOutput();
241 //$this->tabs_gui->setTabActive('export');
242 $this->setEditTabs("settings_trans");
243 $transgui = new ilObjectTranslationGUI($this);
244 $this->ctrl->forwardCommand($transgui);
245 break;
246
247 case 'ilobjtaxonomygui':
248 $this->checkPermissionBool("write");
249 $this->prepareOutput();
250 $this->initTaxSubTabs();
251 $tax = new ilObjTaxonomyGUI();
252 $tax->setAssignedObject($this->object->getId());
253 $tax->setMultiple(true);
254 $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
255 $this->ctrl->forwardCommand($tax);
256 break;
257
258 case 'ilobjectmetadatagui':
259 $this->checkPermissionBool("write");
260 $this->prepareOutput();
261 $this->tabs_gui->activateTab('meta_data');
262 $this->ctrl->forwardCommand($this->getObjectMetadataGUI());
263 break;
264
265 case "ilcontainernewssettingsgui":
266 $this->prepareOutput();
267 $this->tabs_gui->setTabActive('settings');
268 $this->setEditTabs();
269 $this->tabs_gui->activateSubTab('obj_news_settings');
270 $news_set_gui = new ilContainerNewsSettingsGUI($this);
271 $news_set_gui->setHideByDate(true);
272 $this->ctrl->forwardCommand($news_set_gui);
273 break;
274
275 case 'ilcontainerfilteradmingui':
276 $this->checkPermissionBool("write");
277 $this->prepareOutput();
278 $this->setEditTabs($active_tab = "settings_filter");
279 $this->tabs_gui->activateTab('settings');
280 $this->ctrl->forwardCommand(new ilContainerFilterAdminGUI($this));
281 break;
282
283 default:
284 if ($cmd === "infoScreen") {
285 $this->checkPermission("visible");
286 } else {
287 $this->checkPermission("read");
288 }
289
290 // add entry to navigation history
291 if (!$this->getCreationMode() &&
292 $ilAccess->checkAccess("read", "", $this->cat_request->getRefId())) {
293 $ilNavigationHistory->addItem(
294 $this->cat_request->getRefId(),
295 ilLink::_getLink($this->cat_request->getRefId(), "cat"),
296 "cat"
297 );
298 }
299
300 $this->prepareOutput();
301 if (is_object($this->object)) {
302 $this->content_style_gui->addCss(
303 $this->tpl,
304 $this->object->getRefId()
305 );
306 }
307
308 if (!$cmd) {
309 $cmd = "render";
310 }
311 $cmd .= "Object";
312 $this->tabs_gui->activateTab("view_content"); // see #19868
313 $this->$cmd();
314
315 break;
316 }
317
318 if ($header_action) {
319 $this->addHeaderAction();
320 }
321 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Filter administration for containers.
prepareOutput(bool $show_subobjects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initTaxSubTabs($a_active="tax_list")
infoScreen()
show information screen
addHeaderAction()
Add header action menu.
renderObject()
Render category.
ilNavigationHistory $nav_history
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
ilAccessHandler $access
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Repository GUI Utilities.

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

+ Here is the call graph for this function:

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

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

1255 : array
1256 {
1257 $res = [];
1258
1260
1261 foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1262 if ($value && strpos($keyword, $prefix) === 0) {
1263 $res[] = substr($keyword, strlen($prefix));
1264 }
1265 }
1266
1267 return $res;
1268 }
static _getContainerSettings(int $a_id)
$res
Definition: ltiservices.php:69

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

Referenced by getObjectMetadataGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignableRoles()

ilObjCategoryGUI::getAssignableRoles ( )
private

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

1125 : array
1126 {
1129
1130 // check local user
1131 $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1132 // Admin => all roles
1133 if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1134 $global_roles = $rbacreview->getGlobalRolesArray();
1135 } elseif ($tmp_obj->getTimeLimitOwner() === $this->object->getRefId()) {
1136 $global_roles = $rbacreview->getGlobalAssignableRoles();
1137 } else {
1138 $global_roles = [];
1139 }
1140 return array_merge(
1141 $global_roles,
1142 $rbacreview->getAssignableChildRoles($this->object->getRefId())
1143 );
1144 }
getAssignableChildRoles(int $a_ref_id)
Get all assignable roles directly under a specific node.

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

Referenced by assignRolesObject(), and assignSaveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )
protected

Reimplemented from ilContainerGUI.

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

794 : array
795 {
796 return [];
797 }

◆ getObjectMetadataGUI()

ilObjCategoryGUI::getObjectMetadataGUI ( )

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

331 {
332 $md_gui = new ilObjectMetaDataGUI($this->object);
334 $this->object->getId(),
336 '0'
337 )) {
338 $md_gui->enableTaxonomyDefinition(true);
339 $tax = $md_gui->getTaxonomyObjGUI();
340 $tax->setMultiple(true);
341 $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
342 $taxonomies = $this->getTaxonomiesForRefId();
343 if (count($taxonomies)) {
344 $md_gui->setTaxonomySettings(function ($form) {
345 $tax = $this->getTaxonomiesForRefId();
346 $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
347 $form->addItem($block);
348
349 $current = $this->getActiveBlocks();
350
351 $value = null;
352 foreach ($tax as $tax_id => $tax_item) {
353 $option = new ilCheckboxOption(
354 $tax_item["title"],
355 (string) $tax_id,
357 );
358
359 if ((int) $tax_item["source"] !== $this->object->getRefId()) {
360 $loc = new ilLocatorGUI();
361 $loc->setTextOnly(true);
362 $loc->addRepositoryItems((int) $tax_item["source"]);
363 $option->setInfo($loc->getHTML());
364 }
365
366 $block->addOption($option);
367
368 if (in_array($tax_id, $current)) {
369 $value[] = $tax_id;
370 }
371 }
372
373 $block->setValue($value);
374 }, function ($form) {
375 $taxonomies = $this->getTaxonomiesForRefId();
376 if (count($taxonomies)) {
377 $sblock = $form->getInput("sblock");
378
380
382 $this->object->getId(),
383 $prefix . "%",
384 true
385 );
386
387 if (is_array($sblock)) {
388 foreach ($sblock as $tax_id) {
390 $this->object->getId(),
391 $prefix . $tax_id,
392 '1'
393 );
394 }
395 }
396 }
397 });
398 }
399 }
400 return $md_gui;
401 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilPropertyFormGUI $form
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static _deleteContainerSettings(int $a_id, string $a_keyword="", bool $a_keyword_like=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupDescription(int $obj_id)
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-...

References ilContainerGUI\$form, ilContainer\_deleteContainerSettings(), ilContainer\_lookupContainerSetting(), ilObject\_lookupDescription(), ilContainer\_writeContainerSetting(), ilPropertyFormGUI\addItem(), CONTAINER_SETTING_TAXBLOCK, getActiveBlocks(), ilPropertyFormGUI\getInput(), getTaxonomiesForRefId(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\TAXONOMIES.

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjCategoryGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilContainerGUI.

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

403 : void
404 {
407 $ilHelp = $this->help;
408 $ilAccess = $this->access;
409
410 if ($this->ctrl->getCmd() === "editPageContent") {
411 return;
412 }
413
414 $ilHelp->setScreenIdComponent("cat");
415
416 if ($rbacsystem->checkAccess('read', $this->ref_id)) {
417 $this->tabs_gui->addTab(
418 "view_content",
419 $lng->txt("content"),
420 $this->ctrl->getLinkTarget($this, "")
421 );
422
423 //BEGIN ChangeEvent add info tab to category object
424 if ($this->info_screen_enabled) {
425 $force_active = $this->ctrl->getNextClass() === "ilinfoscreengui"
426 || strtolower($this->cat_request->getCmdClass()) === "ilnotegui";
427 $this->tabs_gui->addTarget(
428 "info_short",
429 $this->ctrl->getLinkTargetByClass(
430 ["ilobjcategorygui", "ilinfoscreengui"],
431 "showSummary"
432 ),
433 ["showSummary", "", "infoScreen"],
434 "",
435 "",
436 $force_active
437 );
438 }
439 //END ChangeEvent add info tab to category object
440 }
441
442 if ($rbacsystem->checkAccess('write', $this->ref_id)) {
443 $force_active = ($this->ctrl->getCmd() === "edit");
444 $this->tabs_gui->addTarget(
445 "settings",
446 $this->ctrl->getLinkTarget($this, "edit"),
447 "edit",
448 get_class($this),
449 "",
450 $force_active
451 );
452
453
454
455 // metadata / taxonomies
456 $mdgui = new ilObjectMetaDataGUI($this->object);
458 $this->object->getId(),
460 '0'
461 )) {
462 $mdgui->enableTaxonomyDefinition(true);
463 }
464 $mdtab = $mdgui->getTab();
465 if ($mdtab) {
466 $this->tabs_gui->addTab(
467 "meta_data",
468 $this->lng->txt("meta_data"),
469 $mdtab
470 );
471 }
472 }
473
474 if (ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() &&
475 $rbacsystem->checkAccess('cat_administrate_users', $this->ref_id)) {
476 $this->tabs_gui->addTarget(
477 "administrate_users",
478 $this->ctrl->getLinkTarget($this, "listUsers"),
479 "listUsers",
480 get_class($this)
481 );
482 }
483
484 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
485 $this->tabs_gui->addTarget(
486 'export',
487 $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
488 'export',
489 'ilexportgui'
490 );
491 }
492
493 // parent tabs (all container: edit_permission, clipboard, trash
494 parent::getTabs();
495 }
ilRbacSystem $rbacsystem
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 ...

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

+ Here is the call graph for this function:

◆ getTaxonomiesForRefId()

ilObjCategoryGUI::getTaxonomiesForRefId ( )
protected

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

1228 : array
1229 {
1231
1232 // see ilTaxMDGUI::getSelectableTaxonomies()
1233
1234 $res = [];
1235 foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1236 //if ($node["ref_id"] != $this->object->getRefId())
1237 {
1238 // find all defined taxes for parent node, activation is not relevant
1239 $node_taxes = ilObjTaxonomy::getUsageOfObject((int) $node["obj_id"], true);
1240 if (count($node_taxes)) {
1241 foreach ($node_taxes as $node_tax) {
1242 $res[$node_tax["tax_id"]] = [
1243 "title" => $node_tax["title"]
1244 , "source" => $node["child"]
1245 ];
1246 }
1247 }
1248 }
1249 }
1250
1251 asort($res);
1252 return $res;
1253 }
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...

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

Referenced by getObjectMetadataGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

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

566 : string
567 {
568 $ilAccess = $this->access;
569 $ilCtrl = $this->ctrl;
571
572 if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
573 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
574 }
575
576 if (!$this->info_screen_enabled) {
577 return "";
578 }
579
580 // #10986
581 $this->tabs_gui->setTabActive('info_short');
582
583 $info = new ilInfoScreenGUI($this);
584
585 $info->enablePrivateNotes();
586
587 if ($ilAccess->checkAccess("read", "", $this->cat_request->getRefId())) {
588 $info->enableNews();
589 }
590
591 // no news editing for files, just notifications
592 $info->enableNewsEditing(false);
593 if ($ilAccess->checkAccess("write", "", $this->cat_request->getRefId())) {
594 $news_set = new ilSetting("news");
595 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
596
597 if ($enable_internal_rss) {
598 $info->setBlockProperty("news", "settings", '1');
599 $info->setBlockProperty("news", "public_notifications_option", '1');
600 }
601 }
602
606
607
608 // standard meta data
609 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
610
611 // forward the command
612 if ($ilCtrl->getNextClass() === "ilinfoscreengui") {
613 $ilCtrl->forwardCommand($info);
614 } else {
615 return $ilCtrl->getHTML($info);
616 }
617 return "";
618 }
setInfoObject(ilInfoScreenGUI $info)
get info sections
ilErrorHandling $error
Class ilInfoScreenGUI.
ilAdvancedMDRecordGUI $record_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

Referenced by executeCommand(), and infoScreenObject().

+ 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 556 of file class.ilObjCategoryGUI.php.

556 : void
557 {
558 $this->ctrl->setCmd("showSummary");
559 $this->ctrl->setCmdClass("ilinfoscreengui");
560 $this->infoScreen();
561 }

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

+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms ( string  $new_type)
protected

Init creation forms.

This will create the default creation forms: new, import, clone

Returns
array<int, ilPropertyFormGUI>

Reimplemented from ilObjectGUI.

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

524 : array
525 {
526 $forms = parent::initCreationForms($new_type);
527 //unset($forms[self::CFORM_IMPORT]);
528 return $forms;
529 }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )
protected

Reimplemented from ilContainerGUI.

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

713 {
714 $obj_service = $this->getObjectService();
715
716 $this->lng->loadLanguageModule($this->object->getType());
717 $this->setEditTabs();
718
719 $form = new ilPropertyFormGUI();
720 $form->setFormAction($this->ctrl->getFormAction($this));
721 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
722
723 // title/description
724 $this->initFormTitleDescription($form);
725
726 // Show didactic template type
728
729 // presentation
730 $pres = new ilFormSectionHeaderGUI();
731 $pres->setTitle($this->lng->txt('obj_presentation'));
732 $form->addItem($pres);
733
734 // title and icon visibility
735 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
736
737 // top actions visibility
738 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
739
740 // custom icon
741 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
742
743 // tile image
744 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
745
746 // list presentation
748
749 // sorting
750 $form = $this->initSortingForm(
751 $form,
752 [
756 ]
757 );
758
759 // block limit
760 $bl = new ilNumberInputGUI($this->lng->txt("cont_block_limit"), "block_limit");
761 $bl->setInfo($this->lng->txt("cont_block_limit_info"));
762 $bl->setValue(ilContainer::_lookupContainerSetting($this->object->getId(), "block_limit"));
763 $form->addItem($bl);
764
765 // icon settings
766
767 // Edit ecs export settings
768 $ecs = new ilECSCategorySettings($this->object);
769 $ecs->addSettingsToForm($form, 'cat');
770
771 // services
772 $sh = new ilFormSectionHeaderGUI();
773 $sh->setTitle($this->lng->txt('obj_features'));
774 $form->addItem($sh);
775
777 $this->object->getId(),
778 $form,
779 [
786 ]
787 );
788
789 $form->addCommandButton("update", $this->lng->txt("save"));
790
791 return $form;
792 }
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_formaction)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a number property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initExtendedSettings()

ilObjCategoryGUI::initExtendedSettings ( )
protected

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

654 : bool
655 {
656 if (is_object($this->form)) {
657 return true;
658 }
659
660 $this->form = new ilPropertyFormGUI();
661 $this->form->setFormAction($this->ctrl->getFormAction($this));
662 $this->form->setTitle($this->lng->txt('ext_cat_settings'));
663 $this->form->addCommandButton('updateInfo', $this->lng->txt('save'));
664 $this->form->addCommandButton('editInfo', $this->lng->txt('cancel'));
665
666 $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'cat', $this->object->getId());
667 $this->record_gui->setPropertyForm($this->form);
668 $this->record_gui->parse();
669
670 return true;
671 }

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

Referenced by editInfoObject(), and updateInfoObject().

+ 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 1212 of file class.ilObjCategoryGUI.php.

1212 : void
1213 {
1214 $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1215 $this->tabs_gui->addSubTab(
1216 "tax_settings",
1217 $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1218 $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1219 );
1220 $this->tabs_gui->addSubTab(
1221 "tax_list",
1222 $this->lng->txt("cntr_taxonomy_definitions"),
1223 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1224 );
1225 $this->tabs_gui->activateSubTab($a_active);
1226 }

References ILIAS\Repository\lng().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject ( bool  $show_delete = false)

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

917 : void
918 {
921 $ilToolbar = $this->toolbar;
922
925
926 if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
927 $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
928 }
929 $this->tabs_gui->setTabActive('administrate_users');
930
931
932
933 $this->tpl->addBlockfile(
934 'ADM_CONTENT',
935 'adm_content',
936 'tpl.cat_admin_users.html',
937 "Modules/Category"
938 );
939
941 in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
942 $ilToolbar->addButton(
943 $this->lng->txt('add_user'),
944 $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
945 );
946
947 $ilToolbar->addButton(
948 $this->lng->txt('import_users'),
949 $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
950 );
951 } else {
952 $this->tpl->setOnScreenMessage('info', $this->lng->txt('no_roles_user_can_be_assigned_to'));
953 }
954
955 if ($show_delete) {
956 $this->tpl->setCurrentBlock("confirm_delete");
957 $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
958 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
959 $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
960 $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
961 $this->tpl->parseCurrentBlock();
962 }
963
964 $this->lng->loadLanguageModule('user');
965
966 $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
967 $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
968 }
ilToolbarGUI $toolbar

References ilContainerGUI\$error, $ilErr, $ilUser, 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performDeleteUsersObject()

ilObjCategoryGUI::performDeleteUsersObject ( )

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

988 : void
989 {
990 $this->checkPermission("cat_administrate_users");
991
992 foreach ($this->cat_request->getUserIds() as $user_id) {
993 if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()), true)) {
994 throw new ilException('user id not valid');
995 }
996 if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
997 continue;
998 }
999 $tmp_obj->delete();
1000 }
1001 $this->tpl->setOnScreenMessage('success', $this->lng->txt('deleted_users'));
1002 $this->listUsersObject();
1003 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

Reimplemented from ilContainerGUI.

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

500 : void
501 {
502 $ilTabs = $this->tabs;
503
504 $ilTabs->activateTab("view_content");
505 parent::renderObject();
506
508 $this->object->getType(),
509 $this->object->getRefId(),
510 $this->object->getId(),
511 $this->user->getId()
512 );
513 }
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)

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

Referenced by executeCommand(), and viewObject().

+ 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 892 of file class.ilObjCategoryGUI.php.

892 : void
893 {
894 $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
895 $utab->resetOffset();
896 $utab->resetFilter();
897
898 // from "old" implementation
899 $this->listUsersObject();
900 }

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

+ Here is the call graph for this function:

◆ setEditTabs()

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

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

673 : void
674 {
675 $this->tabs_gui->addSubTab(
676 "settings_misc",
677 $this->lng->txt("settings"),
678 $this->ctrl->getLinkTarget($this, "edit")
679 );
680
681 $this->tabs_gui->addSubTab(
682 "settings_trans",
683 $this->lng->txt("obj_multilinguality"),
684 $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
685 );
686
687 //news tab
689 $this->object->getId(),
691 '1'
692 );
693
694 if ($news_active) {
695 $this->tabs_gui->addSubTab(
696 'obj_news_settings',
697 $this->lng->txt("cont_news_settings"),
698 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
699 );
700 }
701
702 $this->tabs_gui->addSubTab(
703 "settings_filter",
704 $this->lng->txt("cont_filter"),
705 $this->ctrl->getLinkTargetByClass("ilcontainerfilteradmingui", "")
706 );
707
708 $this->tabs_gui->activateTab("settings");
709 $this->tabs_gui->activateSubTab($active_tab);
710 }

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateInfoObject()

ilObjCategoryGUI::updateInfoObject ( )
protected

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

632 : void
633 {
634 $this->checkPermission("write");
635
636 // init form
637 $this->initExtendedSettings();
638
639 // still needed for date conversion and so on
640 $this->form->checkInput();
641
642 if ($this->record_gui->importEditFormPostValues()) {
643 $this->record_gui->writeEditForm();
644
645 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
646 $this->ctrl->redirect($this, "editInfo");
647 }
648
649 $this->editInfoObject();
650 }

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

+ Here is the call graph for this function:

◆ updateObject()

ilObjCategoryGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

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

799 : void
800 {
803 $obj_service = $this->getObjectService();
804
805 if (!$this->checkPermissionBool("write")) {
806 $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
807 } else {
808 $form = $this->initEditForm();
809 if ($form->checkInput()) {
810 $title = $form->getInput("title");
811 $desc = $form->getInput("desc");
812
813 $this->object->setTitle($title);
814 $this->object->setDescription($desc);
815 $this->object->update();
816
818
819 // title icon visibility
820 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
821
822 // top actions visibility
823 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
824
825 // custom icon
826 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
827
828 // tile image
829 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
830
831 // list presentation
833
834 // BEGIN ChangeEvent: Record update
835 ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
836 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
837 // END ChangeEvent: Record update
838
839 // services
841 $this->object->getId(),
842 $form,
843 [
850 ]
851 );
852
853 // block limit
854 if ((int) $form->getInput("block_limit") > 0) {
856 $this->object->getId(),
857 "block_limit",
858 (string) ((int) $form->getInput("block_limit"))
859 );
860 } else {
861 ilContainer::_deleteContainerSettings($this->object->getId(), "block_limit");
862 }
863 // Update ecs export settings
864 $ecs = new ilECSCategorySettings($this->object);
865 if ($ecs->handleSettingsUpdate()) {
866 $this->afterUpdate();
867 return;
868 }
869 }
870
871 // display form to correct errors
872 $this->setEditTabs();
874 $this->tpl->setContent($form->getHTML());
875 }
876 }
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
afterUpdate()
Post (successful) object update hook.
saveListPresentation(ilPropertyFormGUI $form)
saveSortingSettings(ilPropertyFormGUI $form)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

References ilContainerGUI\$error, ilContainerGUI\$form, $ilErr, $ilUser, 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().

+ Here is the call graph for this function:

◆ viewObject()

ilObjCategoryGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Reimplemented from ilObjectGUI.

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

515 : void
516 {
517 if (strtolower($this->cat_request->getBaseClass()) === "iladministrationgui") {
518 parent::viewObject();
519 return;
520 }
521 $this->renderObject();
522 }

References renderObject().

+ Here is the call graph for this function:

Field Documentation

◆ $cat_request

StandardGUIRequest ilObjCategoryGUI::$cat_request
protected

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

◆ $creation_mode

bool ilObjCategoryGUI::$creation_mode
protected

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

◆ $gui_obj

ilObjectGUI ilObjCategoryGUI::$gui_obj
protected

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

◆ $help

ilHelpGUI ilObjCategoryGUI::$help
protected

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

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

◆ $info_screen_enabled

bool ilObjCategoryGUI::$info_screen_enabled = false
protected

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

◆ $nav_history

ilNavigationHistory ilObjCategoryGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $record_gui

ilAdvancedMDRecordGUI ilObjCategoryGUI::$record_gui
protected

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

Referenced by infoScreen().

◆ CONTAINER_SETTING_TAXBLOCK

const ilObjCategoryGUI::CONTAINER_SETTING_TAXBLOCK = "tax_sblock_"

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