ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
 editTranslationsObject ($a_get_post_values=false, $a_add=false)
 Edit title and translations. More...
 
 saveTranslationsObject ()
 Save title and translations. More...
 
 addTranslationObject ()
 Add a translation. More...
 
 deleteTranslationsObject ()
 Remove translation. 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)
 
 editIconsObject ($a_form=null)
 Edit folder icons. More...
 
 initIconsForm ()
 
 updateIconsObject ()
 update container icons More...
 
- 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...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 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...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard 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 ()
 
 lockObject ()
 
 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...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container 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 type $lng. 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...
 

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...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. 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
 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
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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, object, 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 
67  $this->type = "cat";
68  parent::__construct($a_data, (int) $a_id, $a_call_by_reference, false);
69 
70  if (is_object($this->object)) {
71  include_once("./Services/Container/classes/class.ilContainer.php");
72  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
73  $this->info_screen_enabled = ilContainer::_lookupContainerSetting(
74  $this->object->getId(),
76  true
77  );
78  }
79  }
global $DIC
Definition: saml.php:7
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
user()
Definition: user.php:4
settings()
Definition: settings.php:2
Create new PHPExcel object
obj_idprivate
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 1454 of file class.ilObjCategoryGUI.php.

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

Referenced by assignSaveObject().

1455  {
1457  $ilUser = $this->user;
1458 
1459  $this->checkPermission("cat_administrate_users");
1460 
1461  // return true if it's not a local user
1462  $tmp_obj =&ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1463  if ($tmp_obj->getTimeLimitOwner() != $this->object->getRefId() and
1464  !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1465  return true;
1466  }
1467 
1468  // new assignment by form
1469  $new_assigned = $new_assigned ? $new_assigned : array();
1470  $assigned = $rbacreview->assignedRoles((int) $_GET['obj_id']);
1471 
1472  // all assignable globals
1473  if (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1474  $ga = $rbacreview->getGlobalAssignableRoles();
1475  } else {
1476  $ga = $rbacreview->getGlobalRolesArray();
1477  }
1478  $global_assignable = array();
1479  foreach ($ga as $role) {
1480  $global_assignable[] = $role['obj_id'];
1481  }
1482 
1483  $new_visible_assigned_roles = array_intersect($new_assigned, $global_assignable);
1484  $all_assigned_roles = array_intersect($assigned, $rbacreview->getGlobalRoles());
1485  $main_assigned_roles = array_diff($all_assigned_roles, $global_assignable);
1486 
1487  if (!count($new_visible_assigned_roles) and !count($main_assigned_roles)) {
1488  return false;
1489  }
1490  return true;
1491  }
$_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
Create styles array
The data for the language used.
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 1433 of file class.ilObjCategoryGUI.php.

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

Referenced by assignRolesObject(), and assignSaveObject().

1434  {
1436  $ilUser = $this->user;
1437 
1438  // check local user
1439  $tmp_obj =&ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1440  // Admin => all roles
1441  if (in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1442  $global_roles = $rbacreview->getGlobalRolesArray();
1443  } elseif ($tmp_obj->getTimeLimitOwner() == $this->object->getRefId()) {
1444  $global_roles = $rbacreview->getGlobalAssignableRoles();
1445  } else {
1446  $global_roles = array();
1447  }
1448  return $roles = array_merge(
1449  $global_roles,
1450  $rbacreview->getAssignableChildRoles($this->object->getRefId())
1451  );
1452  }
$ilUser
Definition: imgupload.php:18
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
+ 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 1093 of file class.ilObjCategoryGUI.php.

References ilUtil\getDataDir().

Referenced by _importCategories().

1094  {
1095  return ilUtil::getDataDir() . "/cat_import";
1096  }
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 1493 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().

1494  {
1495  global $DIC;
1496 
1497  $ilAccess = $DIC->access();
1498  $ilErr = $DIC["ilErr"];
1499  $lng = $DIC->language();
1500 
1501  if ($ilAccess->checkAccess("read", "", $a_target)) {
1503  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1504  ilUtil::sendFailure(sprintf(
1505  $lng->txt("msg_no_perm_read_item"),
1507  ), true);
1509  }
1510 
1511  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1512  }
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 1123 of file class.ilObjCategoryGUI.php.

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

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

1124  {
1125  global $DIC;
1126 
1127  $lng = $DIC->language();
1128  $ilCtrl = $DIC->ctrl();
1129 
1130  require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
1131 
1132  $import_dir = ilObjCategoryGUI::_getImportDir();
1133 
1134  // create user import directory if necessary
1135  if (!@is_dir($import_dir)) {
1136  ilUtil::createDirectory($import_dir);
1137  }
1138 
1139  // move uploaded file to user import directory
1140 
1141  $file_name = $_FILES["importFile"]["name"];
1142 
1143  // added to prevent empty file names
1144  if (!strcmp($file_name, "")) {
1145  ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
1146  $ilCtrl->redirectByClass('ilObjCategoryGUI');
1147  }
1148 
1149  $parts = pathinfo($file_name);
1150  $full_path = $import_dir . "/" . $file_name;
1151  ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1152 
1153  // unzip file
1154  ilUtil::unzip($full_path);
1155 
1156  $subdir = basename($parts["basename"], "." . $parts["extension"]);
1157  $xml_file = $import_dir . "/" . $subdir . "/" . $subdir . ".xml";
1158  // CategoryImportParser
1159  //var_dump($_POST);
1160  $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1161  $importParser->startParsing();
1162 
1163  ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1164  $ilCtrl->redirectByClass('ilObjCategoryGUI');
1165  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 1023 of file class.ilObjCategoryGUI.php.

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

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

1024  {
1025  global $DIC;
1026 
1027  $lng = $DIC->language();
1028  $rbacreview = $DIC->rbac()->review();
1029  $ilCtrl = $DIC->ctrl();
1030 
1031  $a_tpl->addBlockfile(
1032  "ADM_CONTENT",
1033  "adm_content",
1034  "tpl.cat_import_form.html",
1035  "Modules/Category"
1036  );
1037 
1038  $a_tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilObjCategoryGUI'));
1039 
1040  $a_tpl->setVariable("TXT_IMPORT_CATEGORIES", $lng->txt("import_categories"));
1041  $a_tpl->setVariable("TXT_HIERARCHY_OPTION", $lng->txt("import_cat_localrol"));
1042  $a_tpl->setVariable("TXT_IMPORT_FILE", $lng->txt("import_file"));
1043  $a_tpl->setVariable("TXT_IMPORT_TABLE", $lng->txt("import_cat_table"));
1044 
1045  $a_tpl->setVariable("BTN_IMPORT", $lng->txt("import"));
1046  $a_tpl->setVariable("BTN_CANCEL", $lng->txt("cancel"));
1047 
1048  // NEED TO FILL ADOPT_PERMISSIONS HTML FORM....
1049  $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id, true);
1050 
1051  // sort output for correct color changing
1052  ksort($parent_role_ids);
1053 
1054  foreach ($parent_role_ids as $key => $par) {
1055  if ($par["obj_id"] != SYSTEM_ROLE_ID) {
1056  $check = ilUtil::formCheckbox(0, "adopt[]", $par["obj_id"], 1);
1057  $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
1058  $output["adopt"][$key]["check_adopt"] = $check;
1059  $output["adopt"][$key]["role_id"] = $par["obj_id"];
1060  $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
1061  $output["adopt"][$key]["role_name"] = $par["title"];
1062  }
1063  }
1064 
1065  //var_dump($output);
1066 
1067  // BEGIN ADOPT PERMISSIONS
1068  foreach ($output["adopt"] as $key => $value) {
1069  $a_tpl->setCurrentBlock("ADOPT_PERM_ROW");
1070  $a_tpl->setVariable("CSS_ROW_ADOPT", $value["css_row_adopt"]);
1071  $a_tpl->setVariable("CHECK_ADOPT", $value["check_adopt"]);
1072  $a_tpl->setVariable("LABEL_ID", $value["role_id"]);
1073  $a_tpl->setVariable("TYPE", $value["type"]);
1074  $a_tpl->setVariable("ROLE_NAME", $value["role_name"]);
1075  $a_tpl->parseCurrentBlock();
1076  }
1077  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
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 294 of file class.ilObjCategoryGUI.php.

References ilPreviewGUI\initPreview().

Referenced by executeCommand().

295  {
297  parent::addHeaderAction();
298  }
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:

◆ addTranslationObject()

ilObjCategoryGUI::addTranslationObject ( )

Add a translation.

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

References $_POST, and editTranslationsObject().

980  {
981  if ($_POST["title"]) {
982  $k = max(array_keys($_POST["title"]));
983  $k++;
984  $_POST["title"][$k] = "";
985  $this->editTranslationsObject(true);
986  } else {
987  $this->editTranslationsObject(false, true);
988  }
989  }
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
$_POST["username"]
+ Here is the call graph for this function:

◆ addUserAutoCompleteObject()

ilObjCategoryGUI::addUserAutoCompleteObject ( )
protected

Show auto complete results.

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

References array, exit, and ilUserAutoComplete\MAX_ENTRIES.

1260  {
1261  include_once './Services/User/classes/class.ilUserAutoComplete.php';
1262  $auto = new ilUserAutoComplete();
1263  $auto->setSearchFields(array('login','firstname','lastname','email'));
1264  $auto->enableFieldSearchableCheck(true);
1265  $auto->isMoreLinkAvailable(true);
1266 
1267  if (($_REQUEST['fetchall'])) {
1268  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1269  }
1270 
1271  echo $auto->getList($_REQUEST['term']);
1272  exit();
1273  }
Auto completion class for user lists.
Create styles array
The data for the language used.

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $a_new_object)
protected

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

References $ilUser, ilContainerGUI\$settings, ilObjectGUI\$tree, ilContainerGUI\$user, ilObject\_lookupObjId(), ilObjStyleSheet\_lookupStandard(), ilObject\getDescription(), ilObject\getId(), ilObject\getRefId(), ilObject\getTitle(), ilObjStyleSheet\lookupObjectStyle(), ilObjectGUI\redirectToRefId(), ilUtil\sendSuccess(), ilContainer\SORT_TITLE, and ilObjStyleSheet\writeStyleUsage().

519  {
521  $tree = $this->tree;
522 
523  // add default translation
524  $a_new_object->addTranslation(
525  $a_new_object->getTitle(),
526  $a_new_object->getDescription(),
527  $ilUser->getPref("language"),
528  true
529  );
530 
531  // default: sort by title
532  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
533  $settings = new ilContainerSortingSettings($a_new_object->getId());
534  $settings->setSortMode(ilContainer::SORT_TITLE);
535  $settings->save();
536 
537  // inherit parents content style, if not individual
538  $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
539  $parent_id = ilObject::_lookupObjId($parent_ref_id);
540  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
541  $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
542  if ($style_id > 0) {
543  if (ilObjStyleSheet::_lookupStandard($style_id)) {
544  ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
545  }
546  }
547 
548  // always send a message
549  ilUtil::sendSuccess($this->lng->txt("cat_added"), true);
550  $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
551  $this->redirectToRefId($a_new_object->getRefId(), "");
552  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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)
getTitle()
get object title public
getDescription()
get object description
$ilUser
Definition: imgupload.php:18
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 1186 of file class.ilObjCategoryGUI.php.

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

1187  {
1188  $ilTabs = $this->tabs;
1189 
1190  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1191  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1192  $utab->resetOffset();
1193  $utab->writeFilterToSession();
1194  $this->listUsersObject();
1195  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

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

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

Referenced by assignSaveObject().

1326  {
1328  $ilTabs = $this->tabs;
1329 
1330  $this->checkPermission("cat_administrate_users");
1331 
1332  include_once './Services/User/classes/class.ilLocalUser.php';
1333 
1334  if (!isset($_GET['obj_id'])) {
1335  ilUtil::sendFailure('no_user_selected');
1336  $this->listUsersObject();
1337 
1338  return true;
1339  }
1340 
1341  $ilTabs->clearTargets();
1342  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
1343  $ilHelp = $this->help;
1344  $ilHelp->setScreenIdComponent("cat");
1345  $ilHelp->setScreenId("administrate_user");
1346  $ilHelp->setSubScreenId("assign_roles");
1347 
1348 
1349  $roles = $this->__getAssignableRoles();
1350 
1351  if (!count($roles)) {
1352  #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1353  #$this->listUsersObject();
1354 
1355  #return true;
1356  }
1357 
1358  $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1359 
1360  $counter = 0;
1361  $f_result = array();
1362 
1363  foreach ($roles as $role) {
1364  $role_obj =&ilObjectFactory::getInstanceByObjId($role['obj_id']);
1365 
1366  $disabled = false;
1367  $f_result[$counter]['checkbox'] = ilUtil::formCheckbox(
1368  in_array($role['obj_id'], $ass_roles) ? 1 : 0,
1369  'role_ids[]',
1370  $role['obj_id'],
1371  $disabled
1372  );
1373  $f_result[$counter]['title'] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1374  $f_result[$counter]['desc'] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1375  $f_result[$counter]['type'] = $role['role_type'] == 'global' ?
1376  $this->lng->txt('global') :
1377  $this->lng->txt('local');
1378 
1379  unset($role_obj);
1380  ++$counter;
1381  }
1382 
1383  include_once('./Modules/Category/classes/class.ilCategoryAssignRoleTableGUI.php');
1384  $table = new ilCategoryAssignRoleTableGUI($this, "assignRoles");
1385  $tmp_obj =&ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1386  $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
1387  $table->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
1388  $table->setData($f_result);
1389  $this->tpl->setContent($table->getHTML());
1390  }
$_GET["client_id"]
listUsersObject($show_delete=false)
TableGUI class for role assignments.
$counter
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
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 1392 of file class.ilObjCategoryGUI.php.

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

1393  {
1396  $this->checkPermission("cat_administrate_users");
1397 
1398  include_once './Services/User/classes/class.ilLocalUser.php';
1399  // check hack
1400  if (!isset($_GET['obj_id']) or !in_array($_REQUEST['obj_id'], ilLocalUser::_getAllUserIds())) {
1401  ilUtil::sendFailure('no_user_selected');
1402  $this->listUsersObject();
1403 
1404  return true;
1405  }
1406  $roles = $this->__getAssignableRoles();
1407 
1408  // check minimum one global role
1409  if (!$this->__checkGlobalRoles($_POST['role_ids'])) {
1410  ilUtil::sendFailure($this->lng->txt('no_global_role_left'));
1411  $this->assignRolesObject();
1412 
1413  return false;
1414  }
1415 
1416  $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
1417  $assigned_roles = $rbacreview->assignedRoles((int) $_REQUEST['obj_id']);
1418  foreach ($roles as $role) {
1419  if (in_array($role['obj_id'], $new_role_ids) and !in_array($role['obj_id'], $assigned_roles)) {
1420  $rbacadmin->assignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1421  }
1422  if (in_array($role['obj_id'], $assigned_roles) and !in_array($role['obj_id'], $new_role_ids)) {
1423  $rbacadmin->deassignUser($role['obj_id'], (int) $_REQUEST['obj_id']);
1424  }
1425  }
1426  ilUtil::sendSuccess($this->lng->txt('role_assignment_updated'));
1427  $this->assignRolesObject();
1428 
1429  return true;
1430  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
__checkGlobalRoles($new_assigned)
$_GET["client_id"]
listUsersObject($show_delete=false)
static _getAllUserIds($a_filter=0)
Create styles array
The data for the language used.
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:

◆ deleteTranslationsObject()

ilObjCategoryGUI::deleteTranslationsObject ( )

Remove translation.

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

References $_POST, editTranslationsObject(), saveTranslationsObject(), and ilUtil\sendFailure().

995  {
996  foreach ($_POST["title"] as $k => $v) {
997  if ($_POST["check"][$k]) {
998  // default translation cannot be deleted
999  if ($k != $_POST["default"]) {
1000  unset($_POST["title"][$k]);
1001  unset($_POST["desc"][$k]);
1002  unset($_POST["lang"][$k]);
1003  } else {
1004  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
1005  return $this->editTranslationsObject();
1006  }
1007  }
1008  }
1009  $this->saveTranslationsObject();
1010  }
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveTranslationsObject()
Save title and translations.
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

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

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

1297  {
1298  $this->checkPermission("cat_administrate_users");
1299  if (!count($_POST['id'])) {
1300  ilUtil::sendFailure($this->lng->txt('no_users_selected'));
1301  $this->listUsersObject();
1302 
1303  return true;
1304  }
1305 
1306  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
1307  $confirm = new ilConfirmationGUI();
1308  $confirm->setFormAction($this->ctrl->getFormAction($this));
1309  $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1310  $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1311  $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1312 
1313  foreach ($_POST['id'] as $user) {
1314  $name = ilObjUser::_lookupName($user);
1315 
1316  $confirm->addItem(
1317  'user_ids[]',
1318  $user,
1319  $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']'
1320  );
1321  }
1322  $this->tpl->setContent($confirm->getHTML());
1323  }
static _lookupName($a_user_id)
lookup user name
listUsersObject($show_delete=false)
if($format !==null) $name
Definition: metadata.php:146
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:

◆ editIconsObject()

ilObjCategoryGUI::editIconsObject (   $a_form = null)

Edit folder icons.

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

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and initIconsForm().

Referenced by updateIconsObject().

1523  {
1524  $tpl = $this->tpl;
1525 
1526  $this->checkPermission('write');
1527 
1528  $this->tabs_gui->setTabActive('settings');
1529 
1530  if (!$a_form) {
1531  $a_form = $this->initIconsForm();
1532  }
1533 
1534  $tpl->setContent($a_form->getHTML());
1535  }
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:

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

Edit extended category settings.

protected

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

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

Referenced by updateInfoObject().

630  {
631  $this->checkPermission("write");
632  $this->setEditTabs();
633  $this->tabs_gui->activateTab('settings');
634  $this->tabs_gui->setSubTabActive('edit_cat_settings');
635 
636  $this->initExtendedSettings();
637  $this->tpl->setContent($this->form->getHTML());
638  }
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:

◆ editTranslationsObject()

ilObjCategoryGUI::editTranslationsObject (   $a_get_post_values = false,
  $a_add = false 
)

Edit title and translations.

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

References $_POST, ilObjectGUI\$data, $table, ilObjectGUI\$tpl, array, object, and setEditTabs().

Referenced by addTranslationObject(), deleteTranslationsObject(), and saveTranslationsObject().

886  {
887  $tpl = $this->tpl;
888 
889  $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
890 
891 
892  $this->lng->loadLanguageModule($this->object->getType());
893  $this->setEditTabs("settings_trans");
894 
895  include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
897  $this,
898  "editTranslations",
899  true,
900  "Translation"
901  );
902  if ($a_get_post_values) {
903  $vals = array();
904  foreach ($_POST["title"] as $k => $v) {
905  $vals[] = array("title" => $v,
906  "desc" => $_POST["desc"][$k],
907  "lang" => $_POST["lang"][$k],
908  "default" => ($_POST["default"] == $k));
909  }
910  $table->setData($vals);
911  } else {
912  $data = $this->object->getTranslations();
913  foreach ($data["Fobject"] as $k => $v) {
914  $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
915  }
916  if ($a_add) {
917  $data["Fobject"][++$k]["title"] = "";
918  }
919  $table->setData($data["Fobject"]);
920  }
921  $tpl->setContent($table->getHTML());
922  }
Create styles array
The data for the language used.
setEditTabs($active_tab="settings_misc")
TableGUI class for title/description translations.
Create new PHPExcel object
obj_idprivate
if(empty($password)) $table
Definition: pwgen.php:24
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjCategoryGUI::executeCommand ( )

Definition at line 81 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(), object, ilContainerGUI\prepareOutput(), renderObject(), setEditTabs(), and ilContainerGUI\showRepTree().

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

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

Referenced by getObjectMetadataGUI().

1634  {
1635  $res = array();
1636 
1637  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1638 
1639  foreach (ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value) {
1640  if (substr($keyword, 0, strlen($prefix)) == $prefix && (bool) $value) {
1641  $res[] = substr($keyword, strlen($prefix));
1642  }
1643  }
1644 
1645  return $res;
1646  }
foreach($_POST as $key=> $value) $res
static _getContainerSettings($a_id)
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )

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

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

◆ getObjectMetadataGUI()

ilObjCategoryGUI::getObjectMetadataGUI ( )

Get object metadata gui.

Parameters

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

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

Referenced by executeCommand().

308  {
309  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
310  $md_gui = new ilObjectMetaDataGUI($this->object);
311  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
313  $this->object->getId(),
315  false
316  )) {
317  $md_gui->enableTaxonomyDefinition(true);
318  $tax = $md_gui->getTaxonomyObjGUI();
319  $tax->setMultiple(true);
320  $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
321  $taxonomies = $this->getTaxonomiesForRefId();
322  if (sizeof($taxonomies)) {
323  $md_gui->setTaxonomySettings(function ($form) {
324  $tax = $this->getTaxonomiesForRefId();
325  $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
326  $form->addItem($block);
327 
328  $current = $this->getActiveBlocks();
329 
330  foreach ($tax as $tax_id => $tax_item) {
331  $option = new ilCheckboxOption(
332  $tax_item["title"],
333  $tax_id,
335  );
336 
337  if ($tax_item["source"] != $this->object->getRefId()) {
338  $loc = new ilLocatorGUI();
339  $loc->setTextOnly(true);
340  $loc->addRepositoryItems($tax_item["source"]);
341  $option->setInfo($loc->getHTML());
342  }
343 
344  $block->addOption($option);
345 
346  if (in_array($tax_id, $current)) {
347  $value[] = $tax_id;
348  }
349  }
350 
351  $block->setValue($value);
352  }, function ($form) {
353  $taxonomies = $this->getTaxonomiesForRefId();
354  if (sizeof($taxonomies)) {
355  $sblock = $form->getInput("sblock");
356 
357  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
358 
360  $this->object->getId(),
361  $prefix . "%",
362  true
363  );
364 
365  if (is_array($sblock)) {
366  foreach ($sblock as $tax_id) {
368  $this->object->getId(),
369  $prefix . $tax_id,
370  1
371  );
372  }
373  }
374  }
375  });
376  }
377  }
378  return $md_gui;
379  }
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.
Create new PHPExcel object
obj_idprivate
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 385 of file class.ilObjCategoryGUI.php.

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

386  {
388  $lng = $this->lng;
389  $ilHelp = $this->help;
390  $ilAccess = $this->access;
391 
392  if ($this->ctrl->getCmd() == "editPageContent") {
393  return;
394  }
395  #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
396 
397  $ilHelp->setScreenIdComponent("cat");
398 
399  if ($rbacsystem->checkAccess('read', $this->ref_id)) {
400  $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "render")
401  ? true
402  : false;
403  $this->tabs_gui->addTab(
404  "view_content",
405  $lng->txt("content"),
406  $this->ctrl->getLinkTarget($this, "")
407  );
408 
409  //BEGIN ChangeEvent add info tab to category object
410  if ($this->info_screen_enabled) {
411  $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
412  || strtolower($_GET["cmdClass"]) == "ilnotegui")
413  ? true
414  : false;
415  $this->tabs_gui->addTarget(
416  "info_short",
417  $this->ctrl->getLinkTargetByClass(
418  array("ilobjcategorygui", "ilinfoscreengui"),
419  "showSummary"
420  ),
421  array("showSummary","", "infoScreen"),
422  "",
423  "",
424  $force_active
425  );
426  }
427  //END ChangeEvent add info tab to category object
428  }
429 
430  if ($rbacsystem->checkAccess('write', $this->ref_id)) {
431  $force_active = ($_GET["cmd"] == "edit")
432  ? true
433  : false;
434  $this->tabs_gui->addTarget(
435  "settings",
436  $this->ctrl->getLinkTarget($this, "edit"),
437  "edit",
438  get_class($this),
439  "",
440  $force_active
441  );
442 
443 
444 
445  // metadata / taxonomies
446  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
447  $mdgui = new ilObjectMetaDataGUI($this->object);
449  $this->object->getId(),
451  false
452  )) {
453  $mdgui->enableTaxonomyDefinition(true);
454  }
455  $mdtab = $mdgui->getTab();
456  if ($mdtab) {
457  $this->tabs_gui->addTab(
458  "meta_data",
459  $this->lng->txt("meta_data"),
460  $mdtab
461  );
462  }
463  }
464 
465  include_once './Services/User/classes/class.ilUserAccountSettings.php';
466  if (
467  ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() and
468  $rbacsystem->checkAccess('cat_administrate_users', $this->ref_id)) {
469  $this->tabs_gui->addTarget(
470  "administrate_users",
471  $this->ctrl->getLinkTarget($this, "listUsers"),
472  "listUsers",
473  get_class($this)
474  );
475  }
476 
477  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
478  $this->tabs_gui->addTarget(
479  'export',
480  $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
481  'export',
482  'ilexportgui'
483  );
484  }
485 
486  // parent tabs (all container: edit_permission, clipboard, trash
487  parent::getTabs();
488  }
Class ilObjectMetaDataGUI.
$_GET["client_id"]
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
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 1602 of file class.ilObjCategoryGUI.php.

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

Referenced by getObjectMetadataGUI().

1603  {
1604  $tree = $this->tree;
1605 
1606  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1607  include_once "Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1608 
1609  // see ilTaxMDGUI::getSelectableTaxonomies()
1610 
1611  $res = array();
1612  foreach ($tree->getPathFull($this->object->getRefId()) as $node) {
1613  //if ($node["ref_id"] != $this->object->getRefId())
1614  {
1615  // find all defined taxes for parent node, activation is not relevant
1616  $node_taxes = ilObjTaxonomy::getUsageOfObject($node["obj_id"], true);
1617  if (sizeof($node_taxes)) {
1618  foreach ($node_taxes as $node_tax) {
1619  $res[$node_tax["tax_id"]] = array(
1620  "title" => $node_tax["title"]
1621  , "source" => $node["child"]
1622  );
1623  }
1624  }
1625  }
1626  }
1627 
1628  asort($res);
1629  return $res;
1630  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
+ 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 1085 of file class.ilObjCategoryGUI.php.

1086  {
1087  $this->ctrl->redirect($this);
1088  }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

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

References _importCategoriesForm().

1016  {
1017  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
1018  }
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 1101 of file class.ilObjCategoryGUI.php.

References $_GET, and _importCategories().

1102  {
1104  // call to importCategories with $withrol = 0
1106  }
$_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 1111 of file class.ilObjCategoryGUI.php.

References $_GET, and _importCategories().

1112  {
1113 
1114  //echo "entra aqui";
1115  // call to importCategories with $withrol = 1
1117  }
$_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 569 of file class.ilObjCategoryGUI.php.

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

Referenced by executeCommand(), and infoScreenObject().

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

References infoScreen().

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

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms (   $a_new_type)
protected

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

512  {
513  $forms = parent::initCreationForms($a_new_type);
514  //unset($forms[self::CFORM_IMPORT]);
515  return $forms;
516  }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

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

References $def, $form, $title, ilMDLanguageItem\_getLanguages(), array, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, object, setEditTabs(), ilTextAreaInputGUI\setRows(), ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjectServiceSettingsGUI\TAXONOMIES, and ilObject\TITLE_LENGTH.

Referenced by updateObject().

727  {
728  $this->lng->loadLanguageModule($this->object->getType());
729  $this->setEditTabs();
730 
731  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
732  $form = new ilPropertyFormGUI();
733  $form->setFormAction($this->ctrl->getFormAction($this));
734  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
735 
736  // title/description
737 
738  $trans = $this->object->getTranslations();
739  $def = $trans["Fobject"][0]; // default
740 
741  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
742  $title->setRequired(true);
743  $title->setSize(min(40, ilObject::TITLE_LENGTH));
744  $title->setMaxLength(ilObject::TITLE_LENGTH);
745  $title->setValue($def["title"]);
746  $form->addItem($title);
747 
748  if (sizeof($trans["Fobject"]) > 1) {
749  include_once('Services/MetaData/classes/class.ilMDLanguageItem.php');
750  $languages = ilMDLanguageItem::_getLanguages();
751 
752  $title->setInfo($this->lng->txt("language") . ": " . $languages[$def["lang"]] .
753  ' <a href="' . $this->ctrl->getLinkTarget($this, "editTranslations") .
754  '">&raquo; ' . $this->lng->txt("cat_more_translations") . '</a>');
755 
756  unset($languages);
757  }
758 
759  $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
760  $desc->setRows(2);
761  $desc->setCols(40);
762  $desc->setValue($def["desc"]);
763  $form->addItem($desc);
764 
765  // Show didactic template type
766  $this->initDidacticTemplate($form);
767 
768  // presentation
769  $pres = new ilFormSectionHeaderGUI();
770  $pres->setTitle($this->lng->txt('obj_presentation'));
771  $form->addItem($pres);
772 
773 
774  $form = $this->initSortingForm(
775  $form,
776  array(
780  )
781  );
782 
783  // icon settings
784  // $this->showCustomIconsEditing(1, $form, false);
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  // $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
810 
811  return $form;
812  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
This class represents a section header in a property form.
if(isset($_POST['submit'])) $form
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
This class represents a text property in a property form.
Create styles array
The data for the language used.
setEditTabs($active_tab="settings_misc")
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
Create new PHPExcel object
obj_idprivate
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
$def
Definition: croninfo.php:21
Class ilECSCategorySettings.
+ 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 671 of file class.ilObjCategoryGUI.php.

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

Referenced by editInfoObject(), and updateInfoObject().

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

◆ initIconsForm()

ilObjCategoryGUI::initIconsForm ( )

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

References $form, setEditTabs(), and ilContainerGUI\showCustomIconsEditing().

Referenced by editIconsObject(), and updateIconsObject().

1538  {
1539  $this->setEditTabs("icons");
1540 
1541  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
1542  $form = new ilPropertyFormGUI();
1543  $form->setFormAction($this->ctrl->getFormAction($this));
1544 
1545  $this->showCustomIconsEditing(1, $form);
1546 
1547  // $form->setTitle($this->lng->txt('edit_grouping'));
1548  $form->addCommandButton('updateIcons', $this->lng->txt('save'));
1549 
1550  return $form;
1551  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
setEditTabs($active_tab="settings_misc")
+ 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 1586 of file class.ilObjCategoryGUI.php.

Referenced by executeCommand().

1587  {
1588  $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1589  $this->tabs_gui->addSubTab(
1590  "tax_settings",
1591  $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1592  $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
1593  );
1594  $this->tabs_gui->addSubTab(
1595  "tax_list",
1596  $this->lng->txt("cntr_taxonomy_definitions"),
1597  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
1598  );
1599  $this->tabs_gui->activateSubTab($a_active);
1600  }
+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

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

1199  {
1200  $ilUser = $this->user;
1201  $ilErr = $this->error;
1202  $ilToolbar = $this->toolbar;
1203 
1204  include_once './Services/User/classes/class.ilLocalUser.php';
1205  include_once './Services/User/classes/class.ilObjUserGUI.php';
1206 
1209 
1210  if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) {
1211  $ilErr->raiseError($this->lng->txt("msg_no_perm_admin_users"), $ilErr->MESSAGE);
1212  }
1213  $this->tabs_gui->setTabActive('administrate_users');
1214 
1215 
1216 
1217  $this->tpl->addBlockfile(
1218  'ADM_CONTENT',
1219  'adm_content',
1220  'tpl.cat_admin_users.html',
1221  "Modules/Category"
1222  );
1223 
1224  if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) {
1225  $ilToolbar->addButton(
1226  $this->lng->txt('add_user'),
1227  $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')
1228  );
1229 
1230  $ilToolbar->addButton(
1231  $this->lng->txt('import_users'),
1232  $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')
1233  );
1234  } else {
1235  ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1236  }
1237 
1238  if ($show_delete) {
1239  $this->tpl->setCurrentBlock("confirm_delete");
1240  $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this));
1241  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
1242  $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers');
1243  $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete'));
1244  $this->tpl->parseCurrentBlock();
1245  }
1246 
1247  $this->lng->loadLanguageModule('user');
1248 
1249  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1250  $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER);
1251  $this->tpl->setVariable('USERS_TABLE', $utab->getHTML());
1252 
1253  return true;
1254  }
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 1276 of file class.ilObjCategoryGUI.php.

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

1277  {
1278  include_once './Services/User/classes/class.ilLocalUser.php';
1279  $this->checkPermission("cat_administrate_users");
1280 
1281  foreach ($_POST['user_ids'] as $user_id) {
1282  if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->object->getRefId()))) {
1283  die('user id not valid');
1284  }
1285  if (!$tmp_obj =&ilObjectFactory::getInstanceByObjId($user_id, false)) {
1286  continue;
1287  }
1288  $tmp_obj->delete();
1289  }
1290  ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1291  $this->listUsersObject();
1292 
1293  return true;
1294  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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
Create new PHPExcel object
obj_idprivate
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 493 of file class.ilObjCategoryGUI.php.

References $ret, and ilContainerGUI\$tabs.

Referenced by executeCommand(), and viewObject().

494  {
495  $ilTabs = $this->tabs;
496 
497  $ilTabs->activateTab("view_content");
498  $ret = parent::renderObject();
499  return $ret;
500  }
$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 1171 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

1172  {
1173  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1174  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1175  $utab->resetOffset();
1176  $utab->resetFilter();
1177 
1178  // from "old" implementation
1179  $this->listUsersObject();
1180  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ saveTranslationsObject()

ilObjCategoryGUI::saveTranslationsObject ( )

Save title and translations.

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

References $_POST, ilContainerGUI\$error, ilObjectGUI\$ilErr, ilObjectGUI\checkPermissionBool(), editTranslationsObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

Referenced by deleteTranslationsObject().

928  {
930 
931  if (!$this->checkPermissionBool("write")) {
932  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
933  }
934 
935  // default language set?
936  if (!isset($_POST["default"])) {
937  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
938  return $this->editTranslationsObject(true);
939  }
940 
941  // all languages set?
942  if (array_key_exists("", $_POST["lang"])) {
943  ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
944  return $this->editTranslationsObject(true);
945  }
946 
947  // no single language is selected more than once?
948  if (count(array_unique($_POST["lang"])) < count($_POST["lang"])) {
949  ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
950  return $this->editTranslationsObject(true);
951  }
952 
953  // save the stuff
954  $this->object->removeTranslations();
955  foreach ($_POST["title"] as $k => $v) {
956  // update object data if default
957  $is_default = ($_POST["default"] == $k);
958  if ($is_default) {
959  $this->object->setTitle(ilUtil::stripSlashes($v));
960  $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
961  $this->object->update();
962  }
963 
964  $this->object->addTranslation(
966  ilUtil::stripSlashes($_POST["desc"][$k]),
967  ilUtil::stripSlashes($_POST["lang"][$k]),
968  $is_default
969  );
970  }
971 
972  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
973  $this->ctrl->redirect($this, "editTranslations");
974  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditTabs()

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

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

References $ilSetting, ilContainerGUI\$settings, and ilContainerGUI\$tabs.

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

693  {
695  $ilTabs = $this->tabs;
696 
697  $this->tabs_gui->addSubTab(
698  "settings_misc",
699  $this->lng->txt("settings"),
700  $this->ctrl->getLinkTarget($this, "edit")
701  );
702 
703  /*$this->tabs_gui->addSubTab("settings_trans",
704  $this->lng->txt("title_and_translations"),
705  $this->ctrl->getLinkTarget($this, "editTranslations"));*/
706 
707  $this->tabs_gui->addSubTab(
708  "settings_trans",
709  $this->lng->txt("obj_multilinguality"),
710  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
711  );
712 
713  // custom icon
714  if ($ilSetting->get("custom_icons")) {
715  $this->tabs_gui->addSubTab(
716  "icons",
717  $this->lng->txt("icon_settings"),
718  $this->ctrl->getLinkTarget($this, 'editIcons')
719  );
720  }
721 
722  $this->tabs_gui->activateTab("settings");
723  $this->tabs_gui->activateSubTab($active_tab);
724  }
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ updateIconsObject()

ilObjCategoryGUI::updateIconsObject ( )

update container icons

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

References $_POST, $form, $ilSetting, ilContainerGUI\$settings, ilObjectGUI\checkPermission(), editIconsObject(), initIconsForm(), and ilUtil\sendSuccess().

1557  {
1559 
1560  $this->checkPermission('write');
1561 
1562  $form = $this->initIconsForm();
1563  if ($form->checkInput()) {
1564  //save custom icons
1565  if ($ilSetting->get("custom_icons")) {
1566  if ($_POST["cont_icon_delete"]) {
1567  $this->object->removeCustomIcon();
1568  }
1569  $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
1570  }
1571  if ($_FILES["cont_icon"]['tmp_name'] || $_POST["cont_icon_delete"]) {
1572  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1573  }
1574  $this->ctrl->redirect($this, "editIcons");
1575  }
1576 
1577  $form->setValuesByPost();
1578  $this->editIconsObject($form);
1579  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editIconsObject($a_form=null)
Edit folder icons.
if(isset($_POST['submit'])) $form
global $ilSetting
Definition: privfeed.php:17
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:

◆ updateInfoObject()

ilObjCategoryGUI::updateInfoObject ( )
protected

Update info (extended meta data)

protected

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

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

646  {
647  $this->checkPermission("write");
648 
649  // init form
650  $this->initExtendedSettings();
651 
652  // still needed for date conversion and so on
653  $this->form->checkInput();
654 
655  if ($this->record_gui->importEditFormPostValues()) {
656  $this->record_gui->writeEditForm();
657 
658  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
659  $this->ctrl->redirect($this, "editInfo");
660  }
661 
662  $this->editInfoObject();
663  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 824 of file class.ilObjCategoryGUI.php.

References ilContainerGUI\$error, $form, ilObjectGUI\$ilErr, $ilUser, $lang, $title, ilContainerGUI\$user, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainerGUI\afterUpdate(), array, ilObjectGUI\checkPermissionBool(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initEditForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, object, ilContainerGUI\saveSortingSettings(), setEditTabs(), ilObjectServiceSettingsGUI\TAXONOMIES, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

825  {
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  $lang = $this->object->getTranslations();
837  $lang = $lang["Fobject"][0]["lang"];
838  $this->object->deleteTranslation($lang);
839  $this->object->addTranslation($title, $desc, $lang, true);
840  $this->object->setTitle($title);
841  $this->object->setDescription($desc);
842  $this->object->update();
843 
844  $this->saveSortingSettings($form);
845 
846  // save custom icons
847 
848  // BEGIN ChangeEvent: Record update
849  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
850  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
851  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
852  // END ChangeEvent: Record update
853 
854  // services
855  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
857  $this->object->getId(),
858  $form,
859  array(
864  )
865  );
866 
867  // Update ecs export settings
868  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
869  $ecs = new ilECSCategorySettings($this->object);
870  if ($ecs->handleSettingsUpdate()) {
871  return $this->afterUpdate();
872  }
873  }
874 
875  // display form to correct errors
876  $this->setEditTabs();
877  $form->setValuesByPost();
878  $this->tpl->setContent($form->getHTML());
879  }
880  }
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
$ilUser
Definition: imgupload.php:18
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
Create styles array
The data for the language used.
setEditTabs($active_tab="settings_misc")
Create new PHPExcel object
obj_idprivate
Class ilECSCategorySettings.
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 502 of file class.ilObjCategoryGUI.php.

References $_GET, and renderObject().

503  {
504  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
505  parent::viewObject();
506  return true;
507  }
508  return $this->renderObject();
509  }
$_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: