ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 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 ()
 
 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
 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)
 
 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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 showTaxAsSideBlockObject ()
 
 hideTaxAsSideBlockObject ()
 
 getTabs ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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\GlobalScreen\Provider\__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  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
+ Here is the call graph for this function:

Member Function Documentation

◆ _getImportDir()

static ilObjCategoryGUI::_getImportDir ( )
static

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

References ilFileUtils\getDataDir().

938  : string
939  {
940  return ilFileUtils::getDataDir() . "/cat_import";
941  }
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 1244 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().

1244  : void
1245  {
1246  global $DIC;
1247  $main_tpl = $DIC->ui()->mainTemplate();
1248 
1249  $ilAccess = $DIC->access();
1250  $ilErr = $DIC["ilErr"];
1251  $lng = $DIC->language();
1252  if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
1253  ilObjectGUI::_gotoRepositoryNode((int) $a_target);
1254  } elseif ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
1255  ilObjectGUI::_gotoRepositoryNode((int) $a_target, "infoScreen");
1256  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1257  $main_tpl->setOnScreenMessage('failure', sprintf(
1258  $lng->txt("msg_no_perm_read_item"),
1260  ), true);
1262  }
1263 
1264  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1265  }
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:33
static _lookupObjId(int $ref_id)
ilLanguage $lng
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:22
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 1032 of file class.ilObjCategoryGUI.php.

References exit, and ilUserAutoComplete\MAX_ENTRIES.

1032  : void
1033  {
1034  $auto = new ilUserAutoComplete();
1035  $auto->setSearchFields(['login', 'firstname', 'lastname', 'email']);
1036  $auto->enableFieldSearchableCheck(true);
1037  //$auto->isMoreLinkAvailable(true);
1038 
1039  if (($this->cat_request->getFetchAll())) {
1040  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1041  }
1042 
1043  echo $auto->getList($this->cat_request->getTerm());
1044  exit();
1045  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $new_object)
protected

Definition at line 588 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.

588  : void
589  {
590  $tree = $this->tree;
591 
592  // default: sort by title
593  $settings = new ilContainerSortingSettings($new_object->getId());
594  $settings->setSortMode(ilContainer::SORT_TITLE);
595  $settings->save();
596 
597  // inherit parents content style, if not individual
598  $this->content_style_domain
599  ->styleForRefId($new_object->getRefId())
600  ->inheritFromParent();
601 
602  // always send a message
603  $this->tpl->setOnScreenMessage('success', $this->lng->txt("cat_added"), true);
604  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
605  $this->redirectToRefId($new_object->getRefId(), "");
606  }
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 965 of file class.ilObjCategoryGUI.php.

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

965  : void
966  {
967  $ilTabs = $this->tabs;
968 
969  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
970  $utab->resetOffset();
971  $utab->writeFilterToSession();
972  $this->listUsersObject();
973  }
listUsersObject(bool $show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

Definition at line 1091 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().

1091  : void
1092  {
1094  $ilTabs = $this->tabs;
1095 
1096  $this->checkPermission("cat_administrate_users");
1097 
1098  if ($this->cat_request->getObjId() === 0) {
1099  $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
1100  $this->listUsersObject();
1101  return;
1102  }
1103 
1104  $ilTabs->clearTargets();
1105  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1106  $ilHelp = $this->help;
1107  $ilHelp->setScreenIdComponent("cat");
1108  $ilHelp->setScreenId("administrate_user");
1109  $ilHelp->setSubScreenId("assign_roles");
1110 
1111 
1112  $roles = $this->getAssignableRoles();
1113 
1114  $ass_roles = $rbacreview->assignedRoles($this->cat_request->getObjId());
1115 
1116  $counter = 0;
1117  $f_result = [];
1118 
1119  foreach ($roles as $role) {
1120  $role_obj = ilObjectFactory::getInstanceByObjId((int) $role['obj_id']);
1121 
1122  $disabled = false;
1123  $f_result[$counter]['checkbox'] = ilLegacyFormElementsUtil::formCheckbox(
1124  in_array((int) $role['obj_id'], $ass_roles, true),
1125  'role_ids[]',
1126  (string) $role['obj_id'],
1127  $disabled
1128  );
1129  $f_result[$counter]['title'] = $role_obj->getTitle() ?: "";
1130  $f_result[$counter]['desc'] = $role_obj->getDescription() ?: "";
1131  $f_result[$counter]['type'] = ($role['role_type'] ?? '') === 'global' ?
1132  $this->lng->txt('global') :
1133  $this->lng->txt('local');
1134 
1135  unset($role_obj);
1136  ++$counter;
1137  }
1138 
1139  $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1140  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1141  $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1142  $table->setTitle($title, "standard/icon_role.svg", $this->lng->txt("role_assignment"));
1143  $table->setData($f_result);
1144  $this->tpl->setContent($table->getHTML());
1145  }
ilRbacReview $rbacreview
listUsersObject(bool $show_delete=false)
TableGUI class for role assignments.
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 1147 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().

1147  : void
1148  {
1151  $this->checkPermission("cat_administrate_users");
1152 
1153  // check hack
1154  if ($this->cat_request->getObjId() === 0 ||
1155  !in_array($this->cat_request->getObjId(), ilLocalUser::_getAllUserIds(), true)) {
1156  $this->tpl->setOnScreenMessage('failure', 'no_user_selected');
1157  $this->listUsersObject();
1158  return;
1159  }
1160  $roles = $this->getAssignableRoles();
1161 
1162  // check minimum one global role
1163  if (!$this->checkGlobalRoles($this->cat_request->getRoleIds())) {
1164  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_global_role_left'));
1165  $this->assignRolesObject();
1166  return;
1167  }
1168 
1169  $new_role_ids = $this->cat_request->getRoleIds();
1170  $assigned_roles = $rbacreview->assignedRoles($this->cat_request->getObjId());
1171  foreach ($roles as $role) {
1172  if (in_array((int) $role['obj_id'], $new_role_ids, true) && !in_array((int) $role['obj_id'], $assigned_roles, true)) {
1173  $rbacadmin->assignUser((int) $role['obj_id'], $this->cat_request->getObjId());
1174  }
1175  if (in_array((int) $role['obj_id'], $assigned_roles, true) && !in_array((int) $role['obj_id'], $new_role_ids, true)) {
1176  $rbacadmin->deassignUser((int) $role['obj_id'], $this->cat_request->getObjId());
1177  }
1178  }
1179  $this->tpl->setOnScreenMessage('success', $this->lng->txt('role_assignment_updated'));
1180  $this->assignRolesObject();
1181  }
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 1205 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().

1205  : bool
1206  {
1208  $ilUser = $this->user;
1209 
1210  $this->checkPermission("cat_administrate_users");
1211 
1212  // return true if it's not a local user
1213  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1214  if ($tmp_obj->getTimeLimitOwner() !== $this->object->getRefId() &&
1215  !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1216  return true;
1217  }
1218 
1219  // new assignment by form
1220  $new_assigned = $new_assigned ?: [];
1221  $assigned = $rbacreview->assignedRoles($this->cat_request->getObjId());
1222 
1223  // all assignable globals
1224  if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1226  } else {
1228  }
1229  $global_assignable = [];
1230  foreach ($ga as $role) {
1231  $global_assignable[] = $role['obj_id'];
1232  }
1233 
1234  $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1235  $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1236  $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1237 
1238  if (!count($new_visible_assigned_roles) && !count($main_assigned_roles)) {
1239  return false;
1240  }
1241  return true;
1242  }
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 1064 of file class.ilObjCategoryGUI.php.

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

1064  : void
1065  {
1066  $this->checkPermission("cat_administrate_users");
1067  if ($this->cat_request->getIds() === []) {
1068  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_users_selected'));
1069  $this->listUsersObject();
1070  return;
1071  }
1072 
1073  $confirm = new ilConfirmationGUI();
1074  $confirm->setFormAction($this->ctrl->getFormAction($this));
1075  $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1076  $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1077  $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1078 
1079  foreach ($this->cat_request->getIds() as $user) {
1080  $name = ilObjUser::_lookupName($user);
1081 
1082  $confirm->addItem(
1083  'user_ids[]',
1084  (string) $user,
1085  $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1086  );
1087  }
1088  $this->tpl->setContent($confirm->getHTML());
1089  }
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 675 of file class.ilObjCategoryGUI.php.

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

Referenced by updateInfoObject().

675  : void
676  {
677  $this->checkPermission("write");
678  $this->setEditTabs();
679  $this->tabs_gui->activateTab('settings');
680  $this->tabs_gui->setSubTabActive('edit_cat_settings');
681 
682  $this->initExtendedSettings();
683  $this->tpl->setContent($this->form->getHTML());
684  }
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(), null, ILIAS\Repository\object(), ilObjectGUI\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  }
infoScreen()
show information screen
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
setCreationMode(bool $mode=true)
If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
TableGUI class for user administration.
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
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(), null, 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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

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

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

Referenced by getActions(), and getProperties().

1314  : array
1315  {
1316  $res = [];
1317 
1318  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1319 
1320  foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1321  if ($value && strpos($keyword, $prefix) === 0) {
1322  $res[] = substr($keyword, strlen($prefix));
1323  }
1324  }
1325 
1326  return $res;
1327  }
$res
Definition: ltiservices.php:66
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 1184 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().

1184  : array
1185  {
1187  $ilUser = $this->user;
1188 
1189  // check local user
1190  $tmp_obj = ilObjectFactory::getInstanceByObjId($this->cat_request->getObjId());
1191  // Admin => all roles
1192  if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1193  $global_roles = $rbacreview->getGlobalRolesArray();
1194  } elseif ($tmp_obj->getTimeLimitOwner() === $this->object->getRefId()) {
1195  $global_roles = $rbacreview->getGlobalAssignableRoles();
1196  } else {
1197  $global_roles = [];
1198  }
1199  return array_merge(
1200  $global_roles,
1201  $rbacreview->getAssignableChildRoles($this->object->getRefId())
1202  );
1203  }
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 853 of file class.ilObjCategoryGUI.php.

853  : array
854  {
855  return [];
856  }

◆ 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  }
Class ilObjectMetaDataGUI.
+ 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([ilRepositoryGUI::class, self::class, 'ilexportgui'], ''),
552  'export',
553  'ilexportgui'
554  );
555  }
556 
557  // parent tabs (all container: edit_permission, clipboard, trash
558  parent::getTabs();
559  }
ilRbacSystem $rbacsystem
Class ilObjectMetaDataGUI.
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 1287 of file class.ilObjCategoryGUI.php.

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

1287  : array
1288  {
1289  $tree = $this->tree;
1290 
1291  // see ilTaxMDGUI::getSelectableTaxonomies()
1292 
1293  $res = [];
1294  foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1295  //if ($node["ref_id"] != $this->object->getRefId())
1296  {
1297  // find all defined taxes for parent node, activation is not relevant
1298  $node_taxes = ilObjTaxonomy::getUsageOfObject((int) $node["obj_id"], true);
1299  if (count($node_taxes)) {
1300  foreach ($node_taxes as $node_tax) {
1301  $res[$node_tax["tax_id"]] = [
1302  "title" => $node_tax["title"]
1303  , "source" => $node["child"]
1304  ];
1305  }
1306  }
1307  }
1308  }
1309 
1310  asort($res);
1311  return $res;
1312  }
$res
Definition: ltiservices.php:66
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 621 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().

621  : string
622  {
623  $ilAccess = $this->access;
624  $ilCtrl = $this->ctrl;
626 
627  if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
628  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
629  }
630 
631  if (!$this->info_screen_enabled) {
632  return "";
633  }
634 
635  // #10986
636  $this->tabs_gui->setTabActive('info_short');
637 
638  $info = new ilInfoScreenGUI($this);
639 
640  $info->enablePrivateNotes();
641 
642  if ($ilAccess->checkAccess("read", "", $this->cat_request->getRefId())) {
643  $info->enableNews();
644  }
645 
646  // no news editing for files, just notifications
647  $info->enableNewsEditing(false);
648  if ($ilAccess->checkAccess("write", "", $this->cat_request->getRefId())) {
649  $news_set = new ilSetting("news");
650  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
651 
652  if ($enable_internal_rss) {
653  $info->setBlockProperty("news", "settings", '1');
654  $info->setBlockProperty("news", "public_notifications_option", '1');
655  }
656  }
657 
659  $record_gui->setInfoObject($info);
660  $record_gui->parse();
661 
662 
663  // standard meta data
664  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
665 
666  // forward the command
667  if ($ilCtrl->getNextClass() === "ilinfoscreengui") {
668  $ilCtrl->forwardCommand($info);
669  } else {
670  return $ilCtrl->getHTML($info);
671  }
672  return "";
673  }
ilAdvancedMDRecordGUI $record_gui
$ilErr
Definition: raiseError.php:33
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 613 of file class.ilObjCategoryGUI.php.

References ILIAS\Repository\ctrl().

613  : void
614  {
615  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
616  }
+ Here is the call graph for this function:

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )
protected

Definition at line 771 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(), ilFormPropertyGUI\setInfo(), ilPropertyFormGUI\setTitle(), ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\TAXONOMIES.

Referenced by updateObject().

772  {
773  $obj_service = $this->getObjectService();
774 
775  $this->lng->loadLanguageModule($this->object->getType());
776  $this->setEditTabs();
777 
778  $form = new ilPropertyFormGUI();
779  $form->setFormAction($this->ctrl->getFormAction($this));
780  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
781 
782  // title/description
783  $this->initFormTitleDescription($form);
784 
785  // Show didactic template type
786  $this->initDidacticTemplate($form);
787 
788  // presentation
789  $pres = new ilFormSectionHeaderGUI();
790  $pres->setTitle($this->lng->txt('obj_presentation'));
791  $form->addItem($pres);
792 
793  // title and icon visibility
794  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
795 
796  // top actions visibility
797  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
798 
799  // custom icon
800  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
801 
802  // tile image
803  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
804 
805  // list presentation
807 
808  // sorting
809  $form = $this->initSortingForm(
810  $form,
811  [
815  ]
816  );
817 
818  // block limit
819  $bl = new ilNumberInputGUI($this->lng->txt("cont_block_limit"), "block_limit");
820  $bl->setInfo($this->lng->txt("cont_block_limit_info"));
821  $bl->setValue(ilContainer::_lookupContainerSetting($this->object->getId(), "block_limit"));
822  $form->addItem($bl);
823 
824  // icon settings
825 
826  // Edit ecs export settings
827  $ecs = new ilECSCategorySettings($this->object);
828  $ecs->addSettingsToForm($form, 'cat');
829 
830  // services
831  $sh = new ilFormSectionHeaderGUI();
832  $sh->setTitle($this->lng->txt('obj_features'));
833  $form->addItem($sh);
834 
836  $this->object->getId(),
837  $form,
838  [
845  ]
846  );
847 
848  $form->addCommandButton("update", $this->lng->txt("save"));
849 
850  return $form;
851  }
setFormAction(string $a_formaction)
This class represents a number property in a property form.
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.
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
Class ilECSCategorySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initExtendedSettings()

ilObjCategoryGUI::initExtendedSettings ( )
protected

Definition at line 709 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().

709  : bool
710  {
711  if (is_object($this->form)) {
712  return true;
713  }
714 
715  $this->form = new ilPropertyFormGUI();
716  $this->form->setFormAction($this->ctrl->getFormAction($this));
717  $this->form->setTitle($this->lng->txt('ext_cat_settings'));
718  $this->form->addCommandButton('updateInfo', $this->lng->txt('save'));
719  $this->form->addCommandButton('editInfo', $this->lng->txt('cancel'));
720 
721  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'cat', $this->object->getId());
722  $this->record_gui->setPropertyForm($this->form);
723  $this->record_gui->parse();
724 
725  return true;
726  }
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 1271 of file class.ilObjCategoryGUI.php.

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

1271  : void
1272  {
1273  $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1274  $this->tabs_gui->addSubTab(
1275  "tax_settings",
1276  $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1277  $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1278  );
1279  $this->tabs_gui->addSubTab(
1280  "tax_list",
1281  $this->lng->txt("cntr_taxonomy_definitions"),
1282  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1283  );
1284  $this->tabs_gui->activateSubTab($a_active);
1285  }
+ Here is the call graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject ( bool  $show_delete = false)

Definition at line 976 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().

976  : void
977  {
978  $ilUser = $this->user;
980  $ilToolbar = $this->toolbar;
981 
984 
985  if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
986  $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
987  }
988  $this->tabs_gui->setTabActive('administrate_users');
989 
990 
991 
992  $this->tpl->addBlockfile(
993  'ADM_CONTENT',
994  'adm_content',
995  'tpl.cat_admin_users.html',
996  "components/ILIAS/Category"
997  );
998 
999  if (count($rbacreview->getGlobalAssignableRoles()) ||
1000  in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) {
1001  $ilToolbar->addButton(
1002  $this->lng->txt('add_user'),
1003  $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
1004  );
1005 
1006  $ilToolbar->addButton(
1007  $this->lng->txt('import_users'),
1008  $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
1009  );
1010  } else {
1011  $this->tpl->setOnScreenMessage('info', $this->lng->txt('no_roles_user_can_be_assigned_to'));
1012  }
1013 
1014  if ($show_delete) {
1015  $this->tpl->setCurrentBlock("confirm_delete");
1016  $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
1017  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
1018  $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
1019  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
1020  $this->tpl->parseCurrentBlock();
1021  }
1022 
1023  $this->lng->loadLanguageModule('user');
1024 
1025  $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
1026  $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
1027  }
ilRbacSystem $rbacsystem
ilRbacReview $rbacreview
const SYSTEM_ROLE_ID
Definition: constants.php:29
$ilErr
Definition: raiseError.php:33
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 1047 of file class.ilObjCategoryGUI.php.

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

1047  : void
1048  {
1049  $this->checkPermission("cat_administrate_users");
1050 
1051  foreach ($this->cat_request->getUserIds() as $user_id) {
1052  if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()), true)) {
1053  throw new ilException('user id not valid');
1054  }
1055  if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
1056  continue;
1057  }
1058  $tmp_obj->delete();
1059  }
1060  $this->tpl->setOnScreenMessage('success', $this->lng->txt('deleted_users'));
1061  $this->listUsersObject();
1062  }
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 951 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

951  : void
952  {
953  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
954  $utab->resetOffset();
955  $utab->resetFilter();
956 
957  // from "old" implementation
958  $this->listUsersObject();
959  }
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 728 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().

728  : void
729  {
730  $this->tabs_gui->addSubTab(
731  "settings_misc",
732  $this->lng->txt("general"),
733  $this->ctrl->getLinkTarget($this, "edit")
734  );
735 
736  $this->tabs_gui->addSubTab(
737  "settings_trans",
738  $this->lng->txt("obj_multilinguality"),
739  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
740  );
741 
742  //news tab
744  $this->object->getId(),
746  '1'
747  );
748 
749  if ($news_active) {
750  $this->tabs_gui->addSubTab(
751  'obj_news_settings',
752  $this->lng->txt("cont_news_settings"),
753  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
754  );
755  }
756 
757  $this->tabs_gui->addSubTab(
758  "settings_filter",
759  $this->lng->txt("cont_filter"),
760  $this->ctrl->getLinkTargetByClass("ilcontainerfilteradmingui", "")
761  );
762 
763  if ($obj = $this->getObject()) {
764  $this->taxonomy->gui()->addSettingsSubTab($obj->getId());
765  }
766 
767  $this->tabs_gui->activateTab("settings");
768  $this->tabs_gui->activateSubTab($active_tab);
769  }
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 687 of file class.ilObjCategoryGUI.php.

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

687  : void
688  {
689  $this->checkPermission("write");
690 
691  // init form
692  $this->initExtendedSettings();
693 
694  // still needed for date conversion and so on
695  $this->form->checkInput();
696 
697  if ($this->record_gui->importEditFormPostValues()) {
698  $this->record_gui->writeEditForm();
699 
700  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
701  $this->ctrl->redirect($this, "editInfo");
702  }
703 
704  $this->editInfoObject();
705  }
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 858 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().

858  : void
859  {
861  $ilUser = $this->user;
862  $obj_service = $this->getObjectService();
863 
864  if (!$this->checkPermissionBool("write")) {
865  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
866  } else {
867  $form = $this->initEditForm();
868  if ($form->checkInput()) {
869  $title = $form->getInput("title");
870  $desc = $form->getInput("desc");
871 
872  $this->object->setTitle($title);
873  $this->object->setDescription($desc);
874  $this->object->update();
875 
876  $this->saveSortingSettings($form);
877 
878  // title icon visibility
879  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
880 
881  // top actions visibility
882  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
883 
884  // custom icon
885  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
886 
887  // tile image
888  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
889 
890  // list presentation
891  $this->saveListPresentation($form);
892 
893  // BEGIN ChangeEvent: Record update
894  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
895  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
896  // END ChangeEvent: Record update
897 
898  // services
900  $this->object->getId(),
901  $form,
902  [
909  ]
910  );
911 
912  // block limit
913  if ((int) $form->getInput("block_limit") > 0) {
915  $this->object->getId(),
916  "block_limit",
917  (string) ((int) $form->getInput("block_limit"))
918  );
919  } else {
920  ilContainer::_deleteContainerSettings($this->object->getId(), "block_limit");
921  }
922  // Update ecs export settings
923  $ecs = new ilECSCategorySettings($this->object);
924  if ($ecs->handleSettingsUpdate($form)) {
925  $this->afterUpdate();
926  return;
927  }
928  }
929 
930  // display form to correct errors
931  $this->setEditTabs();
933  $this->tpl->setContent($form->getHTML());
934  }
935  }
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:33
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")
Class ilECSCategorySettings.
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
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: