ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 
- 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 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 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...
 
 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)
 
- 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
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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

42 {
43 global $DIC;
44
45 $this->rbacsystem = $DIC->rbac()->system();
46 $this->nav_history = $DIC["ilNavigationHistory"];
47 $this->access = $DIC->access();
48 $this->ctrl = $DIC->ctrl();
49 $this->tabs = $DIC->tabs();
50 $this->help = $DIC["ilHelp"];
51 $this->lng = $DIC->language();
52 $this->user = $DIC->user();
53 $this->tree = $DIC->repositoryTree();
54 $this->error = $DIC["ilErr"];
55 $this->settings = $DIC->settings();
56 $this->tpl = $DIC["tpl"];
57 $this->toolbar = $DIC->toolbar();
58 $this->rbacreview = $DIC->rbac()->review();
59 $this->rbacadmin = $DIC->rbac()->admin();
60 //global $ilCtrl;
61
62 // CONTROL OPTIONS
63 //$this->ctrl =& $ilCtrl;
64 //$this->ctrl->saveParameter($this,array("ref_id","cmdClass"));
65 $GLOBALS['lng']->loadLanguageModule('cat');
66 $GLOBALS['lng']->loadLanguageModule('obj');
67
68 $this->type = "cat";
69 parent::__construct($a_data, (int) $a_id, $a_call_by_reference, false);
70
71 if (is_object($this->object)) {
72 include_once("./Services/Container/classes/class.ilContainer.php");
73 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
74 $this->info_screen_enabled = ilContainer::_lookupContainerSetting(
75 $this->object->getId(),
77 true
78 );
79 }
80 }
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.
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2
$DIC
Definition: xapitoken.php:46

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

1356 {
1359
1360 $this->checkPermission("cat_administrate_users");
1361
1362 // return true if it's not a local user
1363 $tmp_obj = &ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1364 if ($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
1365 !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1366 return true;
1367 }
1368
1369 // new assignment by form
1370 $new_assigned = $new_assigned ? $new_assigned : array();
1371 $assigned = $rbacreview->assignedRoles((int) $_GET['obj_id']);
1372
1373 // all assignable globals
1374 if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1375 $ga = $rbacreview->getGlobalAssignableRoles();
1376 } else {
1377 $ga = $rbacreview->getGlobalRolesArray();
1378 }
1379 $global_assignable = array();
1380 foreach ($ga as $role) {
1381 $global_assignable[] = $role['obj_id'];
1382 }
1383
1384 $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1385 $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1386 $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1387
1388 if (!count($new_visible_assigned_roles) and !count($main_assigned_roles)) {
1389 return false;
1390 }
1391 return true;
1392 }
$_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.
$ilUser
Definition: imgupload.php:18

References $_GET, $ilUser, ilContainerGUI\$rbacreview, ilContainerGUI\$user, ilObjectGUI\checkPermission(), and ilObjectFactory\getInstanceByObjId().

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

1335 {
1338
1339 // check local user
1340 $tmp_obj = &ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1341 // Admin => all roles
1342 if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1343 $global_roles = $rbacreview->getGlobalRolesArray();
1344 } elseif ($tmp_obj->getTimeLimitOwner() == $this->object->getRefId()) {
1345 $global_roles = $rbacreview->getGlobalAssignableRoles();
1346 } else {
1347 $global_roles = array();
1348 }
1349 return $roles = array_merge(
1350 $global_roles,
1351 $rbacreview->getAssignableChildRoles($this->object->getRefId())
1352 );
1353 }

References $ilUser, ilContainerGUI\$rbacreview, ilContainerGUI\$user, and ilObjectFactory\getInstanceByObjId().

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

995 {
996 return ilUtil::getDataDir() . "/cat_import";
997 }
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 1394 of file class.ilObjCategoryGUI.php.

1395 {
1396 global $DIC;
1397
1398 $ilAccess = $DIC->access();
1399 $ilErr = $DIC["ilErr"];
1400 $lng = $DIC->language();
1401
1402 if ($ilAccess->checkAccess("read", "", $a_target)) {
1404 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1405 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1406 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1407 ilUtil::sendFailure(sprintf(
1408 $lng->txt("msg_no_perm_read_item"),
1410 ), true);
1412 }
1413
1414 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1415 }
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.

References $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), 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 1024 of file class.ilObjCategoryGUI.php.

1025 {
1026 global $DIC;
1027
1028 $lng = $DIC->language();
1029 $ilCtrl = $DIC->ctrl();
1030
1031 require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
1032
1033 $import_dir = ilObjCategoryGUI::_getImportDir();
1034
1035 // create user import directory if necessary
1036 if (!@is_dir($import_dir)) {
1037 ilUtil::createDirectory($import_dir);
1038 }
1039
1040 // move uploaded file to user import directory
1041
1042 $file_name = $_FILES["importFile"]["name"];
1043
1044 // added to prevent empty file names
1045 if (!strcmp($file_name, "")) {
1046 ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
1047 $ilCtrl->redirectByClass('ilObjCategoryGUI');
1048 }
1049
1050 $parts = pathinfo($file_name);
1051 $full_path = $import_dir . "/" . $file_name;
1052 ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1053
1054 // unzip file
1055 ilUtil::unzip($full_path);
1056
1057 $subdir = basename($parts["basename"], "." . $parts["extension"]);
1058 $xml_file = $import_dir . "/" . $subdir . "/" . $subdir . ".xml";
1059 // CategoryImportParser
1060 //var_dump($_POST);
1061 $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1062 $importParser->startParsing();
1063
1064 ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1065 $ilCtrl->redirectByClass('ilObjCategoryGUI');
1066 }
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($a_file, $overwrite=false, $a_flat=false)
unzip file
static createDirectory($a_dir, $a_mod=0755)
create directory
global $ilCtrl
Definition: ilias.php:18

References $DIC, $ilCtrl, 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 924 of file class.ilObjCategoryGUI.php.

925 {
926 global $DIC;
927
928 $lng = $DIC->language();
929 $rbacreview = $DIC->rbac()->review();
930 $ilCtrl = $DIC->ctrl();
931
932 $a_tpl->addBlockfile(
933 "ADM_CONTENT",
934 "adm_content",
935 "tpl.cat_import_form.html",
936 "Modules/Category"
937 );
938
939 $a_tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilObjCategoryGUI'));
940
941 $a_tpl->setVariable("TXT_IMPORT_CATEGORIES", $lng->txt("import_categories"));
942 $a_tpl->setVariable("TXT_HIERARCHY_OPTION", $lng->txt("import_cat_localrol"));
943 $a_tpl->setVariable("TXT_IMPORT_FILE", $lng->txt("import_file"));
944 $a_tpl->setVariable("TXT_IMPORT_TABLE", $lng->txt("import_cat_table"));
945
946 $a_tpl->setVariable("BTN_IMPORT", $lng->txt("import"));
947 $a_tpl->setVariable("BTN_CANCEL", $lng->txt("cancel"));
948
949 // NEED TO FILL ADOPT_PERMISSIONS HTML FORM....
950 $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id, true);
951
952 // sort output for correct color changing
953 ksort($parent_role_ids);
954
955 foreach ($parent_role_ids as $key => $par) {
956 if ($par["obj_id"] != SYSTEM_ROLE_ID) {
957 $check = ilUtil::formCheckbox(0, "adopt[]", $par["obj_id"], 1);
958 $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
959 $output["adopt"][$key]["check_adopt"] = $check;
960 $output["adopt"][$key]["role_id"] = $par["obj_id"];
961 $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
962 $output["adopt"][$key]["role_name"] = $par["title"];
963 }
964 }
965
966 //var_dump($output);
967
968 // BEGIN ADOPT PERMISSIONS
969 foreach ($output["adopt"] as $key => $value) {
970 $a_tpl->setCurrentBlock("ADOPT_PERM_ROW");
971 $a_tpl->setVariable("CSS_ROW_ADOPT", $value["css_row_adopt"]);
972 $a_tpl->setVariable("CHECK_ADOPT", $value["check_adopt"]);
973 $a_tpl->setVariable("LABEL_ID", $value["role_id"]);
974 $a_tpl->setVariable("TYPE", $value["type"]);
975 $a_tpl->setVariable("ROLE_NAME", $value["role_name"]);
976 $a_tpl->parseCurrentBlock();
977 }
978 }
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, $ilCtrl, ilObjectGUI\$lng, ilContainerGUI\$rbacreview, ilUtil\formCheckbox(), and ilUtil\switchColor().

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

311 {
313 parent::addHeaderAction();
314 }
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 1160 of file class.ilObjCategoryGUI.php.

1161 {
1162 include_once './Services/User/classes/class.ilUserAutoComplete.php';
1163 $auto = new ilUserAutoComplete();
1164 $auto->setSearchFields(array('login','firstname','lastname','email'));
1165 $auto->enableFieldSearchableCheck(true);
1166 $auto->isMoreLinkAvailable(true);
1167
1168 if (($_REQUEST['fetchall'])) {
1169 $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1170 }
1171
1172 echo $auto->getList($_REQUEST['term']);
1173 exit();
1174 }
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 534 of file class.ilObjCategoryGUI.php.

535 {
537
538 // default: sort by title
539 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
540 $settings = new ilContainerSortingSettings($a_new_object->getId());
542 $settings->save();
543
544 // inherit parents content style, if not individual
545 $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
546 $parent_id = ilObject::_lookupObjId($parent_ref_id);
547 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
548 $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
549 if ($style_id > 0) {
550 if (ilObjStyleSheet::_lookupStandard($style_id)) {
551 ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
552 }
553 }
554
555 // always send a message
556 ilUtil::sendSuccess($this->lng->txt("cat_added"), true);
557 $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
558 $this->redirectToRefId($a_new_object->getRefId(), "");
559 }
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 1087 of file class.ilObjCategoryGUI.php.

1088 {
1089 $ilTabs = $this->tabs;
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->writeFilterToSession();
1095 $this->listUsersObject();
1096 }
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 1226 of file class.ilObjCategoryGUI.php.

1227 {
1229 $ilTabs = $this->tabs;
1230
1231 $this->checkPermission("cat_administrate_users");
1232
1233 include_once './Services/User/classes/class.ilLocalUser.php';
1234
1235 if (!isset($_GET['obj_id'])) {
1236 ilUtil::sendFailure('no_user_selected');
1237 $this->listUsersObject();
1238
1239 return true;
1240 }
1241
1242 $ilTabs->clearTargets();
1243 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1244 $ilHelp = $this->help;
1245 $ilHelp->setScreenIdComponent("cat");
1246 $ilHelp->setScreenId("administrate_user");
1247 $ilHelp->setSubScreenId("assign_roles");
1248
1249
1250 $roles = $this->__getAssignableRoles();
1251
1252 if (!count($roles)) {
1253 #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1254 #$this->listUsersObject();
1255
1256 #return true;
1257 }
1258
1259 $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1260
1261 $counter = 0;
1262 $f_result = array();
1263
1264 foreach ($roles as $role) {
1265 $role_obj = &ilObjectFactory::getInstanceByObjId($role['obj_id']);
1266
1267 $disabled = false;
1268 $f_result[$counter]['checkbox'] = ilUtil::formCheckbox(
1269 in_array($role['obj_id'], $ass_roles) ? 1 : 0,
1270 'role_ids[]',
1271 $role['obj_id'],
1272 $disabled
1273 );
1274 $f_result[$counter]['title'] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1275 $f_result[$counter]['desc'] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1276 $f_result[$counter]['type'] = $role['role_type'] == 'global' ?
1277 $this->lng->txt('global') :
1278 $this->lng->txt('local');
1279
1280 unset($role_obj);
1281 ++$counter;
1282 }
1283
1284 include_once('./Modules/Category/classes/class.ilCategoryAssignRoleTableGUI.php');
1285 $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1286 $tmp_obj = &ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1287 $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1288 $table->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
1289 $table->setData($f_result);
1290 $this->tpl->setContent($table->getHTML());
1291 }
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 1293 of file class.ilObjCategoryGUI.php.

1294 {
1297 $this->checkPermission("cat_administrate_users");
1298
1299 include_once './Services/User/classes/class.ilLocalUser.php';
1300 // check hack
1301 if (!isset($_GET['obj_id']) or !in_array($_REQUEST['obj_id'], ilLocalUser::_getAllUserIds())) {
1302 ilUtil::sendFailure('no_user_selected');
1303 $this->listUsersObject();
1304
1305 return true;
1306 }
1307 $roles = $this->__getAssignableRoles();
1308
1309 // check minimum one global role
1310 if (!$this->__checkGlobalRoles($_POST['role_ids'])) {
1311 ilUtil::sendFailure($this->lng->txt('no_global_role_left'));
1312 $this->assignRolesObject();
1313
1314 return false;
1315 }
1316
1317 $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
1318 $assigned_roles = $rbacreview->assignedRoles((int) $_REQUEST['obj_id']);
1319 foreach ($roles as $role) {
1320 if (in_array($role['obj_id'], $new_role_ids) and !in_array($role['obj_id'], $assigned_roles)) {
1321 $rbacadmin->assignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1322 }
1323 if (in_array($role['obj_id'], $assigned_roles) and !in_array($role['obj_id'], $new_role_ids)) {
1324 $rbacadmin->deassignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1325 }
1326 }
1327 ilUtil::sendSuccess($this->lng->txt('role_assignment_updated'));
1328 $this->assignRolesObject();
1329
1330 return true;
1331 }
$_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 1197 of file class.ilObjCategoryGUI.php.

1198 {
1199 $this->checkPermission("cat_administrate_users");
1200 if (!count($_POST['id'])) {
1201 ilUtil::sendFailure($this->lng->txt('no_users_selected'));
1202 $this->listUsersObject();
1203
1204 return true;
1205 }
1206
1207 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
1208 $confirm = new ilConfirmationGUI();
1209 $confirm->setFormAction($this->ctrl->getFormAction($this));
1210 $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1211 $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1212 $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1213
1214 foreach ($_POST['id'] as $user) {
1216
1217 $confirm->addItem(
1218 'user_ids[]',
1219 $user,
1220 $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1221 );
1222 }
1223 $this->tpl->setContent($confirm->getHTML());
1224 }
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 636 of file class.ilObjCategoryGUI.php.

637 {
638 $this->checkPermission("write");
639 $this->setEditTabs();
640 $this->tabs_gui->activateTab('settings');
641 $this->tabs_gui->setSubTabActive('edit_cat_settings');
642
643 $this->initExtendedSettings();
644 $this->tpl->setContent($this->form->getHTML());
645 }
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 82 of file class.ilObjCategoryGUI.php.

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

References $_GET, ilContainerGUI\$access, $ctrl, $help, $ilCtrl, $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 1468 of file class.ilObjCategoryGUI.php.

1469 {
1470 $res = array();
1471
1473
1474 foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1475 if (substr($keyword, 0, strlen($prefix)) == $prefix && (bool) $value) {
1476 $res[] = substr($keyword, strlen($prefix));
1477 }
1478 }
1479
1480 return $res;
1481 }
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 826 of file class.ilObjCategoryGUI.php.

827 {
828 // values are set in initEditForm()
829 }

◆ getObjectMetadataGUI()

ilObjCategoryGUI::getObjectMetadataGUI ( )

Get object metadata gui.

Parameters

return

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

324 {
325 include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
326 $md_gui = new ilObjectMetaDataGUI($this->object);
327 include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
329 $this->object->getId(),
331 false
332 )) {
333 $md_gui->enableTaxonomyDefinition(true);
334 $tax = $md_gui->getTaxonomyObjGUI();
335 $tax->setMultiple(true);
336 $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
337 $taxonomies = $this->getTaxonomiesForRefId();
338 if (sizeof($taxonomies)) {
339 $md_gui->setTaxonomySettings(function ($form) {
340 $tax = $this->getTaxonomiesForRefId();
341 $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
342 $form->addItem($block);
343
344 $current = $this->getActiveBlocks();
345
346 foreach ($tax as $tax_id => $tax_item) {
347 $option = new ilCheckboxOption(
348 $tax_item["title"],
349 $tax_id,
351 );
352
353 if ($tax_item["source"] != $this->object->getRefId()) {
354 $loc = new ilLocatorGUI();
355 $loc->setTextOnly(true);
356 $loc->addRepositoryItems($tax_item["source"]);
357 $option->setInfo($loc->getHTML());
358 }
359
360 $block->addOption($option);
361
362 if (in_array($tax_id, $current)) {
363 $value[] = $tax_id;
364 }
365 }
366
367 $block->setValue($value);
368 }, function ($form) {
369 $taxonomies = $this->getTaxonomiesForRefId();
370 if (sizeof($taxonomies)) {
371 $sblock = $form->getInput("sblock");
372
374
376 $this->object->getId(),
377 $prefix . "%",
378 true
379 );
380
381 if (is_array($sblock)) {
382 foreach ($sblock as $tax_id) {
384 $this->object->getId(),
385 $prefix . $tax_id,
386 1
387 );
388 }
389 }
390 }
391 });
392 }
393 }
394 return $md_gui;
395 }
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 401 of file class.ilObjCategoryGUI.php.

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

1438 {
1440
1441 include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1442 include_once "Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1443
1444 // see ilTaxMDGUI::getSelectableTaxonomies()
1445
1446 $res = array();
1447 foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1448 //if ($node["ref_id"] != $this->object->getRefId())
1449 {
1450 // find all defined taxes for parent node, activation is not relevant
1451 $node_taxes = ilObjTaxonomy::getUsageOfObject($node["obj_id"], true);
1452 if (sizeof($node_taxes)) {
1453 foreach ($node_taxes as $node_tax) {
1454 $res[$node_tax["tax_id"]] = array(
1455 "title" => $node_tax["title"]
1456 , "source" => $node["child"]
1457 );
1458 }
1459 }
1460 }
1461 }
1462
1463 asort($res);
1464 return $res;
1465 }
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 986 of file class.ilObjCategoryGUI.php.

987 {
988 $this->ctrl->redirect($this);
989 }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

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

917 {
918 ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
919 }
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 1002 of file class.ilObjCategoryGUI.php.

1003 {
1005 // call to importCategories with $withrol = 0
1007 }
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 1012 of file class.ilObjCategoryGUI.php.

1013 {
1014
1015 //echo "entra aqui";
1016 // call to importCategories with $withrol = 1
1018 }

References $_GET, and _importCategories().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

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

577 {
578 $ilAccess = $this->access;
581
582 if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
583 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
584 }
585
586 if (!$this->info_screen_enabled) {
587 return;
588 }
589
590 // #10986
591 $this->tabs_gui->setTabActive('info_short');
592
593 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
594 $info = new ilInfoScreenGUI($this);
595
596 $info->enablePrivateNotes();
597
598 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
599 $info->enableNews();
600 }
601
602 // no news editing for files, just notifications
603 $info->enableNewsEditing(false);
604 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
605 $news_set = new ilSetting("news");
606 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
607
608 if ($enable_internal_rss) {
609 $info->setBlockProperty("news", "settings", true);
610 $info->setBlockProperty("news", "public_notifications_option", true);
611 }
612 }
613
614 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
615 $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'cat', $this->object->getId());
616 $record_gui->setInfoObject($info);
617 $record_gui->parse();
618
619
620 // standard meta data
621 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
622
623 // forward the command
624 if ($ilCtrl->getNextClass() == "ilinfoscreengui") {
625 $ilCtrl->forwardCommand($info);
626 } else {
627 return $ilCtrl->getHTML($info);
628 }
629 }
Class ilInfoScreenGUI.
ILIAS Setting Class.

References $_GET, ilContainerGUI\$access, $ctrl, ilContainerGUI\$error, $ilCtrl, 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 566 of file class.ilObjCategoryGUI.php.

567 {
568 $this->ctrl->setCmd("showSummary");
569 $this->ctrl->setCmdClass("ilinfoscreengui");
570 $this->infoScreen();
571 }

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

528 {
529 $forms = parent::initCreationForms($a_new_type);
530 //unset($forms[self::CFORM_IMPORT]);
531 return $forms;
532 }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilContainerGUI.

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

742 {
743 $obj_service = $this->getObjectService();
744
745 $this->lng->loadLanguageModule($this->object->getType());
746 $this->setEditTabs();
747
748 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
749 $form = new ilPropertyFormGUI();
750 $form->setFormAction($this->ctrl->getFormAction($this));
751 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
752
753 // title/description
754 $this->initFormTitleDescription($form);
755
756 // Show didactic template type
757 $this->initDidacticTemplate($form);
758
759 // presentation
760 $pres = new ilFormSectionHeaderGUI();
761 $pres->setTitle($this->lng->txt('obj_presentation'));
762 $form->addItem($pres);
763
764 // title and icon visibility
765 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
766
767 // top actions visibility
768 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
769
770 // custom icon
771 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
772
773 // tile image
774 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
775
776 // list presentation
777 $form = $this->initListPresentationForm($form);
778
779 // sorting
780 $form = $this->initSortingForm(
781 $form,
782 array(
786 )
787 );
788
789 // block limit
790 $bl = new ilNumberInputGUI($this->lng->txt("cont_block_limit"), "block_limit");
791 $bl->setInfo($this->lng->txt("cont_block_limit_info"));
792 $bl->setValue(ilContainer::_lookupContainerSetting($this->object->getId(), "block_limit"));
793 $form->addItem($bl);
794
795 // icon settings
796
797 // Edit ecs export settings
798 include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
799 $ecs = new ilECSCategorySettings($this->object);
800 $ecs->addSettingsToForm($form, 'cat');
801
802 // services
803 $sh = new ilFormSectionHeaderGUI();
804 $sh->setTitle($this->lng->txt('obj_features'));
805 $form->addItem($sh);
806
807 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
809 $this->object->getId(),
810 $form,
811 array(
818 )
819 );
820
821 $form->addCommandButton("update", $this->lng->txt("save"));
822
823 return $form;
824 }
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 678 of file class.ilObjCategoryGUI.php.

679 {
680 if (is_object($this->form)) {
681 return true;
682 }
683
684 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
685 $this->form = new ilPropertyFormGUI();
686 $this->form->setFormAction($this->ctrl->getFormAction($this));
687 $this->form->setTitle($this->lng->txt('ext_cat_settings'));
688 $this->form->addCommandButton('updateInfo', $this->lng->txt('save'));
689 $this->form->addCommandButton('editInfo', $this->lng->txt('cancel'));
690
691 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
692 $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'cat', $this->object->getId());
693 $this->record_gui->setPropertyForm($this->form);
694 $this->record_gui->parse();
695
696 return true;
697 }

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

1422 {
1423 $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1424 $this->tabs_gui->addSubTab(
1425 "tax_settings",
1426 $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1427 $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1428 );
1429 $this->tabs_gui->addSubTab(
1430 "tax_list",
1431 $this->lng->txt("cntr_taxonomy_definitions"),
1432 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1433 );
1434 $this->tabs_gui->activateSubTab($a_active);
1435 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

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

1100 {
1103 $ilToolbar = $this->toolbar;
1104
1105 include_once './Services/User/classes/class.ilLocalUser.php';
1106 include_once './Services/User/classes/class.ilObjUserGUI.php';
1107
1110
1111 if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
1112 $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
1113 }
1114 $this->tabs_gui->setTabActive('administrate_users');
1115
1116
1117
1118 $this->tpl->addBlockfile(
1119 'ADM_CONTENT',
1120 'adm_content',
1121 'tpl.cat_admin_users.html',
1122 "Modules/Category"
1123 );
1124
1125 if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1126 $ilToolbar->addButton(
1127 $this->lng->txt('add_user'),
1128 $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
1129 );
1130
1131 $ilToolbar->addButton(
1132 $this->lng->txt('import_users'),
1133 $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
1134 );
1135 } else {
1136 ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1137 }
1138
1139 if ($show_delete) {
1140 $this->tpl->setCurrentBlock("confirm_delete");
1141 $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
1142 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
1143 $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
1144 $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
1145 $this->tpl->parseCurrentBlock();
1146 }
1147
1148 $this->lng->loadLanguageModule('user');
1149
1150 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1151 $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
1152 $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
1153
1154 return true;
1155 }
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, and ilUtil\sendInfo().

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

1178 {
1179 include_once './Services/User/classes/class.ilLocalUser.php';
1180 $this->checkPermission("cat_administrate_users");
1181
1182 foreach ($_POST['user_ids'] as $user_id) {
1183 if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()))) {
1184 die('user id not valid');
1185 }
1186 if (!$tmp_obj = &ilObjectFactory::getInstanceByObjId($user_id, false)) {
1187 continue;
1188 }
1189 $tmp_obj->delete();
1190 }
1191 ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1192 $this->listUsersObject();
1193
1194 return true;
1195 }

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

510 {
511 $ilTabs = $this->tabs;
512
513 $ilTabs->activateTab("view_content");
514 $ret = parent::renderObject();
515 return $ret;
516 }

References $ret, and ilContainerGUI\$tabs.

Referenced by executeCommand(), and viewObject().

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

1073 {
1074 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1075 $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1076 $utab->resetOffset();
1077 $utab->resetFilter();
1078
1079 // from "old" implementation
1080 $this->listUsersObject();
1081 }

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

700 {
702 $ilTabs = $this->tabs;
703
704 $this->tabs_gui->addSubTab(
705 "settings_misc",
706 $this->lng->txt("settings"),
707 $this->ctrl->getLinkTarget($this, "edit")
708 );
709
710 $this->tabs_gui->addSubTab(
711 "settings_trans",
712 $this->lng->txt("obj_multilinguality"),
713 $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
714 );
715
716 //news tab
718 $this->object->getId(),
720 true
721 );
722
723 if ($news_active) {
724 $this->tabs_gui->addSubTab(
725 'obj_news_settings',
726 $this->lng->txt("cont_news_settings"),
727 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
728 );
729 }
730
731 $this->tabs_gui->addSubTab(
732 "settings_filter",
733 $this->lng->txt("cont_filter"),
734 $this->ctrl->getLinkTargetByClass("ilcontainerfilteradmingui", "")
735 );
736
737 $this->tabs_gui->activateTab("settings");
738 $this->tabs_gui->activateSubTab($active_tab);
739 }
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 652 of file class.ilObjCategoryGUI.php.

653 {
654 $this->checkPermission("write");
655
656 // init form
657 $this->initExtendedSettings();
658
659 // still needed for date conversion and so on
660 $this->form->checkInput();
661
662 if ($this->record_gui->importEditFormPostValues()) {
663 $this->record_gui->writeEditForm();
664
665 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
666 $this->ctrl->redirect($this, "editInfo");
667 }
668
669 $this->editInfoObject();
670 }
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 836 of file class.ilObjCategoryGUI.php.

837 {
840 $obj_service = $this->getObjectService();
841
842 if (!$this->checkPermissionBool("write")) {
843 $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
844 } else {
845 $form = $this->initEditForm();
846 if ($form->checkInput()) {
847 $title = $form->getInput("title");
848 $desc = $form->getInput("desc");
849
850 $this->object->setTitle($title);
851 $this->object->setDescription($desc);
852 $this->object->update();
853
854 $this->saveSortingSettings($form);
855
856 // title icon visibility
857 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
858
859 // top actions visibility
860 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
861
862 // custom icon
863 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
864
865 // tile image
866 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
867
868 // list presentation
869 $this->saveListPresentation($form);
870
871 // BEGIN ChangeEvent: Record update
872 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
873 ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
874 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
875 // END ChangeEvent: Record update
876
877 // services
878 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
880 $this->object->getId(),
881 $form,
882 array(
889 )
890 );
891
892 // block limit
893 if ((int) $form->getInput("block_limit") > 0) {
894 ilContainer::_writeContainerSetting($this->object->getId(), "block_limit", (int) $form->getInput("block_limit"));
895 } else {
896 ilContainer::_deleteContainerSettings($this->object->getId(), "block_limit");
897 }
898 // Update ecs export settings
899 include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
900 $ecs = new ilECSCategorySettings($this->object);
901 if ($ecs->handleSettingsUpdate()) {
902 return $this->afterUpdate();
903 }
904 }
905
906 // display form to correct errors
907 $this->setEditTabs();
908 $form->setValuesByPost();
909 $this->tpl->setContent($form->getHTML());
910 }
911 }
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 518 of file class.ilObjCategoryGUI.php.

519 {
520 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
521 parent::viewObject();
522 return true;
523 }
524 return $this->renderObject();
525 }

References $_GET, and renderObject().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjCategoryGUI::$ctrl

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

Referenced by executeCommand(), and infoScreen().

◆ $help

ilObjCategoryGUI::$help
protected

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

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

◆ $nav_history

ilObjCategoryGUI::$nav_history
protected

Definition at line 26 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: