ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjCategoryGUI Class Reference

Class ilObjCategoryGUI. More...

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

Public Member Functions

 ilObjCategoryGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 getTabs (&$tabs_gui)
 Get tabs. More...
 
 renderObject ()
 Render category. More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 initEditForm ()
 Init object edit form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 updateObject ()
 updates object entry in object_data More...
 
 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...
 
 _importCategoriesForm ($a_ref_id, &$a_tpl)
 display form for category import (static, also called by RootFolderGUI) More...
 
 importCancelledObject ()
 import cancelled More...
 
 _getImportDir ()
 get user import directory name More...
 
 importCategoriesObject ()
 import categories More...
 
 importCategoriesWithRolObject ()
 import categories with local rol More...
 
 _importCategories ($a_ref_id, $withrol_tmp)
 import categories (static, also called by RootFolderGUI) More...
 
 listUsersObject ($show_delete=false)
 
 performDeleteUsersObject ()
 
 deleteUsersObject ()
 
 assignRolesObject ()
 
 assignSaveObject ()
 
 __getAssignableRoles ()
 
 __checkGlobalRoles ($new_assigned)
 
 __showRolesTable ($a_result_set, $a_from="")
 
 __showUsersTable ($a_result_set, $a_from="", $a_footer=true)
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="", $a_footer=true)
 
__initTableGUI ()
 
 __buildFilterSelect ($a_parent_ids)
 
 editIconsObject ($a_form=null)
 Edit folder icons. More...
 
 initIconsForm ()
 
 updateIconsObject ()
 update container icons More...
 
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 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 (&$tabs_gui)
 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 ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. 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 ($column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 @access public More...
 
 cloneWizardPageListObject ()
 @access public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (&$a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI 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...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 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...
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 

Static Public Member Functions

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
 
 $ilias
 
 $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

 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 editInfoObject ()
 Edit extended category settings. More...
 
 updateInfoObject ()
 Update info (extended meta data) More...
 
 initExtendedSettings ()
 build property form for extended category settings More...
 
 setEditTabs ($active_tab="settings_misc")
 
 resetFilterObject ()
 Reset filter (note: this function existed before data table filter has been introduced. More...
 
 applyFilterObject ()
 Apply filter. More...
 
 addUserAutoCompleteObject ()
 Show auto complete results. More...
 
 initTaxSubTabs ($a_active="tax_list")
 
 getTaxonomiesForRefId ()
 
 initTaxonomyForm (array $tax)
 
 editTaxonomySettingsObject ()
 
 getActiveBlocks ()
 
 updateTaxonomySettingsObject ()
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 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 ()
 
 prepareOutput ()
 prepare output More...
 
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

Detailed Description

Member Function Documentation

◆ __buildFilterSelect()

ilObjCategoryGUI::__buildFilterSelect (   $a_parent_ids)

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

1590 {
1591 $action[0] = $this->lng->txt('all_users');
1592 $action[$this->object->getRefId()] = $this->lng->txt('users').
1593 ' ('.ilObject::_lookupTitle(ilObject::_lookupObjId($this->object->getRefId())).')';
1594
1595 foreach($a_parent_ids as $parent)
1596 {
1597 if($parent == $this->object->getRefId())
1598 {
1599 continue;
1600 }
1601 switch($parent)
1602 {
1604 $action[ilLocalUser::_getUserFolderId()] = $this->lng->txt('global_user');
1605
1606 break;
1607
1608 default:
1609 $action[$parent] = $this->lng->txt('users').' ('.ilObject::_lookupTitle(ilObject::_lookupObjId($parent)).')';
1610
1611 break;
1612 }
1613 }
1614 return ilUtil::formSelect($_SESSION['filtered_users'][$this->object->getRefId()],"filter",$action,false,true);
1615 }
$_SESSION["AccountId"]
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.

References $_SESSION, ilLocalUser\_getUserFolderId(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilUtil\formSelect().

+ Here is the call graph for this function:

◆ __checkGlobalRoles()

ilObjCategoryGUI::__checkGlobalRoles (   $new_assigned)

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

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

References $_GET, $_REQUEST, $ilUser, ilObjectGUI\checkPermission(), and ilObjectFactory\getInstanceByObjId().

Referenced by assignSaveObject().

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

◆ __getAssignableRoles()

ilObjCategoryGUI::__getAssignableRoles ( )

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

1326 {
1327 global $rbacreview,$ilUser;
1328
1329 // check local user
1330 $tmp_obj =& ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1331 // Admin => all roles
1332 if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1333 {
1334 $global_roles = $rbacreview->getGlobalRolesArray();
1335 }
1336 elseif($tmp_obj->getTimeLimitOwner() == $this->object->getRefId())
1337 {
1338 $global_roles = $rbacreview->getGlobalAssignableRoles();
1339 }
1340 else
1341 {
1342 $global_roles = array();
1343 }
1344 return $roles = array_merge($global_roles,
1345 $rbacreview->getAssignableChildRoles($this->object->getRefId()));
1346 }

References $_REQUEST, $ilUser, and ilObjectFactory\getInstanceByObjId().

Referenced by assignRolesObject(), and assignSaveObject().

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

◆ __initTableGUI()

& ilObjCategoryGUI::__initTableGUI ( )

Reimplemented from ilObjectGUI.

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

1583 {
1584 include_once "./Services/Table/classes/class.ilTableGUI.php";
1585
1586 return new ilTableGUI(0,false);
1587 }
Class ilTableGUI.

Referenced by __showRolesTable(), and __showUsersTable().

+ Here is the caller graph for this function:

◆ __setTableGUIBasicData()

ilObjCategoryGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $a_from = "",
  $a_footer = true 
)

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

1515 {
1516 global $ilUser;
1517
1518 switch ($a_from)
1519 {
1520 case "listUsersObject":
1521 $tbl->setOrderColumn($_GET["sort_by"]);
1522 $tbl->setOrderDirection($_GET["sort_order"]);
1523 $tbl->setOffset($_GET["offset"]);
1524 $tbl->setMaxCount($this->all_users_count);
1525 $tbl->setLimit($ilUser->getPref('hits_per_page'));
1526 $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1527 $tbl->setData($result_set);
1528 $tbl->disable('auto_sort');
1529
1530 return true;
1531
1532
1533 case "assignRolesObject":
1534 $offset = $_GET["offset"];
1535 // init sort_by (unfortunatly sort_by is preset with 'title'
1536 if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
1537 {
1538 $_GET["sort_by"] = "login";
1539 }
1540 $order = $_GET["sort_by"];
1541 $direction = $_GET["sort_order"];
1542 break;
1543
1544 case "clipboardObject":
1545 $offset = $_GET["offset"];
1546 $order = $_GET["sort_by"];
1547 $direction = $_GET["sort_order"];
1548 $tbl->disable("footer");
1549 break;
1550
1551 default:
1552 $offset = $_GET["offset"];
1553 $order = $_GET["sort_by"];
1554 $direction = $_GET["sort_order"];
1555 break;
1556 }
1557
1558 $tbl->setOrderColumn($order);
1559 $tbl->setOrderDirection($direction);
1560 $tbl->setOffset($offset);
1561 if($this->set_unlimited)
1562 {
1563 $tbl->setLimit($_GET["limit"]*100);
1564 }
1565 else
1566 {
1567 $tbl->setLimit($_GET['limit']);
1568 }
1569 $tbl->setMaxCount(count($result_set));
1570
1571 if($a_footer)
1572 {
1573 $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1574 }
1575 else
1576 {
1577 $tbl->disable('footer');
1578 }
1579 $tbl->setData($result_set);
1580 }
$tbl
Definition: example_048.php:81

References $_GET, $ilUser, and $tbl.

Referenced by __showRolesTable(), and __showUsersTable().

+ Here is the caller graph for this function:

◆ __showRolesTable()

ilObjCategoryGUI::__showRolesTable (   $a_result_set,
  $a_from = "" 
)

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

1394 {
1395 $this->checkPermission("cat_administrate_users");
1396
1397 $tbl =& $this->__initTableGUI();
1398 $tpl =& $tbl->getTemplateObject();
1399
1400 // SET FORMAACTION
1401 $tpl->setCurrentBlock("tbl_form_header");
1402
1403 $this->ctrl->setParameter($this,'obj_id',$_GET['obj_id']);
1404 $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1405 $tpl->parseCurrentBlock();
1406
1407 // SET FOOTER BUTTONS
1408 $tpl->setVariable("COLUMN_COUNTS",4);
1409 $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
1410
1411// $tpl->setCurrentBlock("tbl_action_button");
1412 $tpl->setVariable("BTN_NAME","assignSave");
1413 $tpl->setVariable("BTN_VALUE",$this->lng->txt("change_assignment"));
1414 $tpl->parseCurrentBlock();
1415
1416 $tpl->setCurrentBlock("tbl_action_row");
1417 $tpl->setVariable("TPLPATH",$this->tpl->tplPath);
1418 $tpl->parseCurrentBlock();
1419
1420 $tmp_obj =& ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1421 $title = $this->lng->txt('role_assignment').' ('.$tmp_obj->getFullname().')';
1422
1423 $tbl->setTitle($title,"icon_role.svg",$this->lng->txt("role_assignment"));
1424 $tbl->setHeaderNames(array('',
1425 $this->lng->txt("title"),
1426 $this->lng->txt('description'),
1427 $this->lng->txt("type")));
1428 $tbl->setHeaderVars(array("",
1429 "title",
1430 "description",
1431 "type"),
1432 array("ref_id" => $this->object->getRefId(),
1433 "cmd" => "assignRoles",
1434 "obj_id" => $_GET['obj_id'],
1435 "cmdClass" => "ilobjcategorygui",
1436 "cmdNode" => $_GET["cmdNode"],
1437 "baseClass" => "ilRepositoryGUI")
1438 );
1439 $tbl->setColumnWidth(array("4%","35%","45%","16%"));
1440
1441 $this->set_unlimited = true;
1442 $this->__setTableGUIBasicData($tbl,$a_result_set,$a_from,true);
1443 $tbl->render();
1444
1445 $this->tpl->setVariable("ROLES_TABLE",$tbl->tpl->get());
1446
1447 return true;
1448 }
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="", $a_footer=true)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_GET, $tbl, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), and ilObjectFactory\getInstanceByObjId().

Referenced by assignRolesObject().

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

◆ __showUsersTable()

ilObjCategoryGUI::__showUsersTable (   $a_result_set,
  $a_from = "",
  $a_footer = true 
)

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

1451 {
1452 $this->checkPermission("cat_administrate_users");
1453
1454 $tbl =& $this->__initTableGUI();
1455 $tpl =& $tbl->getTemplateObject();
1456
1457 // SET FORMAACTION
1458 $tpl->setCurrentBlock("tbl_form_header");
1459
1460 $this->ctrl->setParameter($this,'sort_by',$_GET['sort_by']);
1461 $this->ctrl->setParameter($this,'sort_order',$_GET['sort_order']);
1462 $this->ctrl->setParameter($this,'offset',$_GET['offset']);
1463 $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1464 $tpl->parseCurrentBlock();
1465
1466
1467 if($a_footer)
1468 {
1469 // SET FOOTER BUTTONS
1470 $tpl->setVariable("COLUMN_COUNTS",6);
1471 $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
1472
1473 $tpl->setCurrentBlock("tbl_action_button");
1474 $tpl->setVariable("BTN_NAME","deleteUser");
1475 $tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
1476 $tpl->parseCurrentBlock();
1477
1478 $tpl->setCurrentBlock("tbl_action_row");
1479 $tpl->setVariable("TPLPATH",$this->tpl->tplPath);
1480 $tpl->parseCurrentBlock();
1481
1482 $tbl->setFormName('cmd');
1483 $tbl->enable('select_all');
1484 }
1485
1486 $tbl->setTitle($this->lng->txt("users"),"icon_usr.svg",$this->lng->txt("users"));
1487 $tbl->setHeaderNames(array('',
1488 $this->lng->txt("username"),
1489 $this->lng->txt("firstname"),
1490 $this->lng->txt("lastname"),
1491 $this->lng->txt('context'),
1492 $this->lng->txt('role_assignment')));
1493 $tbl->setHeaderVars(array("",
1494 "login",
1495 "firstname",
1496 "lastname",
1497 "context",
1498 "role_assignment"),
1499 array("ref_id" => $this->object->getRefId(),
1500 "cmd" => "listUsers",
1501 "cmdClass" => "ilobjcategorygui",
1502 "cmdNode" => $_GET["cmdNode"]));
1503 $tbl->setColumnWidth(array("1px","20%","20%","20%","20%","20%"));
1504 $tbl->setSelectAllCheckbox('user_ids');
1505
1506 $this->__setTableGUIBasicData($tbl,$a_result_set,$a_from,true);
1507 $tbl->render();
1508
1509 $this->tpl->setVariable("USERS_TABLE",$tbl->tpl->get());
1510
1511 return true;
1512 }

References $_GET, $tbl, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI\checkPermission(), and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ _getImportDir()

ilObjCategoryGUI::_getImportDir ( )

get user import directory name

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

986 {
987 return ilUtil::getDataDir()."/cat_import";
988 }
static getDataDir()
get data directory (outside webspace)

References ilUtil\getDataDir().

Referenced by _importCategories().

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

◆ _goto()

static ilObjCategoryGUI::_goto (   $a_target)
static

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

1618 {
1619 global $ilAccess, $ilErr, $lng;
1620
1621 if ($ilAccess->checkAccess("read", "", $a_target))
1622 {
1624 }
1625 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1626 {
1627 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1630 }
1631
1632 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1633
1634 }
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

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

Referenced by ilObjCategoryReferenceGUI\_goto().

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

◆ _importCategories()

ilObjCategoryGUI::_importCategories (   $a_ref_id,
  $withrol_tmp 
)

import categories (static, also called by RootFolderGUI)

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

1016 {
1017 global $lng;
1018
1019 require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
1020
1021 $import_dir = ilObjCategoryGUI::_getImportDir();
1022
1023 // create user import directory if necessary
1024 if (!@is_dir($import_dir))
1025 {
1026 ilUtil::createDirectory($import_dir);
1027 }
1028
1029 // move uploaded file to user import directory
1030
1031 $file_name = $_FILES["importFile"]["name"];
1032
1033 // added to prevent empty file names
1034 if (!strcmp($file_name,"")) {
1035 ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
1036 $this->ctrl->redirect($this);
1037 }
1038
1039 $parts = pathinfo($file_name);
1040 $full_path = $import_dir."/".$file_name;
1041 ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1042
1043 // unzip file
1044 ilUtil::unzip($full_path);
1045
1046 $subdir = basename($parts["basename"],".".$parts["extension"]);
1047 $xml_file = $import_dir."/".$subdir."/".$subdir.".xml";
1048 // CategoryImportParser
1049 //var_dump($_POST);
1050 $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1051 $importParser->startParsing();
1052
1053 ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1054 $this->ctrl->redirect($this);
1055 }
_getImportDir()
get user import directory name
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static createDirectory($a_dir, $a_mod=0755)
create directory

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

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

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

◆ _importCategoriesForm()

ilObjCategoryGUI::_importCategoriesForm (   $a_ref_id,
$a_tpl 
)

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

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

921 {
922 global $lng, $rbacreview;
923
924 $a_tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.cat_import_form.html",
925 "Modules/Category");
926
927 $a_tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
928
929 $a_tpl->setVariable("TXT_IMPORT_CATEGORIES", $lng->txt("import_categories"));
930 $a_tpl->setVariable("TXT_HIERARCHY_OPTION", $lng->txt("import_cat_localrol"));
931 $a_tpl->setVariable("TXT_IMPORT_FILE", $lng->txt("import_file"));
932 $a_tpl->setVariable("TXT_IMPORT_TABLE", $lng->txt("import_cat_table"));
933
934 $a_tpl->setVariable("BTN_IMPORT", $lng->txt("import"));
935 $a_tpl->setVariable("BTN_CANCEL", $lng->txt("cancel"));
936
937 // NEED TO FILL ADOPT_PERMISSIONS HTML FORM....
938 $parent_role_ids = $rbacreview->getParentRoleIds($a_ref_id,true);
939
940 // sort output for correct color changing
941 ksort($parent_role_ids);
942
943 foreach ($parent_role_ids as $key => $par)
944 {
945 if ($par["obj_id"] != SYSTEM_ROLE_ID)
946 {
947 $check = ilUtil::formCheckbox(0,"adopt[]",$par["obj_id"],1);
948 $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
949 $output["adopt"][$key]["check_adopt"] = $check;
950 $output["adopt"][$key]["role_id"] = $par["obj_id"];
951 $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
952 $output["adopt"][$key]["role_name"] = $par["title"];
953 }
954 }
955
956 //var_dump($output);
957
958 // BEGIN ADOPT PERMISSIONS
959 foreach ($output["adopt"] as $key => $value)
960 {
961 $a_tpl->setCurrentBlock("ADOPT_PERM_ROW");
962 $a_tpl->setVariable("CSS_ROW_ADOPT",$value["css_row_adopt"]);
963 $a_tpl->setVariable("CHECK_ADOPT",$value["check_adopt"]);
964 $a_tpl->setVariable("LABEL_ID",$value["role_id"]);
965 $a_tpl->setVariable("TYPE",$value["type"]);
966 $a_tpl->setVariable("ROLE_NAME",$value["role_name"]);
967 $a_tpl->parseCurrentBlock();
968 }
969 }
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)

References ilObjectGUI\$lng, ilUtil\formCheckbox(), and ilUtil\switchColor().

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

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

◆ addTranslationObject()

ilObjCategoryGUI::addTranslationObject ( )

Add a translation.

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

869 {
870 if($_POST["title"])
871 {
872 $k = max(array_keys($_POST["title"]));
873 $k++;
874 $_POST["title"][$k] = "";
875 $this->editTranslationsObject(true);
876 }
877 else
878 {
879 $this->editTranslationsObject(false, true);
880 }
881 }
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
$_POST['username']
Definition: cron.php:12

References $_POST, and editTranslationsObject().

+ Here is the call graph for this function:

◆ addUserAutoCompleteObject()

ilObjCategoryGUI::addUserAutoCompleteObject ( )
protected

Show auto complete results.

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

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

References $_REQUEST, exit, and ilUserAutoComplete\MAX_ENTRIES.

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

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

381 {
382 global $ilUser, $tree;
383
384 // add default translation
385 $a_new_object->addTranslation($a_new_object->getTitle(),
386 $a_new_object->getDescription(), $ilUser->getPref("language"), true);
387
388 // default: sort by title
389 include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
390 $settings = new ilContainerSortingSettings($a_new_object->getId());
391 $settings->setSortMode(ilContainer::SORT_TITLE);
392 $settings->save();
393
394 // inherit parents content style, if not individual
395 $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
396 $parent_id = ilObject::_lookupObjId($parent_ref_id);
397 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
398 $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
399 if ($style_id > 0)
400 {
402 {
403 ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
404 }
405 }
406
407 // always send a message
408 ilUtil::sendSuccess($this->lng->txt("cat_added"),true);
409 $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
410 $this->redirectToRefId($a_new_object->getRefId(), "");
411 }
static lookupObjectStyle($a_obj_id)
Lookup object style.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
_lookupStandard($a_id)
Lookup standard flag.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
getRefId()
get reference id @access public
getDescription()
get object description
getId()
get object id @access public
getTitle()
get object title @access public

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

+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjCategoryGUI::applyFilterObject ( )
protected

Apply filter.

Returns

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

1077 {
1078 global $ilTabs;
1079
1080 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1081 $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1082 $utab->resetOffset();
1083 $utab->writeFilterToSession();
1084 $this->listUsersObject();
1085 }
listUsersObject($show_delete=false)
TableGUI class for user administration.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

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

1220 {
1221 global $rbacreview,$ilTabs;
1222
1223 $this->checkPermission("cat_administrate_users");
1224
1225 include_once './Services/User/classes/class.ilLocalUser.php';
1226
1227 if(!isset($_GET['obj_id']))
1228 {
1229 ilUtil::sendFailure('no_user_selected');
1230 $this->listUsersObject();
1231
1232 return true;
1233 }
1234
1235 $ilTabs->clearTargets();
1236 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
1237 global $ilHelp;
1238 $ilHelp->setScreenIdComponent("cat");
1239 $ilHelp->setScreenId("administrate_user");
1240 $ilHelp->setSubScreenId("assign_roles");
1241
1242
1243 $roles = $this->__getAssignableRoles();
1244
1245 if(!count($roles))
1246 {
1247 #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1248 #$this->listUsersObject();
1249
1250 #return true;
1251 }
1252
1253 $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.cat_role_assignment.html',
1254 "Modules/Category");
1255
1256 $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1257
1258 $counter = 0;
1259 foreach($roles as $role)
1260 {
1261 $role_obj =& ilObjectFactory::getInstanceByObjId($role['obj_id']);
1262
1263 $disabled = false;
1264 $f_result[$counter][] = ilUtil::formCheckbox(in_array($role['obj_id'],$ass_roles) ? 1 : 0,
1265 'role_ids[]',
1266 $role['obj_id'],
1267 $disabled);
1268 $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1269 $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1270 $f_result[$counter][] = $role['role_type'] == 'global' ?
1271 $this->lng->txt('global') :
1272 $this->lng->txt('local');
1273
1274 unset($role_obj);
1275 ++$counter;
1276 }
1277 $this->__showRolesTable($f_result,"assignRolesObject");
1278 }
__showRolesTable($a_result_set, $a_from="")

References $_GET, __getAssignableRoles(), __showRolesTable(), ilObjectGUI\checkPermission(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), listUsersObject(), and ilUtil\sendFailure().

Referenced by assignSaveObject().

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

◆ assignSaveObject()

ilObjCategoryGUI::assignSaveObject ( )

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

1281 {
1282 global $rbacreview,$rbacadmin;
1283 $this->checkPermission("cat_administrate_users");
1284
1285 include_once './Services/User/classes/class.ilLocalUser.php';
1286 // check hack
1287 if(!isset($_GET['obj_id']) or !in_array($_REQUEST['obj_id'],ilLocalUser::_getAllUserIds()))
1288 {
1289 ilUtil::sendFailure('no_user_selected');
1290 $this->listUsersObject();
1291
1292 return true;
1293 }
1294 $roles = $this->__getAssignableRoles();
1295
1296 // check minimum one global role
1297 if(!$this->__checkGlobalRoles($_POST['role_ids']))
1298 {
1299 ilUtil::sendFailure($this->lng->txt('no_global_role_left'));
1300 $this->assignRolesObject();
1301
1302 return false;
1303 }
1304
1305 $new_role_ids = $_POST['role_ids'] ? $_POST['role_ids'] : array();
1306 $assigned_roles = $rbacreview->assignedRoles((int) $_REQUEST['obj_id']);
1307 foreach($roles as $role)
1308 {
1309 if(in_array($role['obj_id'],$new_role_ids) and !in_array($role['obj_id'],$assigned_roles))
1310 {
1311 $rbacadmin->assignUser($role['obj_id'],(int) $_REQUEST['obj_id']);
1312 }
1313 if(in_array($role['obj_id'],$assigned_roles) and !in_array($role['obj_id'],$new_role_ids))
1314 {
1315 $rbacadmin->deassignUser($role['obj_id'],(int) $_REQUEST['obj_id']);
1316 }
1317 }
1318 ilUtil::sendSuccess($this->lng->txt('role_assignment_updated'));
1319 $this->assignRolesObject();
1320
1321 return true;
1322 }
_getAllUserIds($a_filter=0)
__checkGlobalRoles($new_assigned)

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

+ Here is the call graph for this function:

◆ deleteTranslationsObject()

ilObjCategoryGUI::deleteTranslationsObject ( )

Remove translation.

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

887 {
888 foreach($_POST["title"] as $k => $v)
889 {
890 if ($_POST["check"][$k])
891 {
892 // default translation cannot be deleted
893 if($k != $_POST["default"])
894 {
895 unset($_POST["title"][$k]);
896 unset($_POST["desc"][$k]);
897 unset($_POST["lang"][$k]);
898 }
899 else
900 {
901 ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
902 return $this->editTranslationsObject();
903 }
904 }
905 }
906 $this->saveTranslationsObject();
907 }
saveTranslationsObject()
Save title and translations.

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

+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

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

1189 {
1190 $this->checkPermission("cat_administrate_users");
1191 if(!count($_POST['id']))
1192 {
1193 ilUtil::sendFailure($this->lng->txt('no_users_selected'));
1194 $this->listUsersObject();
1195
1196 return true;
1197 }
1198
1199 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
1200 $confirm = new ilConfirmationGUI();
1201 $confirm->setFormAction($this->ctrl->getFormAction($this));
1202 $confirm->setHeaderText($this->lng->txt('sure_delete_selected_users'));
1203 $confirm->setConfirm($this->lng->txt('delete'), 'performDeleteUsers');
1204 $confirm->setCancel($this->lng->txt('cancel'), 'listUsers');
1205
1206 foreach($_POST['id'] as $user)
1207 {
1208 $name = ilObjUser::_lookupName($user);
1209
1210 $confirm->addItem(
1211 'user_ids[]',
1212 $user,
1213 $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']'
1214 );
1215 }
1216 $this->tpl->setContent($confirm->getHTML());
1217 }
Confirmation screen class.
static _lookupName($a_user_id)
lookup user name

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

+ Here is the call graph for this function:

◆ editIconsObject()

ilObjCategoryGUI::editIconsObject (   $a_form = null)

Edit folder icons.

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

1645 {
1646 global $tpl;
1647
1648 $this->checkPermission('write');
1649
1650 $this->tabs_gui->setTabActive('settings');
1651
1652 if(!$a_form)
1653 {
1654 $a_form = $this->initIconsForm();
1655 }
1656
1657 $tpl->setContent($a_form->getHTML());
1658 }

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

Referenced by updateIconsObject().

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

◆ editInfoObject()

ilObjCategoryGUI::editInfoObject ( )
protected

Edit extended category settings.

@access protected

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

495 {
496 $this->checkPermission("write");
497 $this->setEditTabs();
498 $this->tabs_gui->activateTab('settings');
499 $this->tabs_gui->setSubTabActive('edit_cat_settings');
500
501 $this->initExtendedSettings();
502 $this->tpl->setContent($this->form->getHTML());
503 }
initExtendedSettings()
build property form for extended category settings
setEditTabs($active_tab="settings_misc")

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

Referenced by updateInfoObject().

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

◆ editTaxonomySettingsObject()

ilObjCategoryGUI::editTaxonomySettingsObject ( )
protected

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

1794 {
1795 $this->initTaxSubTabs("tax_settings");
1796
1797 $taxonomies = $this->getTaxonomiesForRefId();
1798 if(!sizeof($taxonomies))
1799 {
1800 ilUtil::sendFailure($this->lng->txt("cntr_tax_none_available"));
1801 return;
1802 }
1803
1804 $form = $this->initTaxonomyForm($taxonomies);
1805 $this->tpl->setContent($form->getHTML());
1806 }
initTaxSubTabs($a_active="tax_list")

References getTaxonomiesForRefId(), initTaxonomyForm(), initTaxSubTabs(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ editTranslationsObject()

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

Edit title and translations.

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

770 {
771 global $tpl;
772
773 $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
774
775
776 $this->lng->loadLanguageModule($this->object->getType());
777 $this->setEditTabs("settings_trans");
778
779 include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
780 $table = new ilObjectTranslationTableGUI($this, "editTranslations", true,
781 "Translation");
782 if ($a_get_post_values)
783 {
784 $vals = array();
785 foreach($_POST["title"] as $k => $v)
786 {
787 $vals[] = array("title" => $v,
788 "desc" => $_POST["desc"][$k],
789 "lang" => $_POST["lang"][$k],
790 "default" => ($_POST["default"] == $k));
791 }
792 $table->setData($vals);
793 }
794 else
795 {
796 $data = $this->object->getTranslations();
797 foreach($data["Fobject"] as $k => $v)
798 {
799 $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
800 }
801 if($a_add)
802 {
803 $data["Fobject"][++$k]["title"] = "";
804 }
805 $table->setData($data["Fobject"]);
806 }
807 $tpl->setContent($table->getHTML());
808 }
TableGUI class for title/description translations.

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

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

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

◆ executeCommand()

& ilObjCategoryGUI::executeCommand ( )

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

Reimplemented from ilContainerGUI.

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

55 {
56 global $rbacsystem, $ilNavigationHistory, $ilAccess, $ilCtrl,$ilTabs;
57
58 $next_class = $this->ctrl->getNextClass($this);
59 $cmd = $this->ctrl->getCmd();
60
61 // show repository tree
62 $this->showRepTree();
63
64 switch($next_class)
65 {
66 case "ilobjusergui":
67 include_once('./Services/User/classes/class.ilObjUserGUI.php');
68
69 $this->tabs_gui->setTabActive('administrate_users');
70 if(!$_GET['obj_id'])
71 {
72 $this->gui_obj = new ilObjUserGUI("",$_GET['ref_id'],true, false);
73 $this->gui_obj->setCreationMode($this->creation_mode);
74 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
75 }
76 else
77 {
78 $this->gui_obj = new ilObjUserGUI("", $_GET['obj_id'],false, false);
79 $this->gui_obj->setCreationMode($this->creation_mode);
80 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
81 }
82
83 $ilTabs->clearTargets();
84 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
85 global $ilHelp;
86 $ilHelp->setScreenIdComponent("cat");
87 $ilHelp->setScreenId("administrate_user");
88 $ilHelp->setSubScreenId($ilCtrl->getCmd());
89 break;
90
91 case "ilobjuserfoldergui":
92 include_once('./Services/User/classes/class.ilObjUserFolderGUI.php');
93
94 $this->gui_obj = new ilObjUserFolderGUI("",(int) $_GET['ref_id'],true, false);
95 $this->gui_obj->setUserOwnerId((int) $_GET['ref_id']);
96 $this->gui_obj->setCreationMode($this->creation_mode);
97 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
98
99 $ilTabs->clearTargets();
100 $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
101 global $ilHelp;
102 $ilHelp->setScreenIdComponent("cat");
103 $ilHelp->setScreenId("administrate_user");
104 $ilHelp->setSubScreenId($ilCtrl->getCmd());
105 break;
106
107 case "ilcolumngui":
108 $this->checkPermission("read");
109 $this->prepareOutput();
110 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
111 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
112 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
113 $this->renderObject();
114 break;
115
116 case 'ilpermissiongui':
117 $this->prepareOutput();
118 $this->tabs_gui->setTabActive('perm_settings');
119 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
120 $perm_gui =& new ilPermissionGUI($this);
121 $ret =& $this->ctrl->forwardCommand($perm_gui);
122 break;
123
124 case 'ilinfoscreengui':
125 if ($this->info_screen_enabled)
126 {
127 $this->prepareOutput();
128 $this->infoScreen();
129 }
130 break;
131
132 case 'ilcontainerlinklistgui':
133 include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
134 $link_list_gui =& new ilContainerLinkListGUI();
135 $ret =& $this->ctrl->forwardCommand($link_list_gui);
136 break;
137
138 // container page editing
139 case "ilcontainerpagegui":
140 $this->prepareOutput(false);
141 $ret = $this->forwardToPageObject();
142 if ($ret != "")
143 {
144 $this->tpl->setContent($ret);
145 }
146 break;
147
148 case 'ilobjectcopygui':
149 $this->prepareOutput();
150
151 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
152 $cp = new ilObjectCopyGUI($this);
153 $cp->setType('cat');
154 $this->ctrl->forwardCommand($cp);
155 break;
156
157 case "ilobjstylesheetgui":
158 $this->forwardToStyleSheet();
159 break;
160
161 case 'ilusertablegui':
162 include_once './Services/User/classes/class.ilUserTableGUI.php';
163 $u_table = new ilUserTableGUI($this, "listUsers");
164 $u_table->initFilter();
165 $this->ctrl->setReturn($this,'listUsers');
166 $this->ctrl->forwardCommand($u_table);
167 break;
168
169 case "ilcommonactiondispatchergui":
170 $this->prepareOutput();
171 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
173 $this->ctrl->forwardCommand($gui);
174 break;
175
176 case 'ildidactictemplategui':
177 $this->ctrl->setReturn($this,'edit');
178 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
179 $did = new ilDidacticTemplateGUI($this);
180 $this->ctrl->forwardCommand($did);
181 break;
182
183 case 'ilexportgui':
184 $this->prepareOutput();
185 $this->tabs_gui->setTabActive('export');
186 include_once './Services/Export/classes/class.ilExportGUI.php';
187 $exp = new ilExportGUI($this);
188 $exp->addFormat('xml');
189 $this->ctrl->forwardCommand($exp);
190 break;
191
192 case 'ilobjecttranslationgui':
193 $this->checkPermissionBool("write");
194 $this->prepareOutput();
195 //$this->tabs_gui->setTabActive('export');
196 $this->setEditTabs("settings_trans");
197 include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
198 $transgui = new ilObjectTranslationGUI($this);
199 $this->ctrl->forwardCommand($transgui);
200 break;
201
202 case 'ilobjtaxonomygui':
203 $this->checkPermissionBool("write");
204 $this->prepareOutput();
205 $this->initTaxSubTabs();
206 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
207 $tax = new ilObjTaxonomyGUI();
208 $tax->setAssignedObject($this->object->getId());
209 $tax->setMultiple(true);
210 $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
211 $this->ctrl->forwardCommand($tax);
212 break;
213
214 case 'ilobjectmetadatagui';
215 $this->checkPermissionBool("write");
216 $this->prepareOutput();
217 $this->tabs_gui->activateTab('meta_data');
218 include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
219 $md_gui = new ilObjectMetaDataGUI($this->object);
220 $this->ctrl->forwardCommand($md_gui);
221 break;
222
223 default:
224 if ($cmd == "infoScreen")
225 {
226 $this->checkPermission("visible");
227 }
228 else
229 {
230 $this->checkPermission("read");
231 }
232
233 // add entry to navigation history
234 if (!$this->getCreationMode() &&
235 $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
236 {
237 include_once("./Services/Link/classes/class.ilLink.php");
238 $ilNavigationHistory->addItem($_GET["ref_id"],
239 ilLink::_getLink($_GET["ref_id"], "cat"), "cat");
240 }
241
242 $this->prepareOutput();
243 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
244 if (is_object($this->object))
245 {
246 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
247 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
248 }
249
250 if(!$cmd)
251 {
252 $cmd = "render";
253 }
254 $cmd .= "Object";
255 $this->$cmd();
256
257 break;
258 }
259
260 $this->addHeaderAction();
261
262 return true;
263 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
forwardToStyleSheet()
Forward to style object.
Class ilContainerLinkListGUI.
GUI class for didactic template settings inside repository objects.
Export User Interface Class.
infoScreen()
show information screen
renderObject()
Render category.
getContentStylePath($a_style_id)
get content style path
Taxonomy GUI class.
Class ilObjUserFolderGUI.
Class ilObjUserGUI.
GUI class for the workflow of copying objects.
prepareOutput()
prepare output
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
addHeaderAction()
Add header action menu.
Class ilObjectMetaDataGUI.
GUI class for object translation handling.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
global $ilCtrl
Definition: ilias.php:18
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $ilCtrl, $ret, ilLink\_getLink(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), initTaxSubTabs(), ilObjectGUI\prepareOutput(), renderObject(), setEditTabs(), and ilContainerGUI\showRepTree().

+ Here is the call graph for this function:

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

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

1809 {
1810 $res = array();
1811
1813
1814 foreach(ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value)
1815 {
1816 if(substr($keyword, 0, strlen($prefix)) == $prefix && (bool)$value)
1817 {
1818 $res[] = substr($keyword, strlen($prefix));
1819 }
1820 }
1821
1822 return $res;
1823 }
static _getContainerSettings($a_id)

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

Referenced by initTaxonomyForm().

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

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )

Get values for edit form.

Returns
array

Reimplemented from ilContainerGUI.

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

677 {
678 // values are set in initEditForm()
679 }

◆ getTabs()

ilObjCategoryGUI::getTabs ( $tabs_gui)

Get tabs.

Reimplemented from ilContainerGUI.

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

269 {
270 global $rbacsystem, $lng, $ilHelp, $ilAccess;
271
272 if ($this->ctrl->getCmd() == "editPageContent")
273 {
274 return;
275 }
276 #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
277
278 $ilHelp->setScreenIdComponent("cat");
279
280 if ($rbacsystem->checkAccess('read',$this->ref_id))
281 {
282 $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "render")
283 ? true
284 : false;
285 $tabs_gui->addTab("view_content", $lng->txt("content"),
286 $this->ctrl->getLinkTarget($this, ""));
287
288 //BEGIN ChangeEvent add info tab to category object
289 if ($this->info_screen_enabled)
290 {
291 $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
292 || strtolower($_GET["cmdClass"]) == "ilnotegui")
293 ? true
294 : false;
295 $tabs_gui->addTarget("info_short",
296 $this->ctrl->getLinkTargetByClass(
297 array("ilobjcategorygui", "ilinfoscreengui"), "showSummary"),
298 array("showSummary","", "infoScreen"),
299 "", "", $force_active);
300 }
301 //END ChangeEvent add info tab to category object
302 }
303
304 if ($rbacsystem->checkAccess('write',$this->ref_id))
305 {
306 $force_active = ($_GET["cmd"] == "edit")
307 ? true
308 : false;
309 $tabs_gui->addTarget("settings",
310 $this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this)
311 , "", $force_active);
312
313 // metadata
314 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
315 $mdgui = new ilObjectMetaDataGUI($this->object);
316 $mdtab = $mdgui->getTab();
317 if($mdtab)
318 {
319 $tabs_gui->addTab("meta_data",
320 $this->lng->txt("meta_data"),
321 $mdtab);
322 }
323
324 include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
326 $this->object->getId(),
328 false
329 ))
330 {
331 $tabs_gui->addTarget("obj_tool_setting_taxonomies",
332 $this->ctrl->getLinkTarget($this, "editTaxonomySettings"), "editTaxonomySettings", get_class($this));
333 }
334 }
335
336 include_once './Services/User/classes/class.ilUserAccountSettings.php';
337 if(
338 ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() and
339 $rbacsystem->checkAccess('cat_administrate_users',$this->ref_id))
340 {
341 $tabs_gui->addTarget("administrate_users",
342 $this->ctrl->getLinkTarget($this, "listUsers"), "listUsers", get_class($this));
343 }
344
345 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
346 {
347 $tabs_gui->addTarget(
348 'export',
349 $this->ctrl->getLinkTargetByClass('ilexportgui',''),
350 'export',
351 'ilexportgui'
352 );
353 }
354
355 // parent tabs (all container: edit_permission, clipboard, trash
356 parent::getTabs($tabs_gui);
357
358 }
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
static getInstance()
Singelton get instance.

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

+ Here is the call graph for this function:

◆ getTaxonomiesForRefId()

ilObjCategoryGUI::getTaxonomiesForRefId ( )
protected

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

1724 {
1725 global $tree;
1726
1727 include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1728 include_once "Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1729
1730 // see ilTaxMDGUI::getSelectableTaxonomies()
1731
1732 $res = array();
1733 foreach($tree->getPathFull($this->object->getRefId()) as $node)
1734 {
1735 // find all defined taxes for parent node, activation is not relevant
1736 $node_taxes = ilObjTaxonomy::getUsageOfObject($node["obj_id"], true);
1737 if(sizeof($node_taxes))
1738 {
1739 foreach($node_taxes as $node_tax)
1740 {
1741 $res[$node_tax["tax_id"]] = array(
1742 "title" => $node_tax["title"]
1743 ,"source" => $node["child"]
1744 );
1745 }
1746 }
1747 }
1748
1749 asort($res);
1750 return $res;
1751 }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.

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

Referenced by editTaxonomySettingsObject(), and updateTaxonomySettingsObject().

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

◆ ilObjCategoryGUI()

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

Constructor @access public.

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

32 {
33 //global $ilCtrl;
34
35 // CONTROL OPTIONS
36 //$this->ctrl =& $ilCtrl;
37 //$this->ctrl->saveParameter($this,array("ref_id","cmdClass"));
38 $GLOBALS['lng']->loadLanguageModule('cat');
39
40 $this->type = "cat";
41 $this->ilContainerGUI($a_data,(int) $a_id,$a_call_by_reference,false);
42
43 if (is_object($this->object))
44 {
45 include_once("./Services/Container/classes/class.ilContainer.php");
46 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
47 $this->info_screen_enabled = ilContainer::_lookupContainerSetting(
48 $this->object->getId(),
50 true);
51 }
52 }
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

References $GLOBALS, ilContainer\_lookupContainerSetting(), ilContainerGUI\ilContainerGUI(), and ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY.

+ Here is the call graph for this function:

◆ importCancelledObject()

ilObjCategoryGUI::importCancelledObject ( )

import cancelled

@access private

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

978 {
979 $this->ctrl->redirect($this);
980 }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

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

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

References _importCategoriesForm().

+ Here is the call graph for this function:

◆ importCategoriesObject()

ilObjCategoryGUI::importCategoriesObject ( )

import categories

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

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

References $_GET, and _importCategories().

+ Here is the call graph for this function:

◆ importCategoriesWithRolObject()

ilObjCategoryGUI::importCategoriesWithRolObject ( )

import categories with local rol

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

1004 {
1005
1006 //echo "entra aqui";
1007 // call to importCategories with $withrol = 1
1009 }

References $_GET, and _importCategories().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjCategoryGUI::infoScreen ( )

show information screen

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

429 {
430 global $ilAccess, $ilCtrl;
431
432 if (!$ilAccess->checkAccess("visible", "", $this->ref_id))
433 {
434 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
435 }
436
437 if (!$this->info_screen_enabled)
438 {
439 return;
440 }
441
442 // #10986
443 $this->tabs_gui->setTabActive('info_short');
444
445 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
446 $info = new ilInfoScreenGUI($this);
447
448 $info->enablePrivateNotes();
449
450 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
451 {
452 $info->enableNews();
453 }
454
455 // no news editing for files, just notifications
456 $info->enableNewsEditing(false);
457 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
458 {
459 $news_set = new ilSetting("news");
460 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
461
462 if ($enable_internal_rss)
463 {
464 $info->setBlockProperty("news", "settings", true);
465 $info->setBlockProperty("news", "public_notifications_option", true);
466 }
467 }
468
469 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
470 $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO,'cat',$this->object->getId());
471 $record_gui->setInfoObject($info);
472 $record_gui->parse();
473
474
475 // standard meta data
476 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
477
478 // forward the command
479 if ($ilCtrl->getNextClass() == "ilinfoscreengui")
480 {
481 $ilCtrl->forwardCommand($info);
482 }
483 else
484 {
485 return $ilCtrl->getHTML($info);
486 }
487 }
Class ilInfoScreenGUI.
ILIAS Setting Class.
$info
Definition: example_052.php:80
redirection script todo: (a better solution should control the processing via a xml file)

References $_GET, $ilCtrl, $info, and ilAdvancedMDRecordGUI\MODE_INFO.

Referenced by executeCommand(), and infoScreenObject().

+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjCategoryGUI::infoScreenObject ( )

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

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

419 {
420 $this->ctrl->setCmd("showSummary");
421 $this->ctrl->setCmdClass("ilinfoscreengui");
422 $this->infoScreen();
423 }

References infoScreen().

+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

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

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObjectGUI.

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

374 {
375 $forms = parent::initCreationForms($a_new_type);
376 //unset($forms[self::CFORM_IMPORT]);
377 return $forms;
378 }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

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

588 {
589 $this->lng->loadLanguageModule($this->object->getType());
590 $this->setEditTabs();
591
592 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
593 $form = new ilPropertyFormGUI();
594 $form->setFormAction($this->ctrl->getFormAction($this));
595 $form->setTitle($this->lng->txt($this->object->getType()."_edit"));
596
597 // title/description
598
599 $trans = $this->object->getTranslations();
600 $def = $trans["Fobject"][0]; // default
601
602 $title = new ilTextInputGUI($this->lng->txt("title"), "title");
603 $title->setRequired(true);
604 $title->setSize(min(40, ilObject::TITLE_LENGTH));
605 $title->setMaxLength(ilObject::TITLE_LENGTH);
606 $title->setValue($def["title"]);
607 $form->addItem($title);
608
609 if(sizeof($trans["Fobject"]) > 1)
610 {
611 include_once('Services/MetaData/classes/class.ilMDLanguageItem.php');
612 $languages = ilMDLanguageItem::_getLanguages();
613
614 $title->setInfo($this->lng->txt("language").": ".$languages[$def["lang"]].
615 ' <a href="'.$this->ctrl->getLinkTarget($this, "editTranslations").
616 '">&raquo; '.$this->lng->txt("cat_more_translations").'</a>');
617
618 unset($languages);
619 }
620
621 $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
622 $desc->setRows(2);
623 $desc->setCols(40);
624 $desc->setValue($def["desc"]);
625 $form->addItem($desc);
626
627 // Show didactic template type
628 $this->initDidacticTemplate($form);
629
630 // presentation
631 $pres = new ilFormSectionHeaderGUI();
632 $pres->setTitle($this->lng->txt('obj_presentation'));
633 $form->addItem($pres);
634
635
636 $form = $this->initSortingForm(
637 $form,
638 array(
642 )
643 );
644
645 // icon settings
646// $this->showCustomIconsEditing(1, $form, false);
647
648 // Edit ecs export settings
649 include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
650 $ecs = new ilECSCategorySettings($this->object);
651 $ecs->addSettingsToForm($form, 'cat');
652
653 // services
654 $sh = new ilFormSectionHeaderGUI();
655 $sh->setTitle($this->lng->txt('obj_features'));
656 $form->addItem($sh);
657
658 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
660 $this->object->getId(),
661 $form,
662 array(
667 )
668 );
669
670 $form->addCommandButton("update", $this->lng->txt("save"));
671// $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
672
673 return $form;
674 }
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
Class ilECSCategorySettings.
This class represents a section header in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilMDLanguageItem\_getLanguages(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, setEditTabs(), ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjectServiceSettingsGUI\TAXONOMIES, and ilObject\TITLE_LENGTH.

Referenced by updateObject().

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

◆ initExtendedSettings()

ilObjCategoryGUI::initExtendedSettings ( )
protected

build property form for extended category settings

@access protected

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

538 {
539 if(is_object($this->form))
540 {
541 return true;
542 }
543
544 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
545 $this->form = new ilPropertyFormGUI();
546 $this->form->setFormAction($this->ctrl->getFormAction($this));
547 $this->form->setTitle($this->lng->txt('ext_cat_settings'));
548 $this->form->addCommandButton('updateInfo',$this->lng->txt('save'));
549 $this->form->addCommandButton('editInfo',$this->lng->txt('cancel'));
550
551 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
552 $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'cat',$this->object->getId());
553 $this->record_gui->setPropertyForm($this->form);
554 $this->record_gui->parse();
555
556 return true;
557 }

References ilAdvancedMDRecordGUI\MODE_EDITOR.

Referenced by editInfoObject(), and updateInfoObject().

+ Here is the caller graph for this function:

◆ initIconsForm()

ilObjCategoryGUI::initIconsForm ( )

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

1661 {
1662 $this->setEditTabs("icons");
1663
1664 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
1665 $form = new ilPropertyFormGUI();
1666 $form->setFormAction($this->ctrl->getFormAction($this));
1667
1668 $this->showCustomIconsEditing(1, $form);
1669
1670 // $form->setTitle($this->lng->txt('edit_grouping'));
1671 $form->addCommandButton('updateIcons', $this->lng->txt('save'));
1672
1673 return $form;
1674 }
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container

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

Referenced by editIconsObject(), and updateIconsObject().

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

◆ initTaxonomyForm()

ilObjCategoryGUI::initTaxonomyForm ( array  $tax)
protected

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

1754 {
1755 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1756 $form = new ilPropertyFormGUI();
1757 $form->setFormAction($this->ctrl->getFormAction($this), "editTaxonomySettings");
1758 $form->setTitle($this->lng->txt("cntr_taxonomy_sideblock_settings"));
1759
1760 $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
1761 $form->addItem($block);
1762
1763 $current = $this->getActiveBlocks();
1764
1765 foreach($tax as $tax_id => $tax_item)
1766 {
1767 $option = new ilCheckboxOption($tax_item["title"], $tax_id,
1769
1770 if($tax_item["source"] != $this->object->getRefId())
1771 {
1772 $loc = new ilLocatorGUI();
1773 $loc->setTextOnly(true);
1774 $loc->addRepositoryItems($tax_item["source"]);
1775 $option->setInfo($loc->getHTML());
1776 }
1777
1778 $block->addOption($option);
1779
1780 if(in_array($tax_id, $current))
1781 {
1782 $value[] = $tax_id;
1783 }
1784 }
1785
1786 $block->setValue($value);
1787
1788 $form->addCommandButton("updateTaxonomySettings", $this->lng->txt("save"));
1789
1790 return $form;
1791 }
This class represents a property in a property form.
This class represents an option in a checkbox group.
locator handling class
static _lookupDescription($a_id)
lookup object description

References ilObject\_lookupDescription(), and getActiveBlocks().

Referenced by editTaxonomySettingsObject(), and updateTaxonomySettingsObject().

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

1714 {
1715 $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1716 $this->tabs_gui->addSubTab("tax_settings", $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1717 $this->ctrl->getLinkTarget($this, "editTaxonomySettings"));
1718 $this->tabs_gui->addSubTab("tax_list", $this->lng->txt("cntr_taxonomy_definitions"),
1719 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", ""));
1720 $this->tabs_gui->activateSubTab($a_active);
1721 }

Referenced by editTaxonomySettingsObject(), and executeCommand().

+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

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

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

References $ilUser, ilUserTableGUI\MODE_LOCAL_USER, and ilUtil\sendInfo().

Referenced by applyFilterObject(), assignRolesObject(), assignSaveObject(), deleteUsersObject(), performDeleteUsersObject(), and resetFilterObject().

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

◆ performDeleteUsersObject()

ilObjCategoryGUI::performDeleteUsersObject ( )

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

1166 {
1167 include_once './Services/User/classes/class.ilLocalUser.php';
1168 $this->checkPermission("cat_administrate_users");
1169
1170 foreach($_POST['user_ids'] as $user_id)
1171 {
1172 if(!in_array($user_id,ilLocalUser::_getAllUserIds($this->object->getRefId())))
1173 {
1174 die('user id not valid');
1175 }
1176 if(!$tmp_obj =& ilObjectFactory::getInstanceByObjId($user_id,false))
1177 {
1178 continue;
1179 }
1180 $tmp_obj->delete();
1181 }
1182 ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1183 $this->listUsersObject();
1184
1185 return true;
1186 }

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

+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

Reimplemented from ilContainerGUI.

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

364 {
365 global $ilTabs;
366
367 $ilTabs->activateTab("view_content");
368 $ret = parent::renderObject();
369 return $ret;
370
371 }

References $ret.

Referenced by executeCommand().

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

1062 {
1063 include_once("./Services/User/classes/class.ilUserTableGUI.php");
1064 $utab = new ilUserTableGUI($this, "listUsers",ilUserTableGUI::MODE_LOCAL_USER);
1065 $utab->resetOffset();
1066 $utab->resetFilter();
1067
1068 // from "old" implementation
1069 $this->listUsersObject();
1070 }

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

+ Here is the call graph for this function:

◆ saveTranslationsObject()

ilObjCategoryGUI::saveTranslationsObject ( )

Save title and translations.

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

814 {
815 if (!$this->checkPermissionBool("write"))
816 {
817 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
818 }
819
820 // default language set?
821 if (!isset($_POST["default"]))
822 {
823 ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
824 return $this->editTranslationsObject(true);
825 }
826
827 // all languages set?
828 if (array_key_exists("",$_POST["lang"]))
829 {
830 ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
831 return $this->editTranslationsObject(true);
832 }
833
834 // no single language is selected more than once?
835 if (count(array_unique($_POST["lang"])) < count($_POST["lang"]))
836 {
837 ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
838 return $this->editTranslationsObject(true);
839 }
840
841 // save the stuff
842 $this->object->removeTranslations();
843 foreach($_POST["title"] as $k => $v)
844 {
845 // update object data if default
846 $is_default = ($_POST["default"] == $k);
847 if($is_default)
848 {
849 $this->object->setTitle(ilUtil::stripSlashes($v));
850 $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
851 $this->object->update();
852 }
853
854 $this->object->addTranslation(
856 ilUtil::stripSlashes($_POST["desc"][$k]),
857 ilUtil::stripSlashes($_POST["lang"][$k]),
858 $is_default);
859 }
860
861 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
862 $this->ctrl->redirect($this, "editTranslations");
863 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

Referenced by deleteTranslationsObject().

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

560 {
561 global $ilSetting, $ilTabs;
562
563 $this->tabs_gui->addSubTab("settings_misc",
564 $this->lng->txt("settings"),
565 $this->ctrl->getLinkTarget($this, "edit"));
566
567 /*$this->tabs_gui->addSubTab("settings_trans",
568 $this->lng->txt("title_and_translations"),
569 $this->ctrl->getLinkTarget($this, "editTranslations"));*/
570
571 $this->tabs_gui->addSubTab("settings_trans",
572 $this->lng->txt("obj_multilinguality"),
573 $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
574
575 // custom icon
576 if ($ilSetting->get("custom_icons"))
577 {
578 $this->tabs_gui->addSubTab("icons",
579 $this->lng->txt("icon_settings"),
580 $this->ctrl->getLinkTarget($this,'editIcons'));
581 }
582
583 $this->tabs_gui->activateTab("settings");
584 $this->tabs_gui->activateSubTab($active_tab);
585 }
global $ilSetting
Definition: privfeed.php:40

References $ilSetting.

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

+ Here is the caller graph for this function:

◆ updateIconsObject()

ilObjCategoryGUI::updateIconsObject ( )

update container icons

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

1680 {
1681 global $ilSetting;
1682
1683 $this->checkPermission('write');
1684
1685 $form = $this->initIconsForm();
1686 if($form->checkInput())
1687 {
1688 //save custom icons
1689 if ($ilSetting->get("custom_icons"))
1690 {
1691 if($_POST["cont_icon_delete"])
1692 {
1693 $this->object->removeCustomIcon();
1694 }
1695 $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
1696 }
1697 if ($_FILES["cont_icon"]['tmp_name'] || $_POST["cont_icon_delete"])
1698 {
1699 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
1700 }
1701 $this->ctrl->redirect($this,"editIcons");
1702 }
1703
1704 $form->setValuesByPost();
1705 $this->editIconsObject($form);
1706 }
editIconsObject($a_form=null)
Edit folder icons.

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

+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjCategoryGUI::updateInfoObject ( )
protected

Update info (extended meta data)

@access protected

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

511 {
512 $this->checkPermission("write");
513
514 // init form
515 $this->initExtendedSettings();
516
517 // still needed for date conversion and so on
518 $this->form->checkInput();
519
520 if($this->record_gui->importEditFormPostValues())
521 {
522 $this->record_gui->writeEditForm();
523
524 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
525 $this->ctrl->redirect($this, "editInfo");
526 }
527
528 $this->editInfoObject();
529 }
editInfoObject()
Edit extended category settings.

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

+ Here is the call graph for this function:

◆ updateObject()

ilObjCategoryGUI::updateObject ( )

updates object entry in object_data

@access public

Reimplemented from ilObjectGUI.

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

687 {
688 if (!$this->checkPermissionBool("write"))
689 {
690 $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
691 }
692 else
693 {
694 $form = $this->initEditForm();
695 if($form->checkInput())
696 {
697 $title = $form->getInput("title");
698 $desc = $form->getInput("desc");
699 $lang = $this->object->getTranslations();
700 $lang = $lang["Fobject"][0]["lang"];
701 $this->object->deleteTranslation($lang);
702 $this->object->addTranslation($title, $desc, $lang, true);
703 $this->object->setTitle($title);
704 $this->object->setDescription($desc);
705 $this->object->update();
706
707 $this->saveSortingSettings($form);
708
709 // save custom icons
710/* if ($this->ilias->getSetting("custom_icons"))
711 {
712 if($form->getItemByPostVar("cont_big_icon")->getDeletionFlag())
713 {
714 $this->object->removeBigIcon();
715 }
716 if($form->getItemByPostVar("cont_small_icon")->getDeletionFlag())
717 {
718 $this->object->removeSmallIcon();
719 }
720 if($form->getItemByPostVar("cont_tiny_icon")->getDeletionFlag())
721 {
722 $this->object->removeTinyIcon();
723 }
724
725 $this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
726 $_FILES["cont_small_icon"]['tmp_name'],
727 $_FILES["cont_tiny_icon"]['tmp_name']);
728 }*/
729
730 // BEGIN ChangeEvent: Record update
731 global $ilUser;
732 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
733 ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
734 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
735 // END ChangeEvent: Record update
736
737 // services
738 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
740 $this->object->getId(),
741 $form,
742 array(
747 )
748 );
749
750 // Update ecs export settings
751 include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
752 $ecs = new ilECSCategorySettings($this->object);
753 if($ecs->handleSettingsUpdate())
754 {
755 return $this->afterUpdate();
756 }
757 }
758
759 // display form to correct errors
760 $this->setEditTabs();
761 $form->setValuesByPost();
762 $this->tpl->setContent($form->getHTML());
763 }
764 }
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
afterUpdate()
Post (successful) object update hook.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
initEditForm()
Init object edit form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.

References $ilUser, $lang, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainerGUI\afterUpdate(), ilObjectGUI\checkPermissionBool(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initEditForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilContainerGUI\saveSortingSettings(), setEditTabs(), ilObjectServiceSettingsGUI\TAXONOMIES, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ updateTaxonomySettingsObject()

ilObjCategoryGUI::updateTaxonomySettingsObject ( )
protected

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

1826 {
1827 $taxonomies = $this->getTaxonomiesForRefId();
1828 if(sizeof($taxonomies))
1829 {
1830 $form = $this->initTaxonomyForm($taxonomies);
1831 if($form->checkInput())
1832 {
1833 $sblock = $form->getInput("sblock");
1834
1836
1837 ilContainer::_deleteContainerSettings($this->object->getId(),
1838 $prefix."%", true);
1839
1840 if(is_array($sblock))
1841 {
1842 foreach($sblock as $tax_id)
1843 {
1844 ilContainer::_writeContainerSetting($this->object->getId(),
1845 $prefix.$tax_id, 1);
1846 }
1847 }
1848
1849 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1850 }
1851 }
1852 $this->ctrl->redirect($this, "editTaxonomySettings");
1853 }
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
_writeContainerSetting($a_id, $a_keyword, $a_value)

References ilContainer\_deleteContainerSettings(), ilContainer\_writeContainerSetting(), CONTAINER_SETTING_TAXBLOCK, getTaxonomiesForRefId(), initTaxonomyForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjCategoryGUI::$ctrl

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

◆ CONTAINER_SETTING_TAXBLOCK

const ilObjCategoryGUI::CONTAINER_SETTING_TAXBLOCK = "tax_sblock_"

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