ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 public. More...
 
 executeCommand ()
 
 getObjectMetadataGUI ()
 Get object metadata gui. More...
 
 getTabs ()
 Get tabs. More...
 
 renderObject ()
 Render category. More...
 
 viewObject ()
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 initEditForm ()
 
 getEditFormValues ()
 
 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 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 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 ()
 
 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 ()
 public More...
 
 cloneWizardPageListObject ()
 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...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. 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...
 
- 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 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 ()
 list childs of current object 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...
 

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 ()
 
 initCreationForms ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 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 ()
 
 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...
 
 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...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs 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
 
 $app_event_handler
 
 $ui
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor public.

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

References $DIC, $GLOBALS, ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, settings(), and user().

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  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

Member Function Documentation

◆ __checkGlobalRoles()

ilObjCategoryGUI::__checkGlobalRoles (   $new_assigned)

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

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

Referenced by assignSaveObject().

1341  {
1343  $ilUser = $this->user;
1344 
1345  $this->checkPermission("cat_administrate_users");
1346 
1347  // return true if it's not a local user
1348  $tmp_obj = &ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1349  if ($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
1350  !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1351  return true;
1352  }
1353 
1354  // new assignment by form
1355  $new_assigned = $new_assigned ? $new_assigned : array();
1356  $assigned = $rbacreview->assignedRoles((int) $_GET['obj_id']);
1357 
1358  // all assignable globals
1359  if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1360  $ga = $rbacreview->getGlobalAssignableRoles();
1361  } else {
1362  $ga = $rbacreview->getGlobalRolesArray();
1363  }
1364  $global_assignable = array();
1365  foreach ($ga as $role) {
1366  $global_assignable[] = $role['obj_id'];
1367  }
1368 
1369  $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1370  $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1371  $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1372 
1373  if (!count($new_visible_assigned_roles) and !count($main_assigned_roles)) {
1374  return false;
1375  }
1376  return true;
1377  }
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getAssignableRoles()

ilObjCategoryGUI::__getAssignableRoles ( )

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

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

Referenced by assignRolesObject(), and assignSaveObject().

1320  {
1322  $ilUser = $this->user;
1323 
1324  // check local user
1325  $tmp_obj = &ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1326  // Admin => all roles
1327  if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1328  $global_roles = $rbacreview->getGlobalRolesArray();
1329  } elseif ($tmp_obj->getTimeLimitOwner() == $this->object->getRefId()) {
1330  $global_roles = $rbacreview->getGlobalAssignableRoles();
1331  } else {
1332  $global_roles = array();
1333  }
1334  return $roles = array_merge(
1335  $global_roles,
1336  $rbacreview->getAssignableChildRoles($this->object->getRefId())
1337  );
1338  }
$ilUser
Definition: imgupload.php:18
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ 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 979 of file class.ilObjCategoryGUI.php.

References ilUtil\getDataDir().

Referenced by _importCategories().

980  {
981  return ilUtil::getDataDir() . "/cat_import";
982  }
static getDataDir()
get data directory (outside webspace)
+ 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 1379 of file class.ilObjCategoryGUI.php.

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

Referenced by ilObjCategoryReferenceGUI\_goto().

1380  {
1381  global $DIC;
1382 
1383  $ilAccess = $DIC->access();
1384  $ilErr = $DIC["ilErr"];
1385  $lng = $DIC->language();
1386 
1387  if ($ilAccess->checkAccess("read", "", $a_target)) {
1389  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1390  ilUtil::sendFailure(sprintf(
1391  $lng->txt("msg_no_perm_read_item"),
1393  ), true);
1395  }
1396 
1397  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1398  }
global $DIC
Definition: saml.php:7
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ 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 1009 of file class.ilObjCategoryGUI.php.

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

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

1010  {
1011  global $DIC;
1012 
1013  $lng = $DIC->language();
1014  $ilCtrl = $DIC->ctrl();
1015 
1016  require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
1017 
1018  $import_dir = ilObjCategoryGUI::_getImportDir();
1019 
1020  // create user import directory if necessary
1021  if (!@is_dir($import_dir)) {
1022  ilUtil::createDirectory($import_dir);
1023  }
1024 
1025  // move uploaded file to user import directory
1026 
1027  $file_name = $_FILES["importFile"]["name"];
1028 
1029  // added to prevent empty file names
1030  if (!strcmp($file_name, "")) {
1031  ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
1032  $ilCtrl->redirectByClass('ilObjCategoryGUI');
1033  }
1034 
1035  $parts = pathinfo($file_name);
1036  $full_path = $import_dir . "/" . $file_name;
1037  ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1038 
1039  // unzip file
1040  ilUtil::unzip($full_path);
1041 
1042  $subdir = basename($parts["basename"], "." . $parts["extension"]);
1043  $xml_file = $import_dir . "/" . $subdir . "/" . $subdir . ".xml";
1044  // CategoryImportParser
1045  //var_dump($_POST);
1046  $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1047  $importParser->startParsing();
1048 
1049  ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1050  $ilCtrl->redirectByClass('ilObjCategoryGUI');
1051  }
global $DIC
Definition: saml.php:7
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
global $ilCtrl
Definition: ilias.php:18
static createDirectory($a_dir, $a_mod=0755)
create directory
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _getImportDir()
get user import directory name
+ 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 909 of file class.ilObjCategoryGUI.php.

References $DIC, $ilCtrl, $key, ilObjectGUI\$lng, Sabre\VObject\$output, ilContainerGUI\$rbacreview, ilUtil\formCheckbox(), and ilUtil\switchColor().

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

910  {
911  global $DIC;
912 
913  $lng = $DIC->language();
914  $rbacreview = $DIC->rbac()->review();
915  $ilCtrl = $DIC->ctrl();
916 
917  $a_tpl->addBlockfile(
918  "ADM_CONTENT",
919  "adm_content",
920  "tpl.cat_import_form.html",
921  "Modules/Category"
922  );
923 
924  $a_tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilObjCategoryGUI'));
925 
926  $a_tpl->setVariable("TXT_IMPORT_CATEGORIES", $lng->txt("import_categories"));
927  $a_tpl->setVariable("TXT_HIERARCHY_OPTION", $lng->txt("import_cat_localrol"));
928  $a_tpl->setVariable("TXT_IMPORT_FILE", $lng->txt("import_file"));
929  $a_tpl->setVariable("TXT_IMPORT_TABLE", $lng->txt("import_cat_table"));
930 
931  $a_tpl->setVariable("BTN_IMPORT", $lng->txt("import"));
932  $a_tpl->setVariable("BTN_CANCEL", $lng->txt("cancel"));
933 
934  // NEED TO FILL ADOPT_PERMISSIONS HTML FORM....
935  $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id, true);
936 
937  // sort output for correct color changing
938  ksort($parent_role_ids);
939 
940  foreach ($parent_role_ids as $key => $par) {
941  if ($par["obj_id"] != SYSTEM_ROLE_ID) {
942  $check = ilUtil::formCheckbox(0, "adopt[]", $par["obj_id"], 1);
943  $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
944  $output["adopt"][$key]["check_adopt"] = $check;
945  $output["adopt"][$key]["role_id"] = $par["obj_id"];
946  $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
947  $output["adopt"][$key]["role_name"] = $par["title"];
948  }
949  }
950 
951  //var_dump($output);
952 
953  // BEGIN ADOPT PERMISSIONS
954  foreach ($output["adopt"] as $key => $value) {
955  $a_tpl->setCurrentBlock("ADOPT_PERM_ROW");
956  $a_tpl->setVariable("CSS_ROW_ADOPT", $value["css_row_adopt"]);
957  $a_tpl->setVariable("CHECK_ADOPT", $value["check_adopt"]);
958  $a_tpl->setVariable("LABEL_ID", $value["role_id"]);
959  $a_tpl->setVariable("TYPE", $value["type"]);
960  $a_tpl->setVariable("ROLE_NAME", $value["role_name"]);
961  $a_tpl->parseCurrentBlock();
962  }
963  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
$key
Definition: croninfo.php:18
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addHeaderAction()

ilObjCategoryGUI::addHeaderAction ( )
protected

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

References ilPreviewGUI\initPreview().

Referenced by executeCommand().

306  {
308  parent::addHeaderAction();
309  }
static initPreview()
Initializes the preview and loads the needed javascripts and styles.
+ 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 1145 of file class.ilObjCategoryGUI.php.

References exit, and ilUserAutoComplete\MAX_ENTRIES.

1146  {
1147  include_once './Services/User/classes/class.ilUserAutoComplete.php';
1148  $auto = new ilUserAutoComplete();
1149  $auto->setSearchFields(array('login','firstname','lastname','email'));
1150  $auto->enableFieldSearchableCheck(true);
1151  $auto->isMoreLinkAvailable(true);
1152 
1153  if (($_REQUEST['fetchall'])) {
1154  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1155  }
1156 
1157  echo $auto->getList($_REQUEST['term']);
1158  exit();
1159  }
Auto completion class for user lists.
exit
Definition: backend.php:16

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

530  {
531  $tree = $this->tree;
532 
533  // default: sort by title
534  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
535  $settings = new ilContainerSortingSettings($a_new_object->getId());
536  $settings->setSortMode(ilContainer::SORT_TITLE);
537  $settings->save();
538 
539  // inherit parents content style, if not individual
540  $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
541  $parent_id = ilObject::_lookupObjId($parent_ref_id);
542  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
543  $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
544  if ($style_id > 0) {
545  if (ilObjStyleSheet::_lookupStandard($style_id)) {
546  ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
547  }
548  }
549 
550  // always send a message
551  ilUtil::sendSuccess($this->lng->txt("cat_added"), true);
552  $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
553  $this->redirectToRefId($a_new_object->getRefId(), "");
554  }
static lookupObjectStyle($a_obj_id)
Lookup object style.
static _lookupStandard($a_id)
Lookup standard flag.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
getId()
get object id public
static _lookupObjId($a_id)
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 public
+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjCategoryGUI::applyFilterObject ( )
protected

Apply filter.

Returns

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

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

1073  {
1074  $ilTabs = $this->tabs;
1075 
1076  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1077  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1078  $utab->resetOffset();
1079  $utab->writeFilterToSession();
1080  $this->listUsersObject();
1081  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

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

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

Referenced by assignSaveObject().

1212  {
1214  $ilTabs = $this->tabs;
1215 
1216  $this->checkPermission("cat_administrate_users");
1217 
1218  include_once './Services/User/classes/class.ilLocalUser.php';
1219 
1220  if (!isset($_GET['obj_id'])) {
1221  ilUtil::sendFailure('no_user_selected');
1222  $this->listUsersObject();
1223 
1224  return true;
1225  }
1226 
1227  $ilTabs->clearTargets();
1228  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1229  $ilHelp = $this->help;
1230  $ilHelp->setScreenIdComponent("cat");
1231  $ilHelp->setScreenId("administrate_user");
1232  $ilHelp->setSubScreenId("assign_roles");
1233 
1234 
1235  $roles = $this->__getAssignableRoles();
1236 
1237  if (!count($roles)) {
1238  #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1239  #$this->listUsersObject();
1240 
1241  #return true;
1242  }
1243 
1244  $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1245 
1246  $counter = 0;
1247  $f_result = array();
1248 
1249  foreach ($roles as $role) {
1250  $role_obj = &ilObjectFactory::getInstanceByObjId($role['obj_id']);
1251 
1252  $disabled = false;
1253  $f_result[$counter]['checkbox'] = ilUtil::formCheckbox(
1254  in_array($role['obj_id'], $ass_roles) ? 1 : 0,
1255  'role_ids[]',
1256  $role['obj_id'],
1257  $disabled
1258  );
1259  $f_result[$counter]['title'] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1260  $f_result[$counter]['desc'] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1261  $f_result[$counter]['type'] = $role['role_type'] == 'global' ?
1262  $this->lng->txt('global') :
1263  $this->lng->txt('local');
1264 
1265  unset($role_obj);
1266  ++$counter;
1267  }
1268 
1269  include_once('./Modules/Category/classes/class.ilCategoryAssignRoleTableGUI.php');
1270  $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1271  $tmp_obj = &ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1272  $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1273  $table->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
1274  $table->setData($f_result);
1275  $this->tpl->setContent($table->getHTML());
1276  }
$_GET["client_id"]
listUsersObject($show_delete=false)
TableGUI class for role assignments.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
if(empty($password)) $table
Definition: pwgen.php:24
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignSaveObject()

ilObjCategoryGUI::assignSaveObject ( )

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

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

1279  {
1282  $this->checkPermission("cat_administrate_users");
1283 
1284  include_once './Services/User/classes/class.ilLocalUser.php';
1285  // check hack
1286  if (!isset($_GET['obj_id']) or !in_array($_REQUEST['obj_id'], ilLocalUser::_getAllUserIds())) {
1287  ilUtil::sendFailure('no_user_selected');
1288  $this->listUsersObject();
1289 
1290  return true;
1291  }
1292  $roles = $this->__getAssignableRoles();
1293 
1294  // check minimum one global role
1295  if (!$this->__checkGlobalRoles($_POST['role_ids'])) {
1296  ilUtil::sendFailure($this->lng->txt('no_global_role_left'));
1297  $this->assignRolesObject();
1298 
1299  return false;
1300  }
1301 
1302  $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
1303  $assigned_roles = $rbacreview->assignedRoles((int) $_REQUEST['obj_id']);
1304  foreach ($roles as $role) {
1305  if (in_array($role['obj_id'], $new_role_ids) and !in_array($role['obj_id'], $assigned_roles)) {
1306  $rbacadmin->assignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1307  }
1308  if (in_array($role['obj_id'], $assigned_roles) and !in_array($role['obj_id'], $new_role_ids)) {
1309  $rbacadmin->deassignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1310  }
1311  }
1312  ilUtil::sendSuccess($this->lng->txt('role_assignment_updated'));
1313  $this->assignRolesObject();
1314 
1315  return true;
1316  }
__checkGlobalRoles($new_assigned)
$_GET["client_id"]
listUsersObject($show_delete=false)
static _getAllUserIds($a_filter=0)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

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

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

1183  {
1184  $this->checkPermission("cat_administrate_users");
1185  if (!count($_POST['id'])) {
1186  ilUtil::sendFailure($this->lng->txt('no_users_selected'));
1187  $this->listUsersObject();
1188 
1189  return true;
1190  }
1191 
1192  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
1193  $confirm = new ilConfirmationGUI();
1194  $confirm->setFormAction($this->ctrl->getFormAction($this));
1195  $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1196  $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1197  $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1198 
1199  foreach ($_POST['id'] as $user) {
1200  $name = ilObjUser::_lookupName($user);
1201 
1202  $confirm->addItem(
1203  'user_ids[]',
1204  $user,
1205  $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1206  );
1207  }
1208  $this->tpl->setContent($confirm->getHTML());
1209  }
static _lookupName($a_user_id)
lookup user name
listUsersObject($show_delete=false)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

Edit extended category settings.

protected

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

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

Referenced by updateInfoObject().

632  {
633  $this->checkPermission("write");
634  $this->setEditTabs();
635  $this->tabs_gui->activateTab('settings');
636  $this->tabs_gui->setSubTabActive('edit_cat_settings');
637 
638  $this->initExtendedSettings();
639  $this->tpl->setContent($this->form->getHTML());
640  }
initExtendedSettings()
build property form for extended category settings
setEditTabs($active_tab="settings_misc")
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjCategoryGUI::executeCommand ( )

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

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(), setEditTabs(), and ilContainerGUI\showRepTree().

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

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

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

References $res, and ilContainer\_getContainerSettings().

Referenced by getObjectMetadataGUI().

1452  {
1453  $res = array();
1454 
1455  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1456 
1457  foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1458  if (substr($keyword, 0, strlen($prefix)) == $prefix && (bool) $value) {
1459  $res[] = substr($keyword, strlen($prefix));
1460  }
1461  }
1462 
1463  return $res;
1464  }
foreach($_POST as $key=> $value) $res
static _getContainerSettings($a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )

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

814  {
815  // values are set in initEditForm()
816  }

◆ getObjectMetadataGUI()

ilObjCategoryGUI::getObjectMetadataGUI ( )

Get object metadata gui.

Parameters

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

References $current, $form, ilContainer\_deleteContainerSettings(), ilContainer\_lookupContainerSetting(), ilObject\_lookupDescription(), ilContainer\_writeContainerSetting(), getActiveBlocks(), getTaxonomiesForRefId(), and ilObjectServiceSettingsGUI\TAXONOMIES.

Referenced by executeCommand().

319  {
320  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
321  $md_gui = new ilObjectMetaDataGUI($this->object);
322  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
324  $this->object->getId(),
326  false
327  )) {
328  $md_gui->enableTaxonomyDefinition(true);
329  $tax = $md_gui->getTaxonomyObjGUI();
330  $tax->setMultiple(true);
331  $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
332  $taxonomies = $this->getTaxonomiesForRefId();
333  if (sizeof($taxonomies)) {
334  $md_gui->setTaxonomySettings(function ($form) {
335  $tax = $this->getTaxonomiesForRefId();
336  $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
337  $form->addItem($block);
338 
339  $current = $this->getActiveBlocks();
340 
341  foreach ($tax as $tax_id => $tax_item) {
342  $option = new ilCheckboxOption(
343  $tax_item["title"],
344  $tax_id,
346  );
347 
348  if ($tax_item["source"] != $this->object->getRefId()) {
349  $loc = new ilLocatorGUI();
350  $loc->setTextOnly(true);
351  $loc->addRepositoryItems($tax_item["source"]);
352  $option->setInfo($loc->getHTML());
353  }
354 
355  $block->addOption($option);
356 
357  if (in_array($tax_id, $current)) {
358  $value[] = $tax_id;
359  }
360  }
361 
362  $block->setValue($value);
363  }, function ($form) {
364  $taxonomies = $this->getTaxonomiesForRefId();
365  if (sizeof($taxonomies)) {
366  $sblock = $form->getInput("sblock");
367 
368  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
369 
371  $this->object->getId(),
372  $prefix . "%",
373  true
374  );
375 
376  if (is_array($sblock)) {
377  foreach ($sblock as $tax_id) {
379  $this->object->getId(),
380  $prefix . $tax_id,
381  1
382  );
383  }
384  }
385  }
386  });
387  }
388  }
389  return $md_gui;
390  }
Class ilObjectMetaDataGUI.
This class represents an option in a checkbox group.
locator handling class
if(isset($_POST['submit'])) $form
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
static _lookupDescription($a_id)
lookup object description
This class represents a property in a property form.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjCategoryGUI::getTabs ( )

Get tabs.

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

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

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

◆ getTaxonomiesForRefId()

ilObjCategoryGUI::getTaxonomiesForRefId ( )
protected

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

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

Referenced by getObjectMetadataGUI().

1421  {
1422  $tree = $this->tree;
1423 
1424  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1425  include_once "Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1426 
1427  // see ilTaxMDGUI::getSelectableTaxonomies()
1428 
1429  $res = array();
1430  foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1431  //if ($node["ref_id"] != $this->object->getRefId())
1432  {
1433  // find all defined taxes for parent node, activation is not relevant
1434  $node_taxes = ilObjTaxonomy::getUsageOfObject($node["obj_id"], true);
1435  if (sizeof($node_taxes)) {
1436  foreach ($node_taxes as $node_tax) {
1437  $res[$node_tax["tax_id"]] = array(
1438  "title" => $node_tax["title"]
1439  , "source" => $node["child"]
1440  );
1441  }
1442  }
1443  }
1444  }
1445 
1446  asort($res);
1447  return $res;
1448  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
foreach($_POST as $key=> $value) $res
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importCancelledObject()

ilObjCategoryGUI::importCancelledObject ( )

import cancelled

private

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

972  {
973  $this->ctrl->redirect($this);
974  }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

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

References _importCategoriesForm().

902  {
903  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
904  }
static _importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ importCategoriesObject()

ilObjCategoryGUI::importCategoriesObject ( )

import categories

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

References $_GET, and _importCategories().

988  {
990  // call to importCategories with $withrol = 0
992  }
$_GET["client_id"]
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ importCategoriesWithRolObject()

ilObjCategoryGUI::importCategoriesWithRolObject ( )

import categories with local rol

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

References $_GET, and _importCategories().

998  {
999 
1000  //echo "entra aqui";
1001  // call to importCategories with $withrol = 1
1003  }
$_GET["client_id"]
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
+ Here is the call graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

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

References $_GET, ilContainerGUI\$access, $ctrl, ilContainerGUI\$error, $ilCtrl, ilObjectGUI\$ilErr, $info, ilAdvancedMDRecordGUI\MODE_INFO, and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

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

◆ infoScreenObject()

ilObjCategoryGUI::infoScreenObject ( )

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

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

References infoScreen().

562  {
563  $this->ctrl->setCmd("showSummary");
564  $this->ctrl->setCmdClass("ilinfoscreengui");
565  $this->infoScreen();
566  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms (   $a_new_type)
protected

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

523  {
524  $forms = parent::initCreationForms($a_new_type);
525  //unset($forms[self::CFORM_IMPORT]);
526  return $forms;
527  }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

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

References $form, ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, setEditTabs(), ilFormPropertyGUI\setInfo(), ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ilObjectServiceSettingsGUI\TAXONOMIES.

Referenced by updateObject().

731  {
732  $obj_service = $this->getObjectService();
733 
734  $this->lng->loadLanguageModule($this->object->getType());
735  $this->setEditTabs();
736 
737  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
738  $form = new ilPropertyFormGUI();
739  $form->setFormAction($this->ctrl->getFormAction($this));
740  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
741 
742  // title/description
743  $this->initFormTitleDescription($form);
744 
745  // Show didactic template type
746  $this->initDidacticTemplate($form);
747 
748  // presentation
749  $pres = new ilFormSectionHeaderGUI();
750  $pres->setTitle($this->lng->txt('obj_presentation'));
751  $form->addItem($pres);
752 
753  // title and icon visibility
754  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
755 
756  // top actions visibility
757  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
758 
759  // custom icon
760  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
761 
762  // tile image
763  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
764 
765  // list presentation
767 
768  // sorting
769  $form = $this->initSortingForm(
770  $form,
771  array(
775  )
776  );
777 
778  // block limit
779  $bl = new ilNumberInputGUI($this->lng->txt("cont_block_limit"), "block_limit");
780  $bl->setInfo($this->lng->txt("cont_block_limit_info"));
781  $bl->setValue(ilContainer::_lookupContainerSetting($this->object->getId(), "block_limit"));
782  $form->addItem($bl);
783 
784  // icon settings
785 
786  // Edit ecs export settings
787  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
788  $ecs = new ilECSCategorySettings($this->object);
789  $ecs->addSettingsToForm($form, 'cat');
790 
791  // services
792  $sh = new ilFormSectionHeaderGUI();
793  $sh->setTitle($this->lng->txt('obj_features'));
794  $form->addItem($sh);
795 
796  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
798  $this->object->getId(),
799  $form,
800  array(
805  )
806  );
807 
808  $form->addCommandButton("update", $this->lng->txt("save"));
809 
810  return $form;
811  }
This class represents a property form user interface.
This class represents a section header in a property form.
setInfo($a_info)
Set Information Text.
if(isset($_POST['submit'])) $form
This class represents a number property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
setEditTabs($active_tab="settings_misc")
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
Class ilECSCategorySettings.
getObjectService()
Get object service.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ 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

protected

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

References ilAdvancedMDRecordGUI\MODE_EDITOR, and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by editInfoObject(), and updateInfoObject().

674  {
675  if (is_object($this->form)) {
676  return true;
677  }
678 
679  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
680  $this->form = new ilPropertyFormGUI();
681  $this->form->setFormAction($this->ctrl->getFormAction($this));
682  $this->form->setTitle($this->lng->txt('ext_cat_settings'));
683  $this->form->addCommandButton('updateInfo', $this->lng->txt('save'));
684  $this->form->addCommandButton('editInfo', $this->lng->txt('cancel'));
685 
686  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
687  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'cat', $this->object->getId());
688  $this->record_gui->setPropertyForm($this->form);
689  $this->record_gui->parse();
690 
691  return true;
692  }
This class represents a property form user interface.
setPropertyForm($form)
set property form object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTaxSubTabs()

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

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

Referenced by executeCommand().

1405  {
1406  $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1407  $this->tabs_gui->addSubTab(
1408  "tax_settings",
1409  $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1410  $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1411  );
1412  $this->tabs_gui->addSubTab(
1413  "tax_list",
1414  $this->lng->txt("cntr_taxonomy_definitions"),
1415  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1416  );
1417  $this->tabs_gui->activateSubTab($a_active);
1418  }
+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

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

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

1085  {
1086  $ilUser = $this->user;
1087  $ilErr = $this->error;
1088  $ilToolbar = $this->toolbar;
1089 
1090  include_once './Services/User/classes/class.ilLocalUser.php';
1091  include_once './Services/User/classes/class.ilObjUserGUI.php';
1092 
1095 
1096  if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
1097  $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
1098  }
1099  $this->tabs_gui->setTabActive('administrate_users');
1100 
1101 
1102 
1103  $this->tpl->addBlockfile(
1104  'ADM_CONTENT',
1105  'adm_content',
1106  'tpl.cat_admin_users.html',
1107  "Modules/Category"
1108  );
1109 
1110  if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1111  $ilToolbar->addButton(
1112  $this->lng->txt('add_user'),
1113  $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
1114  );
1115 
1116  $ilToolbar->addButton(
1117  $this->lng->txt('import_users'),
1118  $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
1119  );
1120  } else {
1121  ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1122  }
1123 
1124  if ($show_delete) {
1125  $this->tpl->setCurrentBlock("confirm_delete");
1126  $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
1127  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
1128  $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
1129  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
1130  $this->tpl->parseCurrentBlock();
1131  }
1132 
1133  $this->lng->loadLanguageModule('user');
1134 
1135  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1136  $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
1137  $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
1138 
1139  return true;
1140  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
TableGUI class for user administration.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performDeleteUsersObject()

ilObjCategoryGUI::performDeleteUsersObject ( )

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

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

1163  {
1164  include_once './Services/User/classes/class.ilLocalUser.php';
1165  $this->checkPermission("cat_administrate_users");
1166 
1167  foreach ($_POST['user_ids'] as $user_id) {
1168  if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()))) {
1169  die('user id not valid');
1170  }
1171  if (!$tmp_obj = &ilObjectFactory::getInstanceByObjId($user_id, false)) {
1172  continue;
1173  }
1174  $tmp_obj->delete();
1175  }
1176  ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1177  $this->listUsersObject();
1178 
1179  return true;
1180  }
listUsersObject($show_delete=false)
static _getAllUserIds($a_filter=0)
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.
$_POST["username"]
+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

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

References $ret, and ilContainerGUI\$tabs.

Referenced by executeCommand(), and viewObject().

505  {
506  $ilTabs = $this->tabs;
507 
508  $ilTabs->activateTab("view_content");
509  $ret = parent::renderObject();
510  return $ret;
511  }
$ret
Definition: parser.php:6
+ 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 1057 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

1058  {
1059  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1060  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1061  $utab->resetOffset();
1062  $utab->resetFilter();
1063 
1064  // from "old" implementation
1065  $this->listUsersObject();
1066  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ setEditTabs()

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

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

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

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

695  {
697  $ilTabs = $this->tabs;
698 
699  $this->tabs_gui->addSubTab(
700  "settings_misc",
701  $this->lng->txt("settings"),
702  $this->ctrl->getLinkTarget($this, "edit")
703  );
704 
705  $this->tabs_gui->addSubTab(
706  "settings_trans",
707  $this->lng->txt("obj_multilinguality"),
708  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
709  );
710 
711  //news tab
713  $this->object->getId(),
715  true
716  );
717 
718  if ($news_active) {
719  $this->tabs_gui->addSubTab(
720  'obj_news_settings',
721  $this->lng->txt("cont_news_settings"),
722  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
723  );
724  }
725 
726  $this->tabs_gui->activateTab("settings");
727  $this->tabs_gui->activateSubTab($active_tab);
728  }
global $ilSetting
Definition: privfeed.php:17
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ 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)

protected

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

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

648  {
649  $this->checkPermission("write");
650 
651  // init form
652  $this->initExtendedSettings();
653 
654  // still needed for date conversion and so on
655  $this->form->checkInput();
656 
657  if ($this->record_gui->importEditFormPostValues()) {
658  $this->record_gui->writeEditForm();
659 
660  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
661  $this->ctrl->redirect($this, "editInfo");
662  }
663 
664  $this->editInfoObject();
665  }
initExtendedSettings()
build property form for extended category settings
editInfoObject()
Edit extended category settings.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ updateObject()

ilObjCategoryGUI::updateObject ( )

updates object entry in object_data

public

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

References ilContainerGUI\$error, $form, ilObjectGUI\$ilErr, $ilUser, $title, ilContainerGUI\$user, ilChangeEvent\_catchupWriteEvents(), ilContainer\_deleteContainerSettings(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilContainerGUI\afterUpdate(), ilObjectGUI\checkPermissionBool(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initEditForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), setEditTabs(), ilObjectServiceSettingsGUI\TAXONOMIES, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

824  {
827  $obj_service = $this->getObjectService();
828 
829  if (!$this->checkPermissionBool("write")) {
830  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
831  } else {
832  $form = $this->initEditForm();
833  if ($form->checkInput()) {
834  $title = $form->getInput("title");
835  $desc = $form->getInput("desc");
836 
837  $this->object->setTitle($title);
838  $this->object->setDescription($desc);
839  $this->object->update();
840 
841  $this->saveSortingSettings($form);
842 
843  // title icon visibility
844  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
845 
846  // top actions visibility
847  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
848 
849  // custom icon
850  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
851 
852  // tile image
853  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
854 
855  // list presentation
856  $this->saveListPresentation($form);
857 
858  // BEGIN ChangeEvent: Record update
859  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
860  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
861  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
862  // END ChangeEvent: Record update
863 
864  // services
865  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
867  $this->object->getId(),
868  $form,
869  array(
874  )
875  );
876 
877  // block limit
878  if ((int) $form->getInput("block_limit") > 0) {
879  ilContainer::_writeContainerSetting($this->object->getId(), "block_limit", (int) $form->getInput("block_limit"));
880  } else {
881  ilContainer::_deleteContainerSettings($this->object->getId(), "block_limit");
882  }
883  // Update ecs export settings
884  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
885  $ecs = new ilECSCategorySettings($this->object);
886  if ($ecs->handleSettingsUpdate()) {
887  return $this->afterUpdate();
888  }
889  }
890 
891  // display form to correct errors
892  $this->setEditTabs();
893  $form->setValuesByPost();
894  $this->tpl->setContent($form->getHTML());
895  }
896  }
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
if(isset($_POST['submit'])) $form
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
$ilUser
Definition: imgupload.php:18
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
setEditTabs($active_tab="settings_misc")
static _writeContainerSetting($a_id, $a_keyword, $a_value)
Class ilECSCategorySettings.
getObjectService()
Get object service.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ viewObject()

ilObjCategoryGUI::viewObject ( )

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

References $_GET, and renderObject().

514  {
515  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
516  parent::viewObject();
517  return true;
518  }
519  return $this->renderObject();
520  }
$_GET["client_id"]
renderObject()
Render category.
+ 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: