ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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 public. More...
 
executeCommand ()
 
 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 ()
 
 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...
 
 _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 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 ()
 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 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 ($a_initial_call=false)
 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 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 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...
 
 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 _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)
 
 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 ()
 
 initTaxonomyForm (array $tax)
 
 editTaxonomySettingsObject ()
 
 getActiveBlocks ()
 
 updateTaxonomySettingsObject ()
 
- 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 ()
 
 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 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...
 
 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)
 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...
 

Detailed Description

Member Function Documentation

◆ __buildFilterSelect()

ilObjCategoryGUI::__buildFilterSelect (   $a_parent_ids)

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

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

1575  {
1576  $action[0] = $this->lng->txt('all_users');
1577  $action[$this->object->getRefId()] = $this->lng->txt('users').
1578  ' ('.ilObject::_lookupTitle(ilObject::_lookupObjId($this->object->getRefId())).')';
1579 
1580  foreach($a_parent_ids as $parent)
1581  {
1582  if($parent == $this->object->getRefId())
1583  {
1584  continue;
1585  }
1586  switch($parent)
1587  {
1589  $action[ilLocalUser::_getUserFolderId()] = $this->lng->txt('global_user');
1590 
1591  break;
1592 
1593  default:
1594  $action[$parent] = $this->lng->txt('users').' ('.ilObject::_lookupTitle(ilObject::_lookupObjId($parent)).')';
1595 
1596  break;
1597  }
1598  }
1599  return ilUtil::formSelect($_SESSION['filtered_users'][$this->object->getRefId()],"filter",$action,false,true);
1600  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
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.
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ __checkGlobalRoles()

ilObjCategoryGUI::__checkGlobalRoles (   $new_assigned)

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

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

Referenced by assignSaveObject().

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

◆ __getAssignableRoles()

ilObjCategoryGUI::__getAssignableRoles ( )

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

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

Referenced by assignRolesObject(), and assignSaveObject().

1313  {
1314  global $rbacreview,$ilUser;
1315 
1316  // check local user
1317  $tmp_obj =& ilObjectFactory::getInstanceByObjId($_REQUEST['obj_id']);
1318  // Admin => all roles
1319  if(in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1320  {
1321  $global_roles = $rbacreview->getGlobalRolesArray();
1322  }
1323  elseif($tmp_obj->getTimeLimitOwner() == $this->object->getRefId())
1324  {
1325  $global_roles = $rbacreview->getGlobalAssignableRoles();
1326  }
1327  else
1328  {
1329  $global_roles = array();
1330  }
1331  return $roles = array_merge($global_roles,
1332  $rbacreview->getAssignableChildRoles($this->object->getRefId()));
1333  }
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
global $ilUser
Definition: imgupload.php:15
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __initTableGUI()

& ilObjCategoryGUI::__initTableGUI ( )

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

Referenced by __showRolesTable(), and __showUsersTable().

1568  {
1569  include_once "./Services/Table/classes/class.ilTableGUI.php";
1570 
1571  return new ilTableGUI(0,false);
1572  }
Class ilTableGUI.
+ Here is the caller graph for this function:

◆ __setTableGUIBasicData()

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

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

References $_GET, and $ilUser.

Referenced by __showRolesTable(), and __showUsersTable().

1500  {
1501  global $ilUser;
1502 
1503  switch ($a_from)
1504  {
1505  case "listUsersObject":
1506  $tbl->setOrderColumn($_GET["sort_by"]);
1507  $tbl->setOrderDirection($_GET["sort_order"]);
1508  $tbl->setOffset($_GET["offset"]);
1509  $tbl->setMaxCount($this->all_users_count);
1510  $tbl->setLimit($ilUser->getPref('hits_per_page'));
1511  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1512  $tbl->setData($result_set);
1513  $tbl->disable('auto_sort');
1514 
1515  return true;
1516 
1517 
1518  case "assignRolesObject":
1519  $offset = $_GET["offset"];
1520  // init sort_by (unfortunatly sort_by is preset with 'title'
1521  if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
1522  {
1523  $_GET["sort_by"] = "login";
1524  }
1525  $order = $_GET["sort_by"];
1526  $direction = $_GET["sort_order"];
1527  break;
1528 
1529  case "clipboardObject":
1530  $offset = $_GET["offset"];
1531  $order = $_GET["sort_by"];
1532  $direction = $_GET["sort_order"];
1533  $tbl->disable("footer");
1534  break;
1535 
1536  default:
1537  $offset = $_GET["offset"];
1538  $order = $_GET["sort_by"];
1539  $direction = $_GET["sort_order"];
1540  break;
1541  }
1542 
1543  $tbl->setOrderColumn($order);
1544  $tbl->setOrderDirection($direction);
1545  $tbl->setOffset($offset);
1546  if($this->set_unlimited)
1547  {
1548  $tbl->setLimit($_GET["limit"]*100);
1549  }
1550  else
1551  {
1552  $tbl->setLimit($_GET['limit']);
1553  }
1554  $tbl->setMaxCount(count($result_set));
1555 
1556  if($a_footer)
1557  {
1558  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
1559  }
1560  else
1561  {
1562  $tbl->disable('footer');
1563  }
1564  $tbl->setData($result_set);
1565  }
$_GET["client_id"]
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ __showRolesTable()

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

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

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

Referenced by assignRolesObject().

1381  {
1382  $this->checkPermission("cat_administrate_users");
1383 
1384  $tbl =& $this->__initTableGUI();
1385  $tpl =& $tbl->getTemplateObject();
1386 
1387  // SET FORMAACTION
1388  $tpl->setCurrentBlock("tbl_form_header");
1389 
1390  $this->ctrl->setParameter($this,'obj_id',$_GET['obj_id']);
1391  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1392  $tpl->parseCurrentBlock();
1393 
1394  // SET FOOTER BUTTONS
1395  $tpl->setVariable("COLUMN_COUNTS",4);
1396  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
1397 
1398 // $tpl->setCurrentBlock("tbl_action_button");
1399  $tpl->setVariable("BTN_NAME","assignSave");
1400  $tpl->setVariable("BTN_VALUE",$this->lng->txt("change_assignment"));
1401  $tpl->parseCurrentBlock();
1402 
1403  $tpl->setCurrentBlock("tbl_action_row");
1404  $tpl->setVariable("TPLPATH",$this->tpl->tplPath);
1405  $tpl->parseCurrentBlock();
1406 
1407  $tmp_obj =& ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
1408  $title = $this->lng->txt('role_assignment').' ('.$tmp_obj->getFullname().')';
1409 
1410  $tbl->setTitle($title,"icon_role.svg",$this->lng->txt("role_assignment"));
1411  $tbl->setHeaderNames(array('',
1412  $this->lng->txt("title"),
1413  $this->lng->txt('description'),
1414  $this->lng->txt("type")));
1415  $tbl->setHeaderVars(array("",
1416  "title",
1417  "description",
1418  "type"),
1419  array("ref_id" => $this->object->getRefId(),
1420  "cmd" => "assignRoles",
1421  "obj_id" => $_GET['obj_id'],
1422  "cmdClass" => "ilobjcategorygui",
1423  "cmdNode" => $_GET["cmdNode"]));
1424  $tbl->setColumnWidth(array("4%","35%","45%","16%"));
1425 
1426  $this->set_unlimited = true;
1427  $this->__setTableGUIBasicData($tbl,$a_result_set,$a_from,true);
1428  $tbl->render();
1429 
1430  $this->tpl->setVariable("ROLES_TABLE",$tbl->tpl->get());
1431 
1432  return true;
1433  }
$_GET["client_id"]
__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)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showUsersTable()

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

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

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

1436  {
1437  $this->checkPermission("cat_administrate_users");
1438 
1439  $tbl =& $this->__initTableGUI();
1440  $tpl =& $tbl->getTemplateObject();
1441 
1442  // SET FORMAACTION
1443  $tpl->setCurrentBlock("tbl_form_header");
1444 
1445  $this->ctrl->setParameter($this,'sort_by',$_GET['sort_by']);
1446  $this->ctrl->setParameter($this,'sort_order',$_GET['sort_order']);
1447  $this->ctrl->setParameter($this,'offset',$_GET['offset']);
1448  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
1449  $tpl->parseCurrentBlock();
1450 
1451 
1452  if($a_footer)
1453  {
1454  // SET FOOTER BUTTONS
1455  $tpl->setVariable("COLUMN_COUNTS",6);
1456  $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
1457 
1458  $tpl->setCurrentBlock("tbl_action_button");
1459  $tpl->setVariable("BTN_NAME","deleteUser");
1460  $tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
1461  $tpl->parseCurrentBlock();
1462 
1463  $tpl->setCurrentBlock("tbl_action_row");
1464  $tpl->setVariable("TPLPATH",$this->tpl->tplPath);
1465  $tpl->parseCurrentBlock();
1466 
1467  $tbl->setFormName('cmd');
1468  $tbl->enable('select_all');
1469  }
1470 
1471  $tbl->setTitle($this->lng->txt("users"),"icon_usr.svg",$this->lng->txt("users"));
1472  $tbl->setHeaderNames(array('',
1473  $this->lng->txt("username"),
1474  $this->lng->txt("firstname"),
1475  $this->lng->txt("lastname"),
1476  $this->lng->txt('context'),
1477  $this->lng->txt('role_assignment')));
1478  $tbl->setHeaderVars(array("",
1479  "login",
1480  "firstname",
1481  "lastname",
1482  "context",
1483  "role_assignment"),
1484  array("ref_id" => $this->object->getRefId(),
1485  "cmd" => "listUsers",
1486  "cmdClass" => "ilobjcategorygui",
1487  "cmdNode" => $_GET["cmdNode"]));
1488  $tbl->setColumnWidth(array("1px","20%","20%","20%","20%","20%"));
1489  $tbl->setSelectAllCheckbox('user_ids');
1490 
1491  $this->__setTableGUIBasicData($tbl,$a_result_set,$a_from,true);
1492  $tbl->render();
1493 
1494  $this->tpl->setVariable("USERS_TABLE",$tbl->tpl->get());
1495 
1496  return true;
1497  }
$_GET["client_id"]
__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)
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:

◆ _getImportDir()

ilObjCategoryGUI::_getImportDir ( )

get user import directory name

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

References ilUtil\getDataDir().

Referenced by _importCategories().

972  {
973  return ilUtil::getDataDir()."/cat_import";
974  }
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 1602 of file class.ilObjCategoryGUI.php.

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

Referenced by ilObjCategoryReferenceGUI\_goto().

1603  {
1604  global $ilAccess, $ilErr, $lng;
1605 
1606  if ($ilAccess->checkAccess("read", "", $a_target))
1607  {
1609  }
1610  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1611  {
1612  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1613  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
1615  }
1616 
1617  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1618 
1619  }
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()

ilObjCategoryGUI::_importCategories (   $a_ref_id,
  $withrol_tmp 
)

import categories (static, also called by RootFolderGUI)

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

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

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

1002  {
1003  global $lng;
1004 
1005  require_once("./Modules/Category/classes/class.ilCategoryImportParser.php");
1006 
1007  $import_dir = ilObjCategoryGUI::_getImportDir();
1008 
1009  // create user import directory if necessary
1010  if (!@is_dir($import_dir))
1011  {
1012  ilUtil::createDirectory($import_dir);
1013  }
1014 
1015  // move uploaded file to user import directory
1016 
1017  $file_name = $_FILES["importFile"]["name"];
1018 
1019  // added to prevent empty file names
1020  if (!strcmp($file_name,"")) {
1021  ilUtil::sendFailure($lng->txt("no_import_file_found"), true);
1022  $this->ctrl->redirect($this);
1023  }
1024 
1025  $parts = pathinfo($file_name);
1026  $full_path = $import_dir."/".$file_name;
1027  //move_uploaded_file($_FILES["importFile"]["tmp_name"], $full_path);
1028  ilUtil::moveUploadedFile($_FILES["importFile"]["tmp_name"], $file_name, $full_path);
1029 
1030  // unzip file
1031  ilUtil::unzip($full_path);
1032 
1033  $subdir = basename($parts["basename"],".".$parts["extension"]);
1034  $xml_file = $import_dir."/".$subdir."/".$subdir.".xml";
1035  // CategoryImportParser
1036  //var_dump($_POST);
1037  $importParser = new ilCategoryImportParser($xml_file, $a_ref_id, $withrol_tmp);
1038  $importParser->startParsing();
1039 
1040  ilUtil::sendSuccess($lng->txt("categories_imported"), true);
1041  $this->ctrl->redirect($this);
1042  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
_getImportDir()
get user import directory name
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static createDirectory($a_dir, $a_mod=0755)
create directory
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:

◆ _importCategoriesForm()

ilObjCategoryGUI::_importCategoriesForm (   $a_ref_id,
$a_tpl 
)

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

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

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

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

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

References $_POST, and editTranslationsObject().

855  {
856  if($_POST["title"])
857  {
858  $k = max(array_keys($_POST["title"]));
859  $k++;
860  $_POST["title"][$k] = "";
861  $this->editTranslationsObject(true);
862  }
863  else
864  {
865  $this->editTranslationsObject(false, true);
866  }
867  }
$_POST['username']
Definition: cron.php:12
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
+ Here is the call graph for this function:

◆ addUserAutoCompleteObject()

ilObjCategoryGUI::addUserAutoCompleteObject ( )
protected

Show auto complete results.

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

References $_REQUEST, exit, and ilUserAutoComplete\MAX_ENTRIES.

1135  {
1136  include_once './Services/User/classes/class.ilUserAutoComplete.php';
1137  $auto = new ilUserAutoComplete();
1138  $auto->setSearchFields(array('login','firstname','lastname','email'));
1139  $auto->enableFieldSearchableCheck(true);
1140  $auto->isMoreLinkAvailable(true);
1141 
1142  if(($_REQUEST['fetchall']))
1143  {
1144  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
1145  }
1146 
1147  echo $auto->getList($_REQUEST['term']);
1148  exit();
1149  }
exit
Definition: login.php:54
Auto completion class for user lists.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

◆ afterSave()

ilObjCategoryGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

361  {
362  global $ilUser, $tree;
363 
364  // add default translation
365  $a_new_object->addTranslation($a_new_object->getTitle(),
366  $a_new_object->getDescription(), $ilUser->getPref("language"), true);
367 
368  // default: sort by title
369  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
370  $settings = new ilContainerSortingSettings($a_new_object->getId());
372  $settings->save();
373 
374  // inherit parents content style, if not individual
375  $parent_ref_id = $tree->getParentId($a_new_object->getRefId());
376  $parent_id = ilObject::_lookupObjId($parent_ref_id);
377  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
378  $style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
379  if ($style_id > 0)
380  {
381  if (ilObjStyleSheet::_lookupStandard($style_id))
382  {
383  ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
384  }
385  }
386 
387  // always send a message
388  ilUtil::sendSuccess($this->lng->txt("cat_added"),true);
389  $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
390  $this->redirectToRefId($a_new_object->getRefId(), "");
391  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static lookupObjectStyle($a_obj_id)
Lookup object style.
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
_lookupStandard($a_id)
Lookup standard flag.
global $ilUser
Definition: imgupload.php:15
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 1063 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

1064  {
1065  global $ilTabs;
1066 
1067  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1068  $utab = new ilUserTableGUI($this, "listUsers", ilUserTableGUI::MODE_LOCAL_USER);
1069  $utab->resetOffset();
1070  $utab->writeFilterToSession();
1071  $this->listUsersObject();
1072  }
listUsersObject($show_delete=false)
TableGUI class for user administration.
+ Here is the call graph for this function:

◆ assignRolesObject()

ilObjCategoryGUI::assignRolesObject ( )

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

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

Referenced by assignSaveObject().

1207  {
1208  global $rbacreview,$ilTabs;
1209 
1210  $this->checkPermission("cat_administrate_users");
1211 
1212  include_once './Services/User/classes/class.ilLocalUser.php';
1213 
1214  if(!isset($_GET['obj_id']))
1215  {
1216  ilUtil::sendFailure('no_user_selected');
1217  $this->listUsersObject();
1218 
1219  return true;
1220  }
1221 
1222  $ilTabs->clearTargets();
1223  $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this,'listUsers'));
1224  global $ilHelp;
1225  $ilHelp->setScreenIdComponent("cat");
1226  $ilHelp->setScreenId("administrate_user");
1227  $ilHelp->setSubScreenId("assign_roles");
1228 
1229 
1230  $roles = $this->__getAssignableRoles();
1231 
1232  if(!count($roles))
1233  {
1234  #ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1235  #$this->listUsersObject();
1236 
1237  #return true;
1238  }
1239 
1240  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.cat_role_assignment.html',
1241  "Modules/Category");
1242 
1243  $ass_roles = $rbacreview->assignedRoles($_GET['obj_id']);
1244 
1245  $counter = 0;
1246  foreach($roles as $role)
1247  {
1248  $role_obj =& ilObjectFactory::getInstanceByObjId($role['obj_id']);
1249 
1250  $disabled = false;
1251  $f_result[$counter][] = ilUtil::formCheckbox(in_array($role['obj_id'],$ass_roles) ? 1 : 0,
1252  'role_ids[]',
1253  $role['obj_id'],
1254  $disabled);
1255  $f_result[$counter][] = $role_obj->getTitle() ? $role_obj->getTitle() : "";
1256  $f_result[$counter][] = $role_obj->getDescription() ? $role_obj->getDescription() : "";
1257  $f_result[$counter][] = $role['role_type'] == 'global' ?
1258  $this->lng->txt('global') :
1259  $this->lng->txt('local');
1260 
1261  unset($role_obj);
1262  ++$counter;
1263  }
1264  $this->__showRolesTable($f_result,"assignRolesObject");
1265  }
__showRolesTable($a_result_set, $a_from="")
$_GET["client_id"]
listUsersObject($show_delete=false)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
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 1267 of file class.ilObjCategoryGUI.php.

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

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

◆ deleteTranslationsObject()

ilObjCategoryGUI::deleteTranslationsObject ( )

Remove translation.

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

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

873  {
874  foreach($_POST["title"] as $k => $v)
875  {
876  if ($_POST["check"][$k])
877  {
878  // default translation cannot be deleted
879  if($k != $_POST["default"])
880  {
881  unset($_POST["title"][$k]);
882  unset($_POST["desc"][$k]);
883  unset($_POST["lang"][$k]);
884  }
885  else
886  {
887  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
888  return $this->editTranslationsObject();
889  }
890  }
891  }
892  $this->saveTranslationsObject();
893  }
$_POST['username']
Definition: cron.php:12
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.
+ Here is the call graph for this function:

◆ deleteUsersObject()

ilObjCategoryGUI::deleteUsersObject ( )

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

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

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

◆ editIconsObject()

ilObjCategoryGUI::editIconsObject (   $a_form = null)

Edit folder icons.

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

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

Referenced by updateIconsObject().

1630  {
1631  global $tpl;
1632 
1633  $this->checkPermission('write');
1634 
1635  $this->tabs_gui->setTabActive('settings');
1636 
1637  if(!$a_form)
1638  {
1639  $a_form = $this->initIconsForm();
1640  }
1641 
1642  $tpl->setContent($a_form->getHTML());
1643  }
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 474 of file class.ilObjCategoryGUI.php.

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

Referenced by updateInfoObject().

475  {
476  $this->checkPermission("write");
477  $this->setEditTabs();
478  $this->tabs_gui->activateTab('settings');
479  $this->tabs_gui->setSubTabActive('edit_cat_settings');
480 
481  $this->initExtendedSettings();
482  $this->tpl->setContent($this->form->getHTML());
483  }
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:

◆ editTaxonomySettingsObject()

ilObjCategoryGUI::editTaxonomySettingsObject ( )
protected

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

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

1778  {
1779  $this->initTaxSubTabs("tax_settings");
1780 
1781  $taxonomies = $this->getTaxonomiesForRefId();
1782  if(!sizeof($taxonomies))
1783  {
1784  ilUtil::sendFailure($this->lng->txt("cntr_tax_none_available"));
1785  return;
1786  }
1787 
1788  $form = $this->initTaxonomyForm($taxonomies);
1789  $this->tpl->setContent($form->getHTML());
1790  }
initTaxSubTabs($a_active="tax_list")
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ 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 755 of file class.ilObjCategoryGUI.php.

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

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

756  {
757  global $tpl;
758 
759  $this->ctrl->redirectByClass("ilobjecttranslationgui", "");
760 
761 
762  $this->lng->loadLanguageModule($this->object->getType());
763  $this->setEditTabs("settings_trans");
764 
765  include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
766  $table = new ilObjectTranslationTableGUI($this, "editTranslations", true,
767  "Translation");
768  if ($a_get_post_values)
769  {
770  $vals = array();
771  foreach($_POST["title"] as $k => $v)
772  {
773  $vals[] = array("title" => $v,
774  "desc" => $_POST["desc"][$k],
775  "lang" => $_POST["lang"][$k],
776  "default" => ($_POST["default"] == $k));
777  }
778  $table->setData($vals);
779  }
780  else
781  {
782  $data = $this->object->getTranslations();
783  foreach($data["Fobject"] as $k => $v)
784  {
785  $data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
786  }
787  if($a_add)
788  {
789  $data["Fobject"][++$k]["title"] = "";
790  }
791  $table->setData($data["Fobject"]);
792  }
793  $tpl->setContent($table->getHTML());
794  }
$_POST['username']
Definition: cron.php:12
setEditTabs($active_tab="settings_misc")
TableGUI class for title/description translations.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilObjCategoryGUI::executeCommand ( )

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

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

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(true);
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  default:
215  if ($cmd == "infoScreen")
216  {
217  $this->checkPermission("visible");
218  }
219  else
220  {
221  $this->checkPermission("read");
222  }
223 
224  // add entry to navigation history
225  if (!$this->getCreationMode() &&
226  $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
227  {
228  include_once("./Services/Link/classes/class.ilLink.php");
229  $ilNavigationHistory->addItem($_GET["ref_id"],
230  ilLink::_getLink($_GET["ref_id"], "cat"), "cat");
231  }
232 
233  $this->prepareOutput();
234  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
235  if (is_object($this->object))
236  {
237  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
238  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
239  }
240 
241  if(!$cmd)
242  {
243  $cmd = "render";
244  }
245  $cmd .= "Object";
246  $this->$cmd();
247 
248  break;
249  }
250 
251  $this->addHeaderAction();
252 
253  return true;
254  }
Class ilContainerLinkListGUI.
infoScreen()
show information screen
GUI class for the workflow of copying objects.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
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
prepareOutput()
prepare output
renderObject()
Render category.
setEditTabs($active_tab="settings_misc")
getContentStylePath($a_style_id)
get content style path
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.
addHeaderAction()
Add header action menu.
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.
showRepTree($a_initial_call=false)
Show tree.
+ Here is the call graph for this function:

◆ getActiveBlocks()

ilObjCategoryGUI::getActiveBlocks ( )
protected

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

References $res, and ilContainer\_getContainerSettings().

Referenced by initTaxonomyForm().

1793  {
1794  $res = array();
1795 
1796  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1797 
1798  foreach(ilContainer::_getContainerSettings($this->object->getId()) as $keyword => $value)
1799  {
1800  if(substr($keyword, 0, strlen($prefix)) == $prefix && (bool)$value)
1801  {
1802  $res[] = substr($keyword, strlen($prefix));
1803  }
1804  }
1805 
1806  return $res;
1807  }
static _getContainerSettings($a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilObjCategoryGUI::getEditFormValues ( )

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

664  {
665  // values are set in initEditForm()
666  }

◆ getTabs()

ilObjCategoryGUI::getTabs ( $tabs_gui)

Get tabs.

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

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

260  {
261  global $rbacsystem, $lng, $ilHelp, $ilAccess;
262 
263  if ($this->ctrl->getCmd() == "editPageContent")
264  {
265  return;
266  }
267  #$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
268 
269  $ilHelp->setScreenIdComponent("cat");
270 
271  if ($rbacsystem->checkAccess('read',$this->ref_id))
272  {
273  $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "render")
274  ? true
275  : false;
276  $tabs_gui->addTab("view_content", $lng->txt("content"),
277  $this->ctrl->getLinkTarget($this, ""));
278 
279  //BEGIN ChangeEvent add info tab to category object
280  if ($this->info_screen_enabled)
281  {
282  $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
283  || strtolower($_GET["cmdClass"]) == "ilnotegui")
284  ? true
285  : false;
286  $tabs_gui->addTarget("info_short",
287  $this->ctrl->getLinkTargetByClass(
288  array("ilobjcategorygui", "ilinfoscreengui"), "showSummary"),
289  array("showSummary","", "infoScreen"),
290  "", "", $force_active);
291  }
292  //END ChangeEvent add info tab to category object
293  }
294 
295  if ($rbacsystem->checkAccess('write',$this->ref_id))
296  {
297  $force_active = ($_GET["cmd"] == "edit")
298  ? true
299  : false;
300  $tabs_gui->addTarget("settings",
301  $this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this)
302  , "", $force_active);
303 
304  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
306  $this->object->getId(),
308  false
309  ))
310  {
311  $tabs_gui->addTarget("obj_tool_setting_taxonomies",
312  $this->ctrl->getLinkTarget($this, "editTaxonomySettings"), "editTaxonomySettings", get_class($this));
313  }
314  }
315 
316  include_once './Services/User/classes/class.ilUserAccountSettings.php';
317  if(
318  ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() and
319  $rbacsystem->checkAccess('cat_administrate_users',$this->ref_id))
320  {
321  $tabs_gui->addTarget("administrate_users",
322  $this->ctrl->getLinkTarget($this, "listUsers"), "listUsers", get_class($this));
323  }
324 
325  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
326  {
327  $tabs_gui->addTarget(
328  'export',
329  $this->ctrl->getLinkTargetByClass('ilexportgui',''),
330  'export',
331  'ilexportgui'
332  );
333  }
334 
335  // parent tabs (all container: edit_permission, clipboard, trash
336  parent::getTabs($tabs_gui);
337 
338  }
$_GET["client_id"]
static getInstance()
Singelton get instance.
_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 1708 of file class.ilObjCategoryGUI.php.

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

Referenced by editTaxonomySettingsObject(), and updateTaxonomySettingsObject().

1709  {
1710  global $tree;
1711 
1712  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
1713  include_once "Services/Taxonomy/classes/class.ilObjTaxonomy.php";
1714 
1715  // see ilTaxMDGUI::getSelectableTaxonomies()
1716 
1717  $res = array();
1718  foreach($tree->getPathFull($this->object->getRefId()) as $node)
1719  {
1720  // find all defined taxes for parent node, activation is not relevant
1721  $node_taxes = ilObjTaxonomy::getUsageOfObject($node["obj_id"], true);
1722  if(sizeof($node_taxes))
1723  {
1724  foreach($node_taxes as $node_tax)
1725  {
1726  $res[$node_tax["tax_id"]] = array(
1727  "title" => $node_tax["title"]
1728  ,"source" => $node["child"]
1729  );
1730  }
1731  }
1732  }
1733 
1734  asort($res);
1735  return $res;
1736  }
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
+ 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 public.

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

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

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  }
$GLOBALS['ct_recipient']
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
+ Here is the call graph for this function:

◆ importCancelledObject()

ilObjCategoryGUI::importCancelledObject ( )

import cancelled

private

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

964  {
965  $this->ctrl->redirect($this);
966  }

◆ importCategoriesFormObject()

ilObjCategoryGUI::importCategoriesFormObject ( )

display form for category import

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

References _importCategoriesForm().

899  {
900  ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
901  }
_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 979 of file class.ilObjCategoryGUI.php.

References $_GET, and _importCategories().

980  {
982  // call to importCategories with $withrol = 0
984  }
$_GET["client_id"]
_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 989 of file class.ilObjCategoryGUI.php.

References $_GET, and _importCategories().

990  {
991 
992  //echo "entra aqui";
993  // call to importCategories with $withrol = 1
995  }
$_GET["client_id"]
_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 408 of file class.ilObjCategoryGUI.php.

References $_GET, $ilCtrl, ilAdvancedMDRecordGUI\MODE_INFO, and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

409  {
410  global $ilAccess, $ilCtrl;
411 
412  if (!$ilAccess->checkAccess("visible", "", $this->ref_id))
413  {
414  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
415  }
416 
417  if (!$this->info_screen_enabled)
418  {
419  return;
420  }
421 
422  // #10986
423  $this->tabs_gui->setTabActive('info_short');
424 
425  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
426  $info = new ilInfoScreenGUI($this);
427 
428  $info->enablePrivateNotes();
429 
430  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
431  {
432  $info->enableNews();
433  }
434 
435  // no news editing for files, just notifications
436  $info->enableNewsEditing(false);
437  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
438  {
439  $news_set = new ilSetting("news");
440  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
441 
442  if ($enable_internal_rss)
443  {
444  $info->setBlockProperty("news", "settings", true);
445  $info->setBlockProperty("news", "public_notifications_option", true);
446  }
447  }
448 
449  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
450  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO,'cat',$this->object->getId());
451  $record_gui->setInfoObject($info);
452  $record_gui->parse();
453 
454 
455  // standard meta data
456  $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
457 
458  // forward the command
459  if ($ilCtrl->getNextClass() == "ilinfoscreengui")
460  {
461  $ilCtrl->forwardCommand($info);
462  }
463  else
464  {
465  return $ilCtrl->getHTML($info);
466  }
467  }
ILIAS Setting Class.
Class ilInfoScreenGUI.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
setInfoObject($info)
get info sections
redirection script todo: (a better solution should control the processing via a xml file) ...
+ 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 398 of file class.ilObjCategoryGUI.php.

References infoScreen().

399  {
400  $this->ctrl->setCmd("showSummary");
401  $this->ctrl->setCmdClass("ilinfoscreengui");
402  $this->infoScreen();
403  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjCategoryGUI::initCreationForms (   $a_new_type)
protected

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

354  {
355  $forms = parent::initCreationForms($a_new_type);
356  //unset($forms[self::CFORM_IMPORT]);
357  return $forms;
358  }

◆ initEditForm()

ilObjCategoryGUI::initEditForm ( )

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

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

Referenced by updateObject().

576  {
577  $this->lng->loadLanguageModule($this->object->getType());
578  $this->setEditTabs();
579 
580  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
581  $form = new ilPropertyFormGUI();
582  $form->setFormAction($this->ctrl->getFormAction($this));
583  $form->setTitle($this->lng->txt($this->object->getType()."_edit"));
584 
585  // title/description
586 
587  $trans = $this->object->getTranslations();
588  $def = $trans["Fobject"][0]; // default
589 
590  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
591  $title->setRequired(true);
592  $title->setSize(min(40, ilObject::TITLE_LENGTH));
593  $title->setMaxLength(ilObject::TITLE_LENGTH);
594  $title->setValue($def["title"]);
595  $form->addItem($title);
596 
597  if(sizeof($trans["Fobject"]) > 1)
598  {
599  include_once('Services/MetaData/classes/class.ilMDLanguageItem.php');
600  $languages = ilMDLanguageItem::_getLanguages();
601 
602  $title->setInfo($this->lng->txt("language").": ".$languages[$def["lang"]].
603  ' <a href="'.$this->ctrl->getLinkTarget($this, "editTranslations").
604  '">&raquo; '.$this->lng->txt("cat_more_translations").'</a>');
605 
606  unset($languages);
607  }
608 
609  $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
610  $desc->setRows(2);
611  $desc->setCols(40);
612  $desc->setValue($def["desc"]);
613  $form->addItem($desc);
614 
615  // Show didactic template type
616  $this->initDidacticTemplate($form);
617 
618  // presentation
619  $pres = new ilFormSectionHeaderGUI();
620  $pres->setTitle($this->lng->txt('obj_presentation'));
621  $form->addItem($pres);
622 
623 
624  $form = $this->initSortingForm(
625  $form,
626  array(
630  )
631  );
632 
633  // icon settings
634 // $this->showCustomIconsEditing(1, $form, false);
635 
636  // Edit ecs export settings
637  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
638  $ecs = new ilECSCategorySettings($this->object);
639  $ecs->addSettingsToForm($form, 'cat');
640 
641  // services
642  $sh = new ilFormSectionHeaderGUI();
643  $sh->setTitle($this->lng->txt('obj_features'));
644  $form->addItem($sh);
645 
646  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
648  $this->object->getId(),
649  $form,
650  array(
654  )
655  );
656 
657  $form->addCommandButton("update", $this->lng->txt("save"));
658 // $form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
659 
660  return $form;
661  }
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.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
This class represents a text property in a property form.
setEditTabs($active_tab="settings_misc")
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
Class ilECSCategorySettings.
setRequired($a_required)
Set Required.
+ 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 517 of file class.ilObjCategoryGUI.php.

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

Referenced by editInfoObject(), and updateInfoObject().

518  {
519  if(is_object($this->form))
520  {
521  return true;
522  }
523 
524  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
525  $this->form = new ilPropertyFormGUI();
526  $this->form->setFormAction($this->ctrl->getFormAction($this));
527  $this->form->setTitle($this->lng->txt('ext_cat_settings'));
528  $this->form->addCommandButton('updateInfo',$this->lng->txt('save'));
529  $this->form->addCommandButton('editInfo',$this->lng->txt('cancel'));
530 
531  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
532  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'cat',$this->object->getId());
533  $this->record_gui->setPropertyForm($this->form);
534  $this->record_gui->parse();
535 
536  return true;
537  }
This class represents a property form user interface.
setPropertyForm($form)
set property form object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initIconsForm()

ilObjCategoryGUI::initIconsForm ( )

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

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

Referenced by editIconsObject(), and updateIconsObject().

1646  {
1647  $this->setEditTabs("icons");
1648 
1649  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
1650  $form = new ilPropertyFormGUI();
1651  $form->setFormAction($this->ctrl->getFormAction($this));
1652 
1653  $this->showCustomIconsEditing(1, $form);
1654 
1655  // $form->setTitle($this->lng->txt('edit_grouping'));
1656  $form->addCommandButton('updateIcons', $this->lng->txt('save'));
1657 
1658  return $form;
1659  }
This class represents a property form user interface.
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:

◆ initTaxonomyForm()

ilObjCategoryGUI::initTaxonomyForm ( array  $tax)
protected

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

References getActiveBlocks().

Referenced by editTaxonomySettingsObject(), and updateTaxonomySettingsObject().

1739  {
1740  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1741  $form = new ilPropertyFormGUI();
1742  $form->setFormAction($this->ctrl->getFormAction($this), "editTaxonomySettings");
1743  $form->setTitle($this->lng->txt("cntr_taxonomy_sideblock_settings"));
1744 
1745  $block = new ilCheckboxGroupInputGUI($this->lng->txt("cntr_taxonomy_show_sideblock"), "sblock");
1746  $form->addItem($block);
1747 
1748  $current = $this->getActiveBlocks();
1749 
1750  foreach($tax as $tax_id => $tax_item)
1751  {
1752  $option = new ilCheckboxOption($tax_item["title"], $tax_id);
1753 
1754  if($tax_item["source"] != $this->object->getRefId())
1755  {
1756  $loc = new ilLocatorGUI();
1757  $loc->setTextOnly(true);
1758  $loc->addRepositoryItems($tax_item["source"]);
1759  $option->setInfo($loc->getHTML());
1760  }
1761 
1762  $block->addOption($option);
1763 
1764  if(in_array($tax_id, $current))
1765  {
1766  $value[] = $tax_id;
1767  }
1768  }
1769 
1770  $block->setValue($value);
1771 
1772  $form->addCommandButton("updateTaxonomySettings", $this->lng->txt("save"));
1773 
1774  return $form;
1775  }
This class represents an option in a checkbox group.
This class represents a property form user interface.
locator handling class
This class represents a property in a property form.
+ 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 1698 of file class.ilObjCategoryGUI.php.

Referenced by editTaxonomySettingsObject(), and executeCommand().

1699  {
1700  $this->tabs_gui->setTabActive("obj_tool_setting_taxonomies");
1701  $this->tabs_gui->addSubTab("tax_settings", $this->lng->txt("cntr_taxonomy_sideblock_settings"),
1702  $this->ctrl->getLinkTarget($this, "editTaxonomySettings"));
1703  $this->tabs_gui->addSubTab("tax_list", $this->lng->txt("cntr_taxonomy_definitions"),
1704  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", ""));
1705  $this->tabs_gui->activateSubTab($a_active);
1706  }
+ Here is the caller graph for this function:

◆ listUsersObject()

ilObjCategoryGUI::listUsersObject (   $show_delete = false)

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

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

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

1076  {
1077  global $ilUser,$rbacreview, $ilToolbar;
1078 
1079  include_once './Services/User/classes/class.ilLocalUser.php';
1080  include_once './Services/User/classes/class.ilObjUserGUI.php';
1081 
1082  global $rbacsystem,$rbacreview;
1083 
1084  if(!$rbacsystem->checkAccess("cat_administrate_users",$this->object->getRefId()))
1085  {
1086  $this->ilias->raiseError($this->lng->txt("msg_no_perm_admin_users"),$this->ilias->error_obj->MESSAGE);
1087  }
1088  $this->tabs_gui->setTabActive('administrate_users');
1089 
1090 
1091 
1092  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.cat_admin_users.html',
1093  "Modules/Category");
1094 
1095  if(count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
1096  {
1097  $ilToolbar->addButton(
1098  $this->lng->txt('add_user'),
1099  $this->ctrl->getLinkTargetByClass('ilobjusergui','create')
1100  );
1101 
1102  $ilToolbar->addButton(
1103  $this->lng->txt('import_users'),
1104  $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui','importUserForm')
1105  );
1106  }
1107  else
1108  {
1109  ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to'));
1110  }
1111 
1112  if($show_delete)
1113  {
1114  $this->tpl->setCurrentBlock("confirm_delete");
1115  $this->tpl->setVariable("CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
1116  $this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel'));
1117  $this->tpl->setVariable("CONFIRM_CMD",'performDeleteUsers');
1118  $this->tpl->setVariable("TXT_CONFIRM",$this->lng->txt('delete'));
1119  $this->tpl->parseCurrentBlock();
1120  }
1121 
1122  $this->lng->loadLanguageModule('user');
1123 
1124  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1125  $utab = new ilUserTableGUI($this, 'listUsers',ilUserTableGUI::MODE_LOCAL_USER);
1126  $this->tpl->setVariable('USERS_TABLE',$utab->getHTML());
1127 
1128  return true;
1129  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
TableGUI class for user administration.
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performDeleteUsersObject()

ilObjCategoryGUI::performDeleteUsersObject ( )

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

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

1153  {
1154  include_once './Services/User/classes/class.ilLocalUser.php';
1155  $this->checkPermission("cat_administrate_users");
1156 
1157  foreach($_POST['user_ids'] as $user_id)
1158  {
1159  if(!in_array($user_id,ilLocalUser::_getAllUserIds($this->object->getRefId())))
1160  {
1161  die('user id not valid');
1162  }
1163  if(!$tmp_obj =& ilObjectFactory::getInstanceByObjId($user_id,false))
1164  {
1165  continue;
1166  }
1167  $tmp_obj->delete();
1168  }
1169  ilUtil::sendSuccess($this->lng->txt('deleted_users'));
1170  $this->listUsersObject();
1171 
1172  return true;
1173  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
_getAllUserIds($a_filter=0)
listUsersObject($show_delete=false)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ renderObject()

ilObjCategoryGUI::renderObject ( )

Render category.

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

References $ret.

Referenced by executeCommand().

344  {
345  global $ilTabs;
346 
347  $ilTabs->activateTab("view_content");
348  $ret = parent::renderObject();
349  return $ret;
350 
351  }
+ 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 1048 of file class.ilObjCategoryGUI.php.

References listUsersObject(), and ilUserTableGUI\MODE_LOCAL_USER.

1049  {
1050  include_once("./Services/User/classes/class.ilUserTableGUI.php");
1051  $utab = new ilUserTableGUI($this, "listUsers",ilUserTableGUI::MODE_LOCAL_USER);
1052  $utab->resetOffset();
1053  $utab->resetFilter();
1054 
1055  // from "old" implementation
1056  $this->listUsersObject();
1057  }
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 799 of file class.ilObjCategoryGUI.php.

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

Referenced by deleteTranslationsObject().

800  {
801  if (!$this->checkPermissionBool("write"))
802  {
803  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
804  }
805 
806  // default language set?
807  if (!isset($_POST["default"]))
808  {
809  ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
810  return $this->editTranslationsObject(true);
811  }
812 
813  // all languages set?
814  if (array_key_exists("",$_POST["lang"]))
815  {
816  ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
817  return $this->editTranslationsObject(true);
818  }
819 
820  // no single language is selected more than once?
821  if (count(array_unique($_POST["lang"])) < count($_POST["lang"]))
822  {
823  ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
824  return $this->editTranslationsObject(true);
825  }
826 
827  // save the stuff
828  $this->object->removeTranslations();
829  foreach($_POST["title"] as $k => $v)
830  {
831  // update object data if default
832  $is_default = ($_POST["default"] == $k);
833  if($is_default)
834  {
835  $this->object->setTitle(ilUtil::stripSlashes($v));
836  $this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
837  $this->object->update();
838  }
839 
840  $this->object->addTranslation(
842  ilUtil::stripSlashes($_POST["desc"][$k]),
843  ilUtil::stripSlashes($_POST["lang"][$k]),
844  $is_default);
845  }
846 
847  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
848  $this->ctrl->redirect($this, "editTranslations");
849  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
editTranslationsObject($a_get_post_values=false, $a_add=false)
Edit title and translations.
redirection script todo: (a better solution should control the processing via a xml file) ...
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.
+ 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 539 of file class.ilObjCategoryGUI.php.

References $ilSetting, and ilAdvancedMDRecord\_getActivatedObjTypes().

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

540  {
541  global $ilSetting, $ilTabs;
542 
543  $this->tabs_gui->addSubTab("settings_misc",
544  $this->lng->txt("settings"),
545  $this->ctrl->getLinkTarget($this, "edit"));
546 
547  /*$this->tabs_gui->addSubTab("settings_trans",
548  $this->lng->txt("title_and_translations"),
549  $this->ctrl->getLinkTarget($this, "editTranslations"));*/
550 
551  $this->tabs_gui->addSubTab("settings_trans",
552  $this->lng->txt("obj_multilinguality"),
553  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
554 
555  // custom icon
556  if ($ilSetting->get("custom_icons"))
557  {
558  $this->tabs_gui->addSubTab("icons",
559  $this->lng->txt("icon_settings"),
560  $this->ctrl->getLinkTarget($this,'editIcons'));
561  }
562 
563  $this->tabs_gui->activateTab("settings");
564  $this->tabs_gui->activateSubTab($active_tab);
565 
566  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
567  if(in_array('cat',ilAdvancedMDRecord::_getActivatedObjTypes()))
568  {
569  $this->tabs_gui->addSubTabTarget("edit_cat_settings",
570  $this->ctrl->getLinkTarget($this,'editInfo'),
571  "editInfo", get_class($this));
572  }
573  }
global $ilSetting
Definition: privfeed.php:40
static _getActivatedObjTypes()
get activated obj types
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateIconsObject()

ilObjCategoryGUI::updateIconsObject ( )

update container icons

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

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

1665  {
1666  global $ilSetting;
1667 
1668  $this->checkPermission('write');
1669 
1670  $form = $this->initIconsForm();
1671  if($form->checkInput())
1672  {
1673  //save custom icons
1674  if ($ilSetting->get("custom_icons"))
1675  {
1676  if($_POST["cont_icon_delete"])
1677  {
1678  $this->object->removeCustomIcon();
1679  }
1680  $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
1681  }
1682  if ($_FILES["cont_icon"]['tmp_name'] || $_POST["cont_icon_delete"])
1683  {
1684  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
1685  }
1686  $this->ctrl->redirect($this,"editIcons");
1687  }
1688 
1689  $form->setValuesByPost();
1690  $this->editIconsObject($form);
1691  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
editIconsObject($a_form=null)
Edit folder icons.
global $ilSetting
Definition: privfeed.php:40
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:

◆ updateInfoObject()

ilObjCategoryGUI::updateInfoObject ( )
protected

Update info (extended meta data)

protected

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

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

491  {
492  $this->checkPermission("write");
493 
494  // init form
495  $this->initExtendedSettings();
496 
497  // still needed for date conversion and so on
498  $this->form->checkInput();
499 
500  if($this->record_gui->importEditFormPostValues())
501  {
502  $this->record_gui->writeEditForm();
503 
504  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
505  $this->ctrl->redirect($this, "editInfo");
506  }
507 
508  $this->editInfoObject();
509  }
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 673 of file class.ilObjCategoryGUI.php.

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

674  {
675  if (!$this->checkPermissionBool("write"))
676  {
677  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
678  }
679  else
680  {
681  $form = $this->initEditForm();
682  if($form->checkInput())
683  {
684  $title = $form->getInput("title");
685  $desc = $form->getInput("desc");
686  $lang = $this->object->getTranslations();
687  $lang = $lang["Fobject"][0]["lang"];
688  $this->object->deleteTranslation($lang);
689  $this->object->addTranslation($title, $desc, $lang, true);
690  $this->object->setTitle($title);
691  $this->object->setDescription($desc);
692  $this->object->update();
693 
694  $this->saveSortingSettings($form);
695 
696  // save custom icons
697 /* if ($this->ilias->getSetting("custom_icons"))
698  {
699  if($form->getItemByPostVar("cont_big_icon")->getDeletionFlag())
700  {
701  $this->object->removeBigIcon();
702  }
703  if($form->getItemByPostVar("cont_small_icon")->getDeletionFlag())
704  {
705  $this->object->removeSmallIcon();
706  }
707  if($form->getItemByPostVar("cont_tiny_icon")->getDeletionFlag())
708  {
709  $this->object->removeTinyIcon();
710  }
711 
712  $this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
713  $_FILES["cont_small_icon"]['tmp_name'],
714  $_FILES["cont_tiny_icon"]['tmp_name']);
715  }*/
716 
717  // BEGIN ChangeEvent: Record update
718  global $ilUser;
719  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
720  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
721  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
722  // END ChangeEvent: Record update
723 
724  // services
725  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
727  $this->object->getId(),
728  $form,
729  array(
733  )
734  );
735 
736  // Update ecs export settings
737  include_once 'Modules/Category/classes/class.ilECSCategorySettings.php';
738  $ecs = new ilECSCategorySettings($this->object);
739  if($ecs->handleSettingsUpdate())
740  {
741  return $this->afterUpdate();
742  }
743  }
744 
745  // display form to correct errors
746  $this->setEditTabs();
747  $form->setValuesByPost();
748  $this->tpl->setContent($form->getHTML());
749  }
750  }
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
redirection script todo: (a better solution should control the processing via a xml file) ...
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
setEditTabs($active_tab="settings_misc")
global $ilUser
Definition: imgupload.php:15
Class ilECSCategorySettings.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
+ Here is the call graph for this function:

◆ updateTaxonomySettingsObject()

ilObjCategoryGUI::updateTaxonomySettingsObject ( )
protected

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

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

1810  {
1811  $taxonomies = $this->getTaxonomiesForRefId();
1812  if(sizeof($taxonomies))
1813  {
1814  $form = $this->initTaxonomyForm($taxonomies);
1815  if($form->checkInput())
1816  {
1817  $sblock = $form->getInput("sblock");
1818 
1819  $prefix = self::CONTAINER_SETTING_TAXBLOCK;
1820 
1821  ilContainer::_deleteContainerSettings($this->object->getId(),
1822  $prefix."%", true);
1823 
1824  if(is_array($sblock))
1825  {
1826  foreach($sblock as $tax_id)
1827  {
1828  ilContainer::_writeContainerSetting($this->object->getId(),
1829  $prefix.$tax_id, 1);
1830  }
1831  }
1832 
1833  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1834  }
1835  }
1836  $this->ctrl->redirect($this, "editTaxonomySettings");
1837  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
_writeContainerSetting($a_id, $a_keyword, $a_value)
static _deleteContainerSettings($a_id, $a_keyword=null, $a_keyword_like=false)
+ 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: