ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjCategoryGUI Class Reference

Class ilObjCategoryGUI. More...

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

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 getObjectMetadataGUI ()
 Get object metadata gui. More...
 
 getTabs ()
 Get tabs. More...
 
 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...
 
 initEditForm ()
 Init object edit form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 updateObject ()
 updates object entry in object_data More...
 
 importCategoriesFormObject ()
 display form for category import More...
 
 importCancelledObject ()
 import cancelled More...
 
 importCategoriesObject ()
 import categories More...
 
 importCategoriesWithRolObject ()
 import categories with local rol More...
 
 listUsersObject ($show_delete=false)
 
 performDeleteUsersObject ()
 
 deleteUsersObject ()
 
 assignRolesObject ()
 
 assignSaveObject ()
 
 __getAssignableRoles ()
 
 __checkGlobalRoles ($new_assigned)
 
- Public Member Functions inherited from ilContainerGUI
 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard 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 ()
 get proper label to add in the background task popover More...
 
 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 ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 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 ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 @access public More...
 
 cloneWizardPageListObject ()
 @access public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 trash table apply filter More...
 
 trashResetFilterObject ()
 trash table reset filter More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 competencesObject ()
 Redirect to competences. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- 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 _importCategoriesForm ($a_ref_id, &$a_tpl)
 display form for category import (static, also called by RootFolderGUI) More...
 
static _getImportDir ()
 get user import directory name More...
 
static _importCategories ($a_ref_id, $withrol_tmp)
 import categories (static, also called by RootFolderGUI) More...
 
static _goto ($a_target)
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $ctrl
 
const CONTAINER_SETTING_TAXBLOCK = "tax_sblock_"
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 addHeaderAction ()
 @inheritDoc More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 editInfoObject ()
 Edit extended category settings. More...
 
 updateInfoObject ()
 Update info (extended meta data) More...
 
 initExtendedSettings ()
 build property form for extended category settings More...
 
 setEditTabs ($active_tab="settings_misc")
 
 resetFilterObject ()
 Reset filter (note: this function existed before data table filter has been introduced. 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 ()
 Get values for edit form. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 supportsPageEditor ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 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)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (\ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI ($cmd)
 
 initFilter ()
 Init filter. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $nav_history
 
 $help
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $global_screen
 
 $app_event_handler
 
 $ui
 
 $container_filter_service
 
 $container_user_filter = null
 
 $ui_filter
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Reimplemented from ilContainerGUI.

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

40 {
41 global $DIC;
42
43 $this->rbacsystem = $DIC->rbac()->system();
44 $this->nav_history = $DIC["ilNavigationHistory"];
45 $this->access = $DIC->access();
46 $this->ctrl = $DIC->ctrl();
47 $this->tabs = $DIC->tabs();
48 $this->help = $DIC["ilHelp"];
49 $this->lng = $DIC->language();
50 $this->user = $DIC->user();
51 $this->tree = $DIC->repositoryTree();
52 $this->error = $DIC["ilErr"];
53 $this->settings = $DIC->settings();
54 $this->tpl = $DIC["tpl"];
55 $this->toolbar = $DIC->toolbar();
56 $this->rbacreview = $DIC->rbac()->review();
57 $this->rbacadmin = $DIC->rbac()->admin();
58 //global $ilCtrl;
59
60 // CONTROL OPTIONS
61 //$this->ctrl =& $ilCtrl;
62 //$this->ctrl->saveParameter($this,array("ref_id","cmdClass"));
63 $GLOBALS['lng']->loadLanguageModule('cat');
64 $GLOBALS['lng']->loadLanguageModule('obj');
65
66 $this->type = "cat";
67 parent::__construct($a_data, (int) $a_id, $a_call_by_reference, false);
68
69 if (is_object($this->object)) {
70 include_once("./Services/Container/classes/class.ilContainer.php");
71 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
72 $this->info_screen_enabled = ilContainer::_lookupContainerSetting(
73 $this->object->getId(),
75 true
76 );
77 }
78 }
user()
Definition: user.php:4
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
error($a_errmsg)
set error message @access public
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2

References $DIC, $GLOBALS, ILIAS\GlobalScreen\Provider\__construct(), ilContainer\_lookupContainerSetting(), error(), help(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __checkGlobalRoles()

ilObjCategoryGUI::__checkGlobalRoles (   $new_assigned)

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

1373 {
1376
1377 $this->checkPermission("cat_administrate_users");
1378
1379 // return true if it's not a local user
1380 $tmp_obj = &ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1381 if ($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
1382 !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1383 return true;
1384 }
1385
1386 // new assignment by form
1387 $new_assigned = $new_assigned ? $new_assigned : array();
1388 $assigned = $rbacreview->assignedRoles((int) $_GET['obj_id']);
1389
1390 // all assignable globals
1391 if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1392 $ga = $rbacreview->getGlobalAssignableRoles();
1393 } else {
1394 $ga = $rbacreview->getGlobalRolesArray();
1395 }
1396 $global_assignable = array();
1397 foreach ($ga as $role) {
1398 $global_assignable[] = $role['obj_id'];
1399 }
1400
1401 $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1402 $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1403 $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1404
1405 if (!count($new_visible_assigned_roles) and !count($main_assigned_roles)) {
1406 return false;
1407 }
1408 return true;
1409 }
$_GET["client_id"]
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
const SYSTEM_ROLE_ID
Definition: constants.php:27
$ilUser
Definition: imgupload.php:18

References $_GET, $ilUser, ilContainerGUI\$rbacreview, ilContainerGUI\$user, ilObjectGUI\checkPermission(), 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:

◆ __getAssignableRoles()

ilObjCategoryGUI::__getAssignableRoles ( )

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

1352 {
1355
1356 // check local user
1357 $tmp_obj = &ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1358 // Admin => all roles
1359 if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1360 $global_roles = $rbacreview->getGlobalRolesArray();
1361 } elseif ($tmp_obj->getTimeLimitOwner() == $this->object->getRefId()) {
1362 $global_roles = $rbacreview->getGlobalAssignableRoles();
1363 } else {
1364 $global_roles = array();
1365 }
1366 return $roles = array_merge(
1367 $global_roles,
1368 $rbacreview->getAssignableChildRoles($this->object->getRefId())
1369 );
1370 }

References $ilUser, ilContainerGUI\$rbacreview, ilContainerGUI\$user, 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:

◆ _getImportDir()

static ilObjCategoryGUI::_getImportDir ( )
static

get user import directory name

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

1012 {
1013 return ilUtil::getDataDir() . "/cat_import";
1014 }
static getDataDir()
get data directory (outside webspace)

References ilUtil\getDataDir().

Referenced by _importCategories().

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

◆ _goto()

static ilObjCategoryGUI::_goto (   $a_target)
static

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

1412 {
1413 global $DIC;
1414
1415 $ilAccess = $DIC->access();
1416 $ilErr = $DIC["ilErr"];
1417 $lng = $DIC->language();
1418
1419 if ($ilAccess->checkAccess("read", "", $a_target)) {
1421 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1422 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1423 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1424 ilUtil::sendFailure(sprintf(
1425 $lng->txt("msg_no_perm_read_item"),
1427 ), true);
1429 }
1430
1431 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1432 }
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const ROOT_FOLDER_ID
Definition: constants.php:30

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

Referenced by ilObjCategoryReferenceGUI\_goto().

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

◆ _importCategories()

static ilObjCategoryGUI::_importCategories (   $a_ref_id,
  $withrol_tmp 
)
static

import categories (static, also called by RootFolderGUI)

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

1042 {
1043 global $DIC;
1044
1045 $lng = $DIC->language();
1046 $ilCtrl = $DIC->ctrl();
1047
1048 require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
1049
1050 $import_dir = ilObjCategoryGUI::_getImportDir();
1051
1052 // create user import directory if necessary
1053 if (!@is_dir($import_dir)) {
1054 ilUtil::createDirectory($import_dir);
1055 }
1056
1057 // move uploaded file to user import directory
1058
1059 $file_name = $_FILES["importFile"]["name"];
1060
1061 // added to prevent empty file names
1062 if (!strcmp($file_name, "")) {
1063 ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
1064 $ilCtrl->redirectByClass('ilObjCategoryGUI');
1065 }
1066
1067 $parts = pathinfo($file_name);
1068 $full_path = $import_dir . "/" . $file_name;
1069 ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1070
1071 // unzip file
1072 ilUtil::unzip($full_path);
1073
1074 $subdir = basename($parts["basename"], "." . $parts["extension"]);
1075 $xml_file = $import_dir . "/" . $subdir . "/" . $subdir . ".xml";
1076 // CategoryImportParser
1077 //var_dump($_POST);
1078 $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1079 $importParser->startParsing();
1080
1081 ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1082 $ilCtrl->redirectByClass('ilObjCategoryGUI');
1083 }
static _getImportDir()
get user import directory name
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
static createDirectory($a_dir, $a_mod=0755)
create directory

References $DIC, ilObjectGUI\$lng, _getImportDir(), ilUtil\createDirectory(), ilUtil\moveUploadedFile(), ilUtil\sendFailure(), and ilUtil\unzip().

Referenced by importCategoriesObject(), ilObjRootFolderGUI\importCategoriesObject(), importCategoriesWithRolObject(), and ilObjRootFolderGUI\importCategoriesWithRolObject().

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

◆ _importCategoriesForm()

static ilObjCategoryGUI::_importCategoriesForm (   $a_ref_id,
$a_tpl 
)
static

display form for category import (static, also called by RootFolderGUI)

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

942 {
943 global $DIC;
944
945 $lng = $DIC->language();
946 $rbacreview = $DIC->rbac()->review();
947 $ilCtrl = $DIC->ctrl();
948
949 $a_tpl->addBlockfile(
950 "ADM_CONTENT",
951 "adm_content",
952 "tpl.cat_import_form.html",
953 "Modules/Category"
954 );
955
956 $a_tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilObjCategoryGUI'));
957
958 $a_tpl->setVariable("TXT_IMPORT_CATEGORIES", $lng->txt("import_categories"));
959 $a_tpl->setVariable("TXT_HIERARCHY_OPTION", $lng->txt("import_cat_localrol"));
960 $a_tpl->setVariable("TXT_IMPORT_FILE", $lng->txt("import_file"));
961 $a_tpl->setVariable("TXT_IMPORT_TABLE", $lng->txt("import_cat_table"));
962
963 $a_tpl->setVariable("BTN_IMPORT", $lng->txt("import"));
964 $a_tpl->setVariable("BTN_CANCEL", $lng->txt("cancel"));
965
966 // NEED TO FILL ADOPT_PERMISSIONS HTML FORM....
967 $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id, true);
968
969 // sort output for correct color changing
970 ksort($parent_role_ids);
971
972 foreach ($parent_role_ids as $key => $par) {
973 if ($par["obj_id"] != SYSTEM_ROLE_ID) {
974 $check = ilUtil::formCheckbox(0, "adopt[]", $par["obj_id"], 1);
975 $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
976 $output["adopt"][$key]["check_adopt"] = $check;
977 $output["adopt"][$key]["role_id"] = $par["obj_id"];
978 $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
979 $output["adopt"][$key]["role_name"] = $par["title"];
980 }
981 }
982
983 //var_dump($output);
984
985 // BEGIN ADOPT PERMISSIONS
986 foreach ($output["adopt"] as $key => $value) {
987 $a_tpl->setCurrentBlock("ADOPT_PERM_ROW");
988 $a_tpl->setVariable("CSS_ROW_ADOPT", $value["css_row_adopt"]);
989 $a_tpl->setVariable("CHECK_ADOPT", $value["check_adopt"]);
990 $a_tpl->setVariable("LABEL_ID", $value["role_id"]);
991 $a_tpl->setVariable("TYPE", $value["type"]);
992 $a_tpl->setVariable("ROLE_NAME", $value["role_name"]);
993 $a_tpl->parseCurrentBlock();
994 }
995 }
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)

References $DIC, ilObjectGUI\$lng, ilContainerGUI\$rbacreview, ilUtil\formCheckbox(), ilUtil\switchColor(), and SYSTEM_ROLE_ID.

Referenced by importCategoriesFormObject(), and ilObjRootFolderGUI\importCategoriesFormObject().

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

◆ addHeaderAction()

ilObjCategoryGUI::addHeaderAction ( )
protected

@inheritDoc

Reimplemented from ilObjectGUI.

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

320 {
322 parent::addHeaderAction();
323 }
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 1177 of file class.ilObjCategoryGUI.php.

1178 {
1179 include_once './Services/User/classes/class.ilUserAutoComplete.php';
1180 $auto = new ilUserAutoComplete();
1181 $auto->setSearchFields(array('login','firstname','lastname','email'));
1182 $auto->enableFieldSearchableCheck(true);
1183 $auto->isMoreLinkAvailable(true);
1184
1185 if (($_REQUEST['fetchall'])) {
1186 $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1187 }
1188
1189 echo $auto->getList($_REQUEST['term']);
1190 exit();
1191 }
Auto completion class for user lists.
exit
Definition: login.php:29

References exit, and ilUserAutoComplete\MAX_ENTRIES.

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

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

552 {
554
555 // default: sort by title
556 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
557 $settings = new ilContainerSortingSettings($a_new_object->getId());
559 $settings->save();
560
561 // inherit parents content style, if not individual
562 $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
563 $parent_id = ilObject::_lookupObjId($parent_ref_id);
564 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
565 $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
566 if ($style_id > 0) {
567 if (ilObjStyleSheet::_lookupStandard($style_id)) {
568 ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
569 }
570 }
571
572 // always send a message
573 ilUtil::sendSuccess($this->lng->txt("cat_added"), true);
574 $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
575 $this->redirectToRefId($a_new_object->getRefId(), "");
576 }
static _lookupStandard($a_id)
Lookup standard flag.
static lookupObjectStyle($a_obj_id)
Lookup object style.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
getRefId()
get reference id @access public
getId()
get object id @access public

References ilContainerGUI\$settings, ilObjectGUI\$tree, ilObject\_lookupObjId(), ilObjStyleSheet\_lookupStandard(), ilObject\getId(), ilObject\getRefId(), ilObjStyleSheet\lookupObjectStyle(), ilObjectGUI\redirectToRefId(), ilContainer\SORT_TITLE, and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjCategoryGUI::applyFilterObject ( )
protected

Apply filter.

Returns

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

1105 {
1106 $ilTabs = $this->tabs;
1107
1108 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1109 $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1110 $utab->resetOffset();
1111 $utab->writeFilterToSession();
1112 $this->listUsersObject();
1113 }
listUsersObject($show_delete=false)
TableGUI class for user administration.

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

+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

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

1244 {
1246 $ilTabs = $this->tabs;
1247
1248 $this->checkPermission("cat_administrate_users");
1249
1250 include_once './Services/User/classes/class.ilLocalUser.php';
1251
1252 if (!isset($_GET['obj_id'])) {
1253 ilUtil::sendFailure('no_user_selected');
1254 $this->listUsersObject();
1255
1256 return true;
1257 }
1258
1259 $ilTabs->clearTargets();
1260 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1261 $ilHelp = $this->help;
1262 $ilHelp->setScreenIdComponent("cat");
1263 $ilHelp->setScreenId("administrate_user");
1264 $ilHelp->setSubScreenId("assign_roles");
1265
1266
1267 $roles = $this->__getAssignableRoles();
1268
1269 if (!count($roles)) {
1270 #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1271 #$this->listUsersObject();
1272
1273 #return true;
1274 }
1275
1276 $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1277
1278 $counter = 0;
1279 $f_result = array();
1280
1281 foreach ($roles as $role) {
1282 $role_obj = &ilObjectFactory::getInstanceByObjId($role['obj_id']);
1283
1284 $disabled = false;
1285 $f_result[$counter]['checkbox'] = ilUtil::formCheckbox(
1286 in_array($role['obj_id'], $ass_roles) ? 1 : 0,
1287 'role_ids[]',
1288 $role['obj_id'],
1289 $disabled
1290 );
1291 $f_result[$counter]['title'] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1292 $f_result[$counter]['desc'] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1293 $f_result[$counter]['type'] = $role['role_type'] == 'global' ?
1294 $this->lng->txt('global') :
1295 $this->lng->txt('local');
1296
1297 unset($role_obj);
1298 ++$counter;
1299 }
1300
1301 include_once('./Modules/Category/classes/class.ilCategoryAssignRoleTableGUI.php');
1302 $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1303 $tmp_obj = &ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1304 $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1305 $table->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
1306 $table->setData($f_result);
1307 $this->tpl->setContent($table->getHTML());
1308 }
TableGUI class for role assignments.

References $_GET, $help, ilContainerGUI\$rbacreview, ilContainerGUI\$tabs, __getAssignableRoles(), ilObjectGUI\checkPermission(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), listUsersObject(), and ilUtil\sendFailure().

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

1311 {
1314 $this->checkPermission("cat_administrate_users");
1315
1316 include_once './Services/User/classes/class.ilLocalUser.php';
1317 // check hack
1318 if (!isset($_GET['obj_id']) or !in_array($_REQUEST['obj_id'], ilLocalUser::_getAllUserIds())) {
1319 ilUtil::sendFailure('no_user_selected');
1320 $this->listUsersObject();
1321
1322 return true;
1323 }
1324 $roles = $this->__getAssignableRoles();
1325
1326 // check minimum one global role
1327 if (!$this->__checkGlobalRoles($_POST['role_ids'])) {
1328 ilUtil::sendFailure($this->lng->txt('no_global_role_left'));
1329 $this->assignRolesObject();
1330
1331 return false;
1332 }
1333
1334 $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
1335 $assigned_roles = $rbacreview->assignedRoles((int) $_REQUEST['obj_id']);
1336 foreach ($roles as $role) {
1337 if (in_array($role['obj_id'], $new_role_ids) and !in_array($role['obj_id'], $assigned_roles)) {
1338 $rbacadmin->assignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1339 }
1340 if (in_array($role['obj_id'], $assigned_roles) and !in_array($role['obj_id'], $new_role_ids)) {
1341 $rbacadmin->deassignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1342 }
1343 }
1344 ilUtil::sendSuccess($this->lng->txt('role_assignment_updated'));
1345 $this->assignRolesObject();
1346
1347 return true;
1348 }
$_POST["username"]
static _getAllUserIds($a_filter=0)
__checkGlobalRoles($new_assigned)

References $_GET, $_POST, ilContainerGUI\$rbacadmin, ilContainerGUI\$rbacreview, __checkGlobalRoles(), __getAssignableRoles(), ilLocalUser\_getAllUserIds(), assignRolesObject(), ilObjectGUI\checkPermission(), listUsersObject(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

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

1215 {
1216 $this->checkPermission("cat_administrate_users");
1217 if (!count($_POST['id'])) {
1218 ilUtil::sendFailure($this->lng->txt('no_users_selected'));
1219 $this->listUsersObject();
1220
1221 return true;
1222 }
1223
1224 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
1225 $confirm = new ilConfirmationGUI();
1226 $confirm->setFormAction($this->ctrl->getFormAction($this));
1227 $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1228 $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1229 $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1230
1231 foreach ($_POST['id'] as $user) {
1233
1234 $confirm->addItem(
1235 'user_ids[]',
1236 $user,
1237 $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1238 );
1239 }
1240 $this->tpl->setContent($confirm->getHTML());
1241 }
Confirmation screen class.
static _lookupName($a_user_id)
lookup user name
if($format !==null) $name
Definition: metadata.php:230

References $_POST, $name, ilContainerGUI\$user, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), listUsersObject(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

Edit extended category settings.

@access protected

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

654 {
655 $this->checkPermission("write");
656 $this->setEditTabs();
657 $this->tabs_gui->activateTab('settings');
658 $this->tabs_gui->setSubTabActive('edit_cat_settings');
659
660 $this->initExtendedSettings();
661 $this->tpl->setContent($this->form->getHTML());
662 }
initExtendedSettings()
build property form for extended category settings
setEditTabs($active_tab="settings_misc")

References ilObjectGUI\checkPermission(), 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 ( )

execute command note: this method is overwritten in all container objects

Reimplemented from ilContainerGUI.

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

81 {
83 $ilNavigationHistory = $this->nav_history;
84 $ilAccess = $this->access;
85 $ilCtrl = $this->ctrl;
86 $ilTabs = $this->tabs;
87
88 $next_class = $this->ctrl->getNextClass($this);
89 $cmd = $this->ctrl->getCmd();
90
91 $header_action = true;
92 switch ($next_class) {
93
94 case strtolower(ilRepUtilGUI::class):
95 $ru = new \ilRepUtilGUI($this);
96 $this->ctrl->setReturn($this, 'trash');
97 $this->ctrl->forwardCommand($ru);
98 break;
99
100 case "ilobjusergui":
101 include_once('./Services/User/classes/class.ilObjUserGUI.php');
102
103 $this->tabs_gui->setTabActive('administrate_users');
104 if (!$_GET['obj_id']) {
105 $this->gui_obj = new ilObjUserGUI("", $_GET['ref_id'], true, false);
106 $this->gui_obj->setCreationMode($this->creation_mode);
107 $ret = &$this->ctrl->forwardCommand($this->gui_obj);
108 } else {
109 $this->gui_obj = new ilObjUserGUI("", $_GET['obj_id'], false, false);
110 $this->gui_obj->setCreationMode($this->creation_mode);
111 $ret = &$this->ctrl->forwardCommand($this->gui_obj);
112 }
113
114 $ilTabs->clearTargets();
115 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
116 $ilHelp = $this->help;
117 $ilHelp->setScreenIdComponent("cat");
118 $ilHelp->setScreenId("administrate_user");
119 $ilHelp->setSubScreenId($ilCtrl->getCmd());
120 break;
121
122 case "ilobjuserfoldergui":
123 include_once('./Services/User/classes/class.ilObjUserFolderGUI.php');
124
125 $this->gui_obj = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false);
126 $this->gui_obj->setUserOwnerId((int) $_GET['ref_id']);
127 $this->gui_obj->setCreationMode($this->creation_mode);
128 $ret = &$this->ctrl->forwardCommand($this->gui_obj);
129
130 $ilTabs->clearTargets();
131 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
132 $ilHelp = $this->help;
133 $ilHelp->setScreenIdComponent("cat");
134 $ilHelp->setScreenId("administrate_user");
135 $ilHelp->setSubScreenId($ilCtrl->getCmd());
136 break;
137
138 case "ilcolumngui":
139 $this->checkPermission("read");
140 $this->prepareOutput();
141 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
142 $this->tpl->setVariable(
143 "LOCATION_CONTENT_STYLESHEET",
144 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
145 );
146 $this->renderObject();
147 break;
148
149 case 'ilpermissiongui':
150 $this->prepareOutput();
151 $this->tabs_gui->setTabActive('perm_settings');
152 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
153 $perm_gui = new ilPermissionGUI($this);
154 $ret = &$this->ctrl->forwardCommand($perm_gui);
155 break;
156
157 case 'ilinfoscreengui':
158 if ($this->info_screen_enabled) {
159 $this->prepareOutput();
160 $this->infoScreen();
161 }
162 break;
163
164 case 'ilcontainerlinklistgui':
165 include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
166 $link_list_gui = new ilContainerLinkListGUI();
167 $ret = &$this->ctrl->forwardCommand($link_list_gui);
168 break;
169
170 // container page editing
171 case "ilcontainerpagegui":
172 $this->prepareOutput(false);
173 $ret = $this->forwardToPageObject();
174 if ($ret != "") {
175 $this->tpl->setContent($ret);
176 }
177 $header_action = false;
178 break;
179
180 case 'ilobjectcopygui':
181 $this->prepareOutput();
182
183 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
184 $cp = new ilObjectCopyGUI($this);
185 $cp->setType('cat');
186 $this->ctrl->forwardCommand($cp);
187 break;
188
189 case "ilobjstylesheetgui":
190 $this->forwardToStyleSheet();
191 break;
192
193 case 'ilusertablegui':
194 include_once './Services/User/classes/class.ilUserTableGUI.php';
195 $u_table = new ilUserTableGUI($this, "listUsers");
196 $u_table->initFilter();
197 $this->ctrl->setReturn($this, 'listUsers');
198 $this->ctrl->forwardCommand($u_table);
199 break;
200
201 case "ilcommonactiondispatchergui":
202 $this->prepareOutput();
203 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
205 $this->ctrl->forwardCommand($gui);
206 break;
207
208 case 'ildidactictemplategui':
209 $this->ctrl->setReturn($this, 'edit');
210 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
211 $did = new ilDidacticTemplateGUI($this);
212 $this->ctrl->forwardCommand($did);
213 break;
214
215 case 'ilexportgui':
216 $this->prepareOutput();
217 $this->tabs_gui->setTabActive('export');
218 include_once './Services/Export/classes/class.ilExportGUI.php';
219 $exp = new ilExportGUI($this);
220 $exp->addFormat('xml');
221 $this->ctrl->forwardCommand($exp);
222 break;
223
224 case 'ilobjecttranslationgui':
225 $this->checkPermissionBool("write");
226 $this->prepareOutput();
227 //$this->tabs_gui->setTabActive('export');
228 $this->setEditTabs("settings_trans");
229 include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
230 $transgui = new ilObjectTranslationGUI($this);
231 $this->ctrl->forwardCommand($transgui);
232 break;
233
234 case 'ilobjtaxonomygui':
235 $this->checkPermissionBool("write");
236 $this->prepareOutput();
237 $this->initTaxSubTabs();
238 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
239 $tax = new ilObjTaxonomyGUI();
240 $tax->setAssignedObject($this->object->getId());
241 $tax->setMultiple(true);
242 $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
243 $this->ctrl->forwardCommand($tax);
244 break;
245
246 case 'ilobjectmetadatagui':
247 $this->checkPermissionBool("write");
248 $this->prepareOutput();
249 $this->tabs_gui->activateTab('meta_data');
250 $this->ctrl->forwardCommand($this->getObjectMetadataGUI());
251 break;
252
253 case "ilcontainernewssettingsgui":
254 $this->prepareOutput();
255 $this->tabs_gui->setTabActive('settings');
256 $this->setEditTabs();
257 $this->tabs_gui->activateSubTab('obj_news_settings');
258 $news_set_gui = new ilContainerNewsSettingsGUI($this);
259 $news_set_gui->setHideByDate(true);
260 $this->ctrl->forwardCommand($news_set_gui);
261 break;
262
263 case 'ilcontainerfilteradmingui':
264 $this->checkPermissionBool("write");
265 $this->prepareOutput();
266 $this->setEditTabs($active_tab = "settings_filter");
267 $this->tabs_gui->activateTab('settings');
268 $this->ctrl->forwardCommand(new ilContainerFilterAdminGUI($this));
269 break;
270
271 default:
272 if ($cmd == "infoScreen") {
273 $this->checkPermission("visible");
274 } else {
275 $this->checkPermission("read");
276 }
277
278 // add entry to navigation history
279 if (!$this->getCreationMode() &&
280 $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
281 include_once("./Services/Link/classes/class.ilLink.php");
282 $ilNavigationHistory->addItem(
283 $_GET["ref_id"],
284 ilLink::_getLink($_GET["ref_id"], "cat"),
285 "cat"
286 );
287 }
288
289 $this->prepareOutput();
290 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
291 if (is_object($this->object)) {
292 $this->tpl->setVariable(
293 "LOCATION_CONTENT_STYLESHEET",
294 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
295 );
296 }
297
298 if (!$cmd) {
299 $cmd = "render";
300 }
301 $cmd .= "Object";
302 $this->tabs_gui->activateTab("view_content"); // see #19868
303 $this->$cmd();
304
305 break;
306 }
307
308 if ($header_action) {
309 $this->addHeaderAction();
310 }
311
312 return true;
313 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Filter administration for containers.
& forwardToPageObject()
forward command to page object
prepareOutput($a_show_subobjects=true)
prepare output
forwardToStyleSheet()
Forward to style object.
Class ilContainerLinkListGUI.
GUI class for didactic template settings inside repository objects.
Export User Interface Class.
getObjectMetadataGUI()
Get object metadata gui.
initTaxSubTabs($a_active="tax_list")
infoScreen()
show information screen
renderObject()
Render category.
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
Taxonomy GUI class.
Class ilObjUserFolderGUI.
Class ilObjUserGUI.
GUI class for the workflow of copying objects.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
GUI class for object translation handling.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Repository GUI Utilities.
$ret
Definition: parser.php:6

References $_GET, ilContainerGUI\$access, $ctrl, $help, $nav_history, ilContainerGUI\$rbacsystem, $ret, ilContainerGUI\$tabs, ilLink\_getLink(), addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getObjectMetadataGUI(), infoScreen(), initTaxSubTabs(), ilContainerGUI\prepareOutput(), renderObject(), and setEditTabs().

+ Here is the call graph for this function:

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

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

1486 {
1487 $res = array();
1488
1490
1491 foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1492 if (substr($keyword, 0, strlen($prefix)) == $prefix && (bool) $value) {
1493 $res[] = substr($keyword, strlen($prefix));
1494 }
1495 }
1496
1497 return $res;
1498 }
static _getContainerSettings($a_id)
foreach($_POST as $key=> $value) $res

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

Referenced by getObjectMetadataGUI().

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

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )

Get values for edit form.

Returns
array

Reimplemented from ilContainerGUI.

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

844 {
845 // values are set in initEditForm()
846 }

◆ getObjectMetadataGUI()

ilObjCategoryGUI::getObjectMetadataGUI ( )

Get object metadata gui.

Parameters

return

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

333 {
334 include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
335 $md_gui = new ilObjectMetaDataGUI($this->object);
336 include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
338 $this->object->getId(),
340 false
341 )) {
342 $md_gui->enableTaxonomyDefinition(true);
343 $tax = $md_gui->getTaxonomyObjGUI();
344 $tax->setMultiple(true);
345 $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
346 $taxonomies = $this->getTaxonomiesForRefId();
347 if (sizeof($taxonomies)) {
348 $md_gui->setTaxonomySettings(function ($form) {
349 $tax = $this->getTaxonomiesForRefId();
350 $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
351 $form->addItem($block);
352
353 $current = $this->getActiveBlocks();
354
355 foreach ($tax as $tax_id => $tax_item) {
356 $option = new ilCheckboxOption(
357 $tax_item["title"],
358 $tax_id,
360 );
361
362 if ($tax_item["source"] != $this->object->getRefId()) {
363 $loc = new ilLocatorGUI();
364 $loc->setTextOnly(true);
365 $loc->addRepositoryItems($tax_item["source"]);
366 $option->setInfo($loc->getHTML());
367 }
368
369 $block->addOption($option);
370
371 if (in_array($tax_id, $current)) {
372 $value[] = $tax_id;
373 }
374 }
375
376 $block->setValue($value);
377 }, function ($form) {
378 $taxonomies = $this->getTaxonomiesForRefId();
379 if (sizeof($taxonomies)) {
380 $sblock = $form->getInput("sblock");
381
383
385 $this->object->getId(),
386 $prefix . "%",
387 true
388 );
389
390 if (is_array($sblock)) {
391 foreach ($sblock as $tax_id) {
393 $this->object->getId(),
394 $prefix . $tax_id,
395 1
396 );
397 }
398 }
399 }
400 });
401 }
402 }
403 return $md_gui;
404 }
This class represents a property in a property form.
This class represents an option in a checkbox group.
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
static _writeContainerSetting($a_id, $a_keyword, $a_value)
locator handling class
Class ilObjectMetaDataGUI.
static _lookupDescription($a_id)
lookup object description

References ilContainer\_deleteContainerSettings(), ilContainer\_lookupContainerSetting(), ilObject\_lookupDescription(), ilContainer\_writeContainerSetting(), CONTAINER_SETTING_TAXBLOCK, getActiveBlocks(), getTaxonomiesForRefId(), 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 ( )

Get tabs.

Reimplemented from ilContainerGUI.

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

411 {
414 $ilHelp = $this->help;
415 $ilAccess = $this->access;
416
417 if ($this->ctrl->getCmd() == "editPageContent") {
418 return;
419 }
420 #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
421
422 $ilHelp->setScreenIdComponent("cat");
423
424 if ($rbacsystem->checkAccess('read', $this->ref_id)) {
425 $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "render")
426 ? true
427 : false;
428 $this->tabs_gui->addTab(
429 "view_content",
430 $lng->txt("content"),
431 $this->ctrl->getLinkTarget($this, "")
432 );
433
434 //BEGIN ChangeEvent add info tab to category object
435 if ($this->info_screen_enabled) {
436 $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
437 || strtolower($_GET["cmdClass"]) == "ilnotegui")
438 ? true
439 : false;
440 $this->tabs_gui->addTarget(
441 "info_short",
442 $this->ctrl->getLinkTargetByClass(
443 array("ilobjcategorygui", "ilinfoscreengui"),
444 "showSummary"
445 ),
446 array("showSummary","", "infoScreen"),
447 "",
448 "",
449 $force_active
450 );
451 }
452 //END ChangeEvent add info tab to category object
453 }
454
455 if ($rbacsystem->checkAccess('write', $this->ref_id)) {
456 $force_active = ($_GET["cmd"] == "edit")
457 ? true
458 : false;
459 $this->tabs_gui->addTarget(
460 "settings",
461 $this->ctrl->getLinkTarget($this, "edit"),
462 "edit",
463 get_class($this),
464 "",
465 $force_active
466 );
467
468
469
470 // metadata / taxonomies
471 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
472 $mdgui = new ilObjectMetaDataGUI($this->object);
474 $this->object->getId(),
476 false
477 )) {
478 $mdgui->enableTaxonomyDefinition(true);
479 }
480 $mdtab = $mdgui->getTab();
481 if ($mdtab) {
482 $this->tabs_gui->addTab(
483 "meta_data",
484 $this->lng->txt("meta_data"),
485 $mdtab
486 );
487 }
488 }
489
490 include_once './Services/User/classes/class.ilUserAccountSettings.php';
491 if (
492 ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() and
493 $rbacsystem->checkAccess('cat_administrate_users', $this->ref_id)) {
494 $this->tabs_gui->addTarget(
495 "administrate_users",
496 $this->ctrl->getLinkTarget($this, "listUsers"),
497 "listUsers",
498 get_class($this)
499 );
500 }
501
502 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
503 $this->tabs_gui->addTarget(
504 'export',
505 $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
506 'export',
507 'ilexportgui'
508 );
509 }
510
511 // parent tabs (all container: edit_permission, clipboard, trash
512 parent::getTabs();
513 }
static getInstance()
Singelton get instance.

References $_GET, ilContainerGUI\$access, $help, ilObjectGUI\$lng, ilContainerGUI\$rbacsystem, ilContainer\_lookupContainerSetting(), ilUserAccountSettings\getInstance(), and ilObjectServiceSettingsGUI\TAXONOMIES.

+ Here is the call graph for this function:

◆ getTaxonomiesForRefId()

ilObjCategoryGUI::getTaxonomiesForRefId ( )
protected

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

1455 {
1457
1458 include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1459 include_once "Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1460
1461 // see ilTaxMDGUI::getSelectableTaxonomies()
1462
1463 $res = array();
1464 foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1465 //if ($node["ref_id"] != $this->object->getRefId())
1466 {
1467 // find all defined taxes for parent node, activation is not relevant
1468 $node_taxes = ilObjTaxonomy::getUsageOfObject($node["obj_id"], true);
1469 if (sizeof($node_taxes)) {
1470 foreach ($node_taxes as $node_tax) {
1471 $res[$node_tax["tax_id"]] = array(
1472 "title" => $node_tax["title"]
1473 , "source" => $node["child"]
1474 );
1475 }
1476 }
1477 }
1478 }
1479
1480 asort($res);
1481 return $res;
1482 }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.

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

Referenced by getObjectMetadataGUI().

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

◆ importCancelledObject()

ilObjCategoryGUI::importCancelledObject ( )

import cancelled

@access private

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

1004 {
1005 $this->ctrl->redirect($this);
1006 }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

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

934 {
935 ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
936 }
static _importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)

References _importCategoriesForm().

+ Here is the call graph for this function:

◆ importCategoriesObject()

ilObjCategoryGUI::importCategoriesObject ( )

import categories

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

1020 {
1022 // call to importCategories with $withrol = 0
1024 }
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)

References $_GET, and _importCategories().

+ Here is the call graph for this function:

◆ importCategoriesWithRolObject()

ilObjCategoryGUI::importCategoriesWithRolObject ( )

import categories with local rol

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

1030 {
1031
1032 //echo "entra aqui";
1033 // call to importCategories with $withrol = 1
1035 }

References $_GET, and _importCategories().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

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

594 {
595 $ilAccess = $this->access;
596 $ilCtrl = $this->ctrl;
598
599 if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
600 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
601 }
602
603 if (!$this->info_screen_enabled) {
604 return;
605 }
606
607 // #10986
608 $this->tabs_gui->setTabActive('info_short');
609
610 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
611 $info = new ilInfoScreenGUI($this);
612
613 $info->enablePrivateNotes();
614
615 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
616 $info->enableNews();
617 }
618
619 // no news editing for files, just notifications
620 $info->enableNewsEditing(false);
621 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
622 $news_set = new ilSetting("news");
623 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
624
625 if ($enable_internal_rss) {
626 $info->setBlockProperty("news", "settings", true);
627 $info->setBlockProperty("news", "public_notifications_option", true);
628 }
629 }
630
631 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
632 $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'cat', $this->object->getId());
633 $record_gui->setInfoObject($info);
634 $record_gui->parse();
635
636
637 // standard meta data
638 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
639
640 // forward the command
641 if ($ilCtrl->getNextClass() == "ilinfoscreengui") {
642 $ilCtrl->forwardCommand($info);
643 } else {
644 return $ilCtrl->getHTML($info);
645 }
646 }
Class ilInfoScreenGUI.
ILIAS Setting Class.

References $_GET, ilContainerGUI\$access, $ctrl, ilContainerGUI\$error, ilObjectGUI\$ilErr, and ilAdvancedMDRecordGUI\MODE_INFO.

Referenced by executeCommand(), and infoScreenObject().

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

584 {
585 $this->ctrl->setCmd("showSummary");
586 $this->ctrl->setCmdClass("ilinfoscreengui");
587 $this->infoScreen();
588 }

References infoScreen().

+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

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

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObjectGUI.

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

545 {
546 $forms = parent::initCreationForms($a_new_type);
547 //unset($forms[self::CFORM_IMPORT]);
548 return $forms;
549 }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilContainerGUI.

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

759 {
760 $obj_service = $this->getObjectService();
761
762 $this->lng->loadLanguageModule($this->object->getType());
763 $this->setEditTabs();
764
765 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
766 $form = new ilPropertyFormGUI();
767 $form->setFormAction($this->ctrl->getFormAction($this));
768 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
769
770 // title/description
771 $this->initFormTitleDescription($form);
772
773 // Show didactic template type
774 $this->initDidacticTemplate($form);
775
776 // presentation
777 $pres = new ilFormSectionHeaderGUI();
778 $pres->setTitle($this->lng->txt('obj_presentation'));
779 $form->addItem($pres);
780
781 // title and icon visibility
782 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
783
784 // top actions visibility
785 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
786
787 // custom icon
788 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
789
790 // tile image
791 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
792
793 // list presentation
794 $form = $this->initListPresentationForm($form);
795
796 // sorting
797 $form = $this->initSortingForm(
798 $form,
799 array(
803 )
804 );
805
806 // block limit
807 $bl = new ilNumberInputGUI($this->lng->txt("cont_block_limit"), "block_limit");
808 $bl->setInfo($this->lng->txt("cont_block_limit_info"));
809 $bl->setValue(ilContainer::_lookupContainerSetting($this->object->getId(), "block_limit"));
810 $form->addItem($bl);
811
812 // icon settings
813
814 // Edit ecs export settings
815 include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
816 $ecs = new ilECSCategorySettings($this->object);
817 $ecs->addSettingsToForm($form, 'cat');
818
819 // services
820 $sh = new ilFormSectionHeaderGUI();
821 $sh->setTitle($this->lng->txt('obj_features'));
822 $form->addItem($sh);
823
824 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
826 $this->object->getId(),
827 $form,
828 array(
835 )
836 );
837
838 $form->addCommandButton("update", $this->lng->txt("save"));
839
840 return $form;
841 }
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
Class ilECSCategorySettings.
This class represents a section header in a property form.
This class represents a number property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
getObjectService()
Get object service.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
This class represents a property form user interface.

References ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\FILTER, ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, setEditTabs(), 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

build property form for extended category settings

@access protected

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

696 {
697 if (is_object($this->form)) {
698 return true;
699 }
700
701 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
702 $this->form = new ilPropertyFormGUI();
703 $this->form->setFormAction($this->ctrl->getFormAction($this));
704 $this->form->setTitle($this->lng->txt('ext_cat_settings'));
705 $this->form->addCommandButton('updateInfo', $this->lng->txt('save'));
706 $this->form->addCommandButton('editInfo', $this->lng->txt('cancel'));
707
708 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
709 $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'cat', $this->object->getId());
710 $this->record_gui->setPropertyForm($this->form);
711 $this->record_gui->parse();
712
713 return true;
714 }

References ilAdvancedMDRecordGUI\MODE_EDITOR.

Referenced by editInfoObject(), and updateInfoObject().

+ Here is the caller graph for this function:

◆ initTaxSubTabs()

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

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

1439 {
1440 $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1441 $this->tabs_gui->addSubTab(
1442 "tax_settings",
1443 $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1444 $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1445 );
1446 $this->tabs_gui->addSubTab(
1447 "tax_list",
1448 $this->lng->txt("cntr_taxonomy_definitions"),
1449 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1450 );
1451 $this->tabs_gui->activateSubTab($a_active);
1452 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

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

1117 {
1120 $ilToolbar = $this->toolbar;
1121
1122 include_once './Services/User/classes/class.ilLocalUser.php';
1123 include_once './Services/User/classes/class.ilObjUserGUI.php';
1124
1127
1128 if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
1129 $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
1130 }
1131 $this->tabs_gui->setTabActive('administrate_users');
1132
1133
1134
1135 $this->tpl->addBlockfile(
1136 'ADM_CONTENT',
1137 'adm_content',
1138 'tpl.cat_admin_users.html',
1139 "Modules/Category"
1140 );
1141
1142 if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1143 $ilToolbar->addButton(
1144 $this->lng->txt('add_user'),
1145 $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
1146 );
1147
1148 $ilToolbar->addButton(
1149 $this->lng->txt('import_users'),
1150 $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
1151 );
1152 } else {
1153 ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1154 }
1155
1156 if ($show_delete) {
1157 $this->tpl->setCurrentBlock("confirm_delete");
1158 $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
1159 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
1160 $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
1161 $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
1162 $this->tpl->parseCurrentBlock();
1163 }
1164
1165 $this->lng->loadLanguageModule('user');
1166
1167 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1168 $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
1169 $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
1170
1171 return true;
1172 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References ilContainerGUI\$error, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$rbacreview, ilContainerGUI\$rbacsystem, ilContainerGUI\$toolbar, ilContainerGUI\$user, ilUserTableGUI\MODE_LOCAL_USER, ilUtil\sendInfo(), 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 1194 of file class.ilObjCategoryGUI.php.

1195 {
1196 include_once './Services/User/classes/class.ilLocalUser.php';
1197 $this->checkPermission("cat_administrate_users");
1198
1199 foreach ($_POST['user_ids'] as $user_id) {
1200 if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()))) {
1201 die('user id not valid');
1202 }
1203 if (!$tmp_obj = &ilObjectFactory::getInstanceByObjId($user_id, false)) {
1204 continue;
1205 }
1206 $tmp_obj->delete();
1207 }
1208 ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1209 $this->listUsersObject();
1210
1211 return true;
1212 }

References $_POST, ilLocalUser\_getAllUserIds(), ilObjectGUI\checkPermission(), ilObjectFactory\getInstanceByObjId(), and listUsersObject().

+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

Reimplemented from ilContainerGUI.

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

519 {
520 $ilTabs = $this->tabs;
521
522 $ilTabs->activateTab("view_content");
523 $ret = parent::renderObject();
524
526 $this->object->getType(),
527 $this->object->getRefId(),
528 $this->object->getId(),
529 $this->user->getId()
530 );
531
532 return $ret;
533 }
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.

References $ret, ilContainerGUI\$tabs, and ilChangeEvent\_recordReadEvent().

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

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

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

1090 {
1091 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1092 $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1093 $utab->resetOffset();
1094 $utab->resetFilter();
1095
1096 // from "old" implementation
1097 $this->listUsersObject();
1098 }

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

717 {
719 $ilTabs = $this->tabs;
720
721 $this->tabs_gui->addSubTab(
722 "settings_misc",
723 $this->lng->txt("settings"),
724 $this->ctrl->getLinkTarget($this, "edit")
725 );
726
727 $this->tabs_gui->addSubTab(
728 "settings_trans",
729 $this->lng->txt("obj_multilinguality"),
730 $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
731 );
732
733 //news tab
735 $this->object->getId(),
737 true
738 );
739
740 if ($news_active) {
741 $this->tabs_gui->addSubTab(
742 'obj_news_settings',
743 $this->lng->txt("cont_news_settings"),
744 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
745 );
746 }
747
748 $this->tabs_gui->addSubTab(
749 "settings_filter",
750 $this->lng->txt("cont_filter"),
751 $this->ctrl->getLinkTargetByClass("ilcontainerfilteradmingui", "")
752 );
753
754 $this->tabs_gui->activateTab("settings");
755 $this->tabs_gui->activateSubTab($active_tab);
756 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, ilContainerGUI\$settings, ilContainerGUI\$tabs, ilContainer\_lookupContainerSetting(), and ilObjectServiceSettingsGUI\NEWS_VISIBILITY.

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

Update info (extended meta data)

@access protected

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

670 {
671 $this->checkPermission("write");
672
673 // init form
674 $this->initExtendedSettings();
675
676 // still needed for date conversion and so on
677 $this->form->checkInput();
678
679 if ($this->record_gui->importEditFormPostValues()) {
680 $this->record_gui->writeEditForm();
681
682 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
683 $this->ctrl->redirect($this, "editInfo");
684 }
685
686 $this->editInfoObject();
687 }
editInfoObject()
Edit extended category settings.

References ilObjectGUI\checkPermission(), editInfoObject(), and initExtendedSettings().

+ Here is the call graph for this function:

◆ updateObject()

ilObjCategoryGUI::updateObject ( )

updates object entry in object_data

@access public

Reimplemented from ilObjectGUI.

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

854 {
857 $obj_service = $this->getObjectService();
858
859 if (!$this->checkPermissionBool("write")) {
860 $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
861 } else {
862 $form = $this->initEditForm();
863 if ($form->checkInput()) {
864 $title = $form->getInput("title");
865 $desc = $form->getInput("desc");
866
867 $this->object->setTitle($title);
868 $this->object->setDescription($desc);
869 $this->object->update();
870
871 $this->saveSortingSettings($form);
872
873 // title icon visibility
874 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
875
876 // top actions visibility
877 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
878
879 // custom icon
880 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
881
882 // tile image
883 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
884
885 // list presentation
886 $this->saveListPresentation($form);
887
888 // BEGIN ChangeEvent: Record update
889 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
890 ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
891 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
892 // END ChangeEvent: Record update
893
894 // services
895 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
897 $this->object->getId(),
898 $form,
899 array(
906 )
907 );
908
909 // block limit
910 if ((int) $form->getInput("block_limit") > 0) {
911 ilContainer::_writeContainerSetting($this->object->getId(), "block_limit", (int) $form->getInput("block_limit"));
912 } else {
913 ilContainer::_deleteContainerSettings($this->object->getId(), "block_limit");
914 }
915 // Update ecs export settings
916 include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
917 $ecs = new ilECSCategorySettings($this->object);
918 if ($ecs->handleSettingsUpdate()) {
919 return $this->afterUpdate();
920 }
921 }
922
923 // display form to correct errors
924 $this->setEditTabs();
925 $form->setValuesByPost();
926 $this->tpl->setContent($form->getHTML());
927 }
928 }
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
afterUpdate()
Post (successful) object update hook.
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
initEditForm()
Init object edit form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.

References ilContainerGUI\$error, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$user, ilChangeEvent\_catchupWriteEvents(), ilContainer\_deleteContainerSettings(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilContainerGUI\afterUpdate(), ilObjectGUI\checkPermissionBool(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\FILTER, ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initEditForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), setEditTabs(), 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"

Exceptions

ilObjectException

Reimplemented from ilObjectGUI.

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

536 {
537 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
538 parent::viewObject();
539 return true;
540 }
541 return $this->renderObject();
542 }

References $_GET, and renderObject().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjCategoryGUI::$ctrl

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

Referenced by executeCommand(), and infoScreen().

◆ $help

ilObjCategoryGUI::$help
protected

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

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

◆ $nav_history

ilObjCategoryGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ CONTAINER_SETTING_TAXBLOCK

const ilObjCategoryGUI::CONTAINER_SETTING_TAXBLOCK = "tax_sblock_"

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