ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjOrgUnitGUI Class Reference

Class ilObjOrgUnit GUI class. More...

+ Inheritance diagram for ilObjOrgUnitGUI:
+ Collaboration diagram for ilObjOrgUnitGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 view ()
 
 showPossibleSubObjects ()
 
 showTree ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 getTabs ()
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 editSettings ()
 
 updateSettings ()
 
 getAdminTabs ()
 
 performPaste ()
 Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject More...
 
 doUserAutoCompleteObject ()
 ?? More...
 
__initTableGUI ()
 
 confirmedDeleteObject ()
 confirmed deletion of org units -> org units are deleted immediately, without putting them to the trash More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen for Org Units. More...
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 cancelMoveLinkObject ()
 
- Public Member Functions inherited from ilContainerGUI
 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _goto ($ref_id)
 
- 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

const TAB_POSITIONS = 'positions'
 
const TAB_ORGU_TYPES = 'orgu_types'
 
const TAB_SETTINGS = "settings"
 
const TAB_STAFF = 'orgu_staff'
 
const TAB_GLOBAL_SETTINGS = 'global_settings'
 
const TAB_EXPORT = 'export'
 
 $ctrl
 
 $tpl
 
 $tabs_gui
 
 $tree
 
 $object
 
 $ilias
 
const CMD_EDIT_SETTINGS = 'editSettings'
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 afterSave (ilObject $a_new_object)
 
 initCreationForms ($a_new_type)
 initCreationForms More...
 
 getTreeWhiteList ()
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 setSubTabsSettings ($active_tab_id)
 
 initAdvancedSettingsForm ()
 Initialize the form for editing advanced meta data. More...
 
 editAdvancedSettings ()
 Edit Advanced Metadata. More...
 
 updateAdvancedSettings ()
 Update Advanced Metadata. More...
 
 getTreeSelectorGUI ($cmd)
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 getTreeSelectorGUI ($cmd)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $ilAccess
 
 $toolbar
 
 $ilLocator
 
 $ilLog
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $app_event_handler
 
 $ui
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjOrgUnitGUI::__construct ( )

Definition at line 77 of file class.ilObjOrgUnitGUI.php.

References $_GET, $DIC, $ilAccess, $ilCtrl, $ilias, $ilLocator, $ilLog, ilObjectGUI\$lng, $tpl, and $tree.

78  {
79  global $DIC;
80  $tpl = $DIC['tpl'];
81  $ilCtrl = $DIC['ilCtrl'];
82  $ilAccess = $DIC['ilAccess'];
83  $ilToolbar = $DIC['ilToolbar'];
84  $ilLocator = $DIC['ilLocator'];
85  $tree = $DIC['tree'];
86  $lng = $DIC['lng'];
87  $ilLog = $DIC['ilLog'];
88  $ilias = $DIC['ilias'];
89  parent::__construct(array(), $_GET["ref_id"], true, false);
90 
91  $this->tpl = $tpl;
92  $this->ctrl = $ilCtrl;
93  $this->ilAccess = $ilAccess;
94  $this->ilLocator = $ilLocator;
95  $this->tree = $tree;
96  $this->toolbar = $ilToolbar;
97  $this->ilLog = $ilLog;
98  $this->ilias = $ilias;
99  $this->type = 'orgu';
100 
101  $lng->loadLanguageModule("orgu");
102  $this->tpl->addCss('./Modules/OrgUnit/templates/default/orgu.css');
103  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
logging
Definition: class.ilLog.php:18
Class ilAccessHandler.
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...

Member Function Documentation

◆ __initTableGUI()

& ilObjOrgUnitGUI::__initTableGUI ( )
Returns
ilTableGUI Make protected function avaiable for ilLocalUserGUI...

Definition at line 743 of file class.ilObjOrgUnitGUI.php.

744  {
745  return parent::__initTableGUI();
746  }

◆ __setTableGUIBasicData()

ilObjOrgUnitGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $a_from = "" 
)
Returns
ilTableGUI Make protected function avaiable for ilLocalUserGUI...

Definition at line 795 of file class.ilObjOrgUnitGUI.php.

References $tbl.

796  {
797  return parent::__setTableGUIBasicData($tbl, $result_set, $a_from);
798  }
$tbl
Definition: example_048.php:81

◆ _goto()

static ilObjOrgUnitGUI::_goto (   $ref_id)
static

Definition at line 678 of file class.ilObjOrgUnitGUI.php.

References $DIC, $ilCtrl, and ilObjectGUI\$ref_id.

679  {
680  global $DIC;
681  $ilCtrl = $DIC['ilCtrl'];
682  $ilCtrl->initBaseClass("ilAdministrationGUI");
683  $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
684  $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", self::TAB_SETTINGS);
685  $ilCtrl->setParameterByClass("IlObjPluginDispatchGUI", "admin_mode", self::TAB_SETTINGS);
686  $ilCtrl->redirectByClass(array( "ilAdministrationGUI", "ilObjOrgUnitGUI" ), "view");
687  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

◆ addAdminLocatorItems()

ilObjOrgUnitGUI::addAdminLocatorItems (   $a_do_not_add_object = false)
protected
Parameters
bool$a_do_not_add_object

Definition at line 449 of file class.ilObjOrgUnitGUI.php.

References $_GET, $key, $path, $row, ilFrameTargetInfo\_getFrame(), and ilObjOrgUnit\getRootOrgRefId().

450  {
451  $path = $this->tree->getPathFull($_GET["ref_id"], ilObjOrgUnit::getRootOrgRefId());
452  // add item for each node on path
453  foreach ((array) $path as $key => $row) {
454  if ($row["title"] == "__OrgUnitAdministration") {
455  $row["title"] = $this->lng->txt("objs_orgu");
456  }
457  $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
458  $this->ilLocator->addItem($row["title"], $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"), ilFrameTargetInfo::_getFrame("MainContent"), $row["child"]);
459  $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $_GET["ref_id"]);
460  }
461  }
$path
Definition: aliased.php:25
$_GET["client_id"]
static getRootOrgRefId()
$row
static _getFrame($a_class, $a_type='')
Get content frame name.
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ afterSave()

ilObjOrgUnitGUI::afterSave ( ilObject  $a_new_object)
protected

Definition at line 345 of file class.ilObjOrgUnitGUI.php.

References ilObject\getRefId(), ilObjectGUI\getReturnLocation(), and ilUtil\redirect().

346  {
347  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
348  $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
349  ilUtil::redirect($this->getReturnLocation("save", $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS, "", false, false)));
350  }
getRefId()
get reference id public
static redirect($a_script)
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
+ Here is the call graph for this function:

◆ cancelMoveLinkObject()

ilObjOrgUnitGUI::cancelMoveLinkObject ( )

Definition at line 801 of file class.ilObjOrgUnitGUI.php.

References $_SESSION, and $DIC.

Referenced by executeCommand().

802  {
803  global $DIC;
804  $parent_ref_id = $_SESSION["clipboard"]["parent"];
805  unset($_SESSION['clipboard']);
806  $DIC->ctrl()->setParameter($this, 'ref_id', $parent_ref_id);
807  $DIC->ctrl()->redirect($this);
808  }
$_SESSION["AccountId"]
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ confirmedDeleteObject()

ilObjOrgUnitGUI::confirmedDeleteObject ( )

confirmed deletion of org units -> org units are deleted immediately, without putting them to the trash

Exceptions
ilRepositoryException

Definition at line 752 of file class.ilObjOrgUnitGUI.php.

References $DIC, and ilRepUtil\removeObjectsFromSystem().

Referenced by executeCommand().

753  {
754  global $DIC;
755 
756  $ids = filter_input(INPUT_POST, 'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
757  if (count($ids) > 0) {
759  ilUtil::sendSuccess($DIC->language()->txt("info_deleted"), true);
760  }
761  $this->ctrl->returnToParent($this);
762  }
global $DIC
Definition: saml.php:7
static removeObjectsFromSystem($a_ref_ids, $a_from_recovery_folder=false)
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteObject()

ilObjOrgUnitGUI::deleteObject (   $a_error = false)

Display deletion confirmation screen for Org Units.

Information to the user that Org units will be deleted immediately.

public

Definition at line 771 of file class.ilObjOrgUnitGUI.php.

References $_GET, $_POST, $ctrl, and $ilCtrl.

Referenced by executeCommand().

772  {
774  require_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
775  $ru = new ilRepUtilGUI($this);
776 
777  $arr_ref_ids = [];
778  //Delete via Manage (more than one)
779  if (is_array($_POST['id']) && count($_POST['id']) > 0) {
780  $arr_ref_ids = $_POST['id'];
781  } elseif ($_GET['item_ref_id'] > 0) {
782  $arr_ref_ids = [$_GET['item_ref_id']];
783  }
784 
785  if (!$ru->showDeleteConfirmation($arr_ref_ids, false)) {
786  $ilCtrl->returnToParent($this);
787  }
788  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Repository GUI Utilities.
$_POST["username"]
+ Here is the caller graph for this function:

◆ doUserAutoCompleteObject()

ilObjOrgUnitGUI::doUserAutoCompleteObject ( )

??

Definition at line 732 of file class.ilObjOrgUnitGUI.php.

733  {
734  }

◆ editAdvancedSettings()

ilObjOrgUnitGUI::editAdvancedSettings ( )
protected

Edit Advanced Metadata.

Definition at line 590 of file class.ilObjOrgUnitGUI.php.

References $form, ilAccess\checkAccess(), initAdvancedSettingsForm(), ilAdvancedMDRecordGUI\MODE_EDITOR, ilUtil\sendFailure(), and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by executeCommand().

591  {
592  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
593  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
594  $this->ctrl->redirect($this);
595  }
596  $form = $this->initAdvancedSettingsForm();
597  $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
598  $gui->setPropertyForm($form);
599  $gui->parse();
600  $this->tpl->setContent($form->getHTML());
601  }
setPropertyForm($form)
set property form object
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
if(isset($_POST['submit'])) $form
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:

◆ editSettings()

ilObjOrgUnitGUI::editSettings ( )

Definition at line 628 of file class.ilObjOrgUnitGUI.php.

References $form, ilAccess\checkAccess(), and ilUtil\sendFailure().

Referenced by executeCommand().

629  {
630  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
631  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
632  $this->ctrl->redirect($this);
633  }
634  $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
635  $this->tpl->setContent($form->getHTML());
636  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
if(isset($_POST['submit'])) $form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilObjOrgUnitSettingsFormGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjOrgUnitGUI::executeCommand ( )
Exceptions
ilCtrlException
ilException
ilRepositoryException

Definition at line 110 of file class.ilObjOrgUnitGUI.php.

References $_GET, $info, ilObjOrgUnitAccess\_checkAccessAdministrateUsers(), ilObjOrgUnitAccess\_checkAccessExport(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), cancelMoveLinkObject(), ilAccess\checkAccess(), ILIAS\Modules\OrgUnit\ARHelper\BaseCommands\CMD_INDEX, confirmedDeleteObject(), deleteObject(), editAdvancedSettings(), editSettings(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\importFileObject(), ilContainerGUI\keepObjectsInClipboardObject(), ilLearningProgressBaseGUI\LP_CONTEXT_ORG_UNIT, ilAdvancedMDRecordGUI\MODE_INFO, performPaste(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilUtil\sendFailure(), setContentSubTabs(), ilAdvancedMDRecordGUI\setInfoObject(), setSubTabsSettings(), showTree(), updateAdvancedSettings(), updateSettings(), and view().

111  {
112  $cmd = $this->ctrl->getCmd();
113  $next_class = $this->ctrl->getNextClass($this);
114  parent::prepareOutput();
115 
116  //Otherwise move-Objects would not work
117  if ($cmd != "cut") {
118  $this->showTree();
119  }
120 
121  switch ($next_class) {
122  case 'ilorgunitglobalsettingsgui':
123  $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
124  $global_settings = new ilOrgUnitGlobalSettingsGUI();
125  $this->ctrl->forwardCommand($global_settings);
126  break;
127  case "illocalusergui":
129  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
130  $this->ctrl->redirect($this);
131  }
132  $this->tabs_gui->activateTab('administrate_users');
133  $ilLocalUserGUI = new ilLocalUserGUI($this);
134  $this->ctrl->forwardCommand($ilLocalUserGUI);
135  break;
136  case "ilorgunitsimpleimportgui":
137  $this->tabs_gui->activateTab("view");
138  $this->setContentSubTabs();
139  $this->tabs_gui->setSubTabActive('import');
140  $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
141  $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
142  break;
143  case "ilorgunitsimpleuserimportgui":
144  $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
145  $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
146  break;
147  case "ilorgunitstaffgui":
148  case "ilrepositorysearchgui":
149  $this->tabs_gui->activateTab(self::TAB_STAFF);
150  $ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this);
151  $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
152  break;
153  case "ilobjusergui":
154  switch ($cmd) {
155  case "create":
156  $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['ref_id'], true, false);
157  $ilObjUserGUI->setCreationMode(true);
158  $this->ctrl->forwardCommand($ilObjUserGUI);
159  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
160  break;
161  case "save":
162  $ilObjUserGUI = new ilObjUserGUI("", $_GET['ref_id'], true, false);
163  $ilObjUserGUI->setCreationMode(true);
164  $this->ctrl->forwardCommand($ilObjUserGUI);
165  $this->tabs_gui->clearTargets();
166  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
167  break;
168  case "view":
169  case "update":
170  $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['obj_id'], false, false);
171  $ilObjUserGUI->setCreationMode(false);
172  $this->ctrl->forwardCommand($ilObjUserGUI);
173  $this->tabs_gui->clearTargets();
174  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
175  break;
176  case "cancel":
177  $this->ctrl->redirectByClass("illocalusergui", "index");
178  break;
179  }
180  break;
181  case "ilobjuserfoldergui":
182  switch ($cmd) {
183  case "view":
184  $this->ctrl->redirectByClass("illocalusergui", "index");
185  break;
186  default:
187  $ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false);
188  $ilObjUserFolderGUI->setUserOwnerId((int) $_GET['ref_id']);
189  $ilObjUserFolderGUI->setCreationMode(true);
190  $this->ctrl->forwardCommand($ilObjUserFolderGUI);
191  $this->tabs_gui->clearTargets();
192  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
193  break;
194  }
195  break;
196  case "ilinfoscreengui":
197  $this->tabs_gui->activateTab("info_short");
198  if (!$this->ilAccess->checkAccess("read", "", $this->ref_id) and !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
199  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
200  }
201  $info = new ilInfoScreenGUI($this);
202  $amd_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
203  $amd_gui->setInfoObject($info);
204  $amd_gui->parse();
205  $this->ctrl->forwardCommand($info);
206  break;
207  case 'ilpermissiongui':
208  $this->tabs_gui->activateTab('perm_settings');
209  $ilPermissionGUI = new ilPermissionGUI($this);
210  $this->ctrl->forwardCommand($ilPermissionGUI);
211  break;
212  case "ilcommonactiondispatchergui":
214  $this->ctrl->forwardCommand($gui);
215  break;
216  case 'illearningprogressgui':
217  case 'illplistofprogressgui':
218  $this->tabs_gui->clearTargets();
219  $this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass(ilOrgUnitUserAssignmentGUI::class, ilOrgUnitUserAssignmentGUI::CMD_INDEX));
220  if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) {
221  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
222  $this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff");
223  }
224  $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
225  $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
226  $new_gui = new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_ORG_UNIT, $_GET["ref_id"], $_GET['obj_id']);
227  $this->ctrl->forwardCommand($new_gui);
228  break;
229  case 'ilorgunitexportgui':
230  if (!ilObjOrgUnitAccess::_checkAccessExport((int) $_GET['ref_id'])) {
231  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
232  $this->ctrl->redirect($this);
233  }
234  $this->tabs_gui->activateTab(self::TAB_EXPORT);;
235  $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
236  $ilOrgUnitExportGUI->addFormat('xml');
237  $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
238  break;
239  case strtolower(ilTranslationGUI::class):
240  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
241  $this->setSubTabsSettings('edit_translations');
242  $ilTranslationGui = new ilTranslationGUI($this);
243  $this->ctrl->forwardCommand($ilTranslationGui);
244  break;
245  case strtolower(ilOrgUnitTypeGUI::class):
246  $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
247  $types_gui = new ilOrgUnitTypeGUI($this);
248  $this->ctrl->forwardCommand($types_gui);
249  break;
250  case strtolower(ilOrgUnitPositionGUI::class):
251  $this->tabs_gui->activateTab(self::TAB_POSITIONS);
252  $types_gui = new ilOrgUnitPositionGUI($this);
253  $this->ctrl->forwardCommand($types_gui);
254  break;
255  case strtolower(ilOrgUnitUserAssignmentGUI::class):
256  $this->tabs_gui->activateTab(self::TAB_STAFF);
257  $ilOrgUnitUserAssignmentGUI = new ilOrgUnitUserAssignmentGUI();
258  $this->ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
259  break;
260  default:
261  switch ($cmd) {
262  case '':
263  case 'view':
264  case 'render':
265  case 'cancel':
266  case 'cancelDelete':
267  $this->view();
268  break;
269  case 'performPaste':
270  case 'paste':
271  $this->performPaste();
272  break;
273  case 'performPasteIntoMultipleObjects':
275  break;
276  case 'keepObjectsInClipboard':
278  break;
279  case 'create':
280  parent::createObject();
281  break;
282  case 'save':
283  parent::saveObject();
284  break;
285  case 'delete':
286  $this->tabs_gui->clearTargets();
287  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
288  $this->deleteObject();
289  break;
290  case 'confirmedDelete':
291  $this->confirmedDeleteObject();
292  break;
293  case 'cut':
294  $this->tabs_gui->clearTargets();
295  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
296  parent::cutObject();
297  break;
298  case 'clear':
299  parent::clearObject();
300  break;
301  case 'enableAdministrationPanel':
302  parent::enableAdministrationPanelObject();
303  break;
304  case 'disableAdministrationPanel':
305  parent::disableAdministrationPanelObject();
306  break;
307  case 'getAsynchItemList':
308  parent::getAsynchItemListObject();
309  break;
310  case self::CMD_EDIT_SETTINGS:
311  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
312  $this->setSubTabsSettings('edit_settings');
313  $this->editSettings();
314  break;
315  case 'updateSettings':
316  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
317  $this->setSubTabsSettings('edit_settings');
318  $this->updateSettings();
319  break;
320  case 'editAdvancedSettings':
321  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
322  $this->setSubTabsSettings('edit_advanced_settings');
323  $this->editAdvancedSettings();
324  break;
325  case 'updateAdvancedSettings':
326  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
327  $this->setSubTabsSettings('edit_advanced_settings');
328  $this->updateAdvancedSettings();
329  break;
330  case 'importFile':
331  $this->importFileObject();
332  break;
333  case 'cancelMoveLink':
334  $this->cancelMoveLinkObject();
335  break;
336  }
337  break;
338  }
339  }
setSubTabsSettings($active_tab_id)
Class ilInfoScreenGUI.
confirmedDeleteObject()
confirmed deletion of org units -> org units are deleted immediately, without putting them to the tra...
$_GET["client_id"]
deleteObject($a_error=false)
Display deletion confirmation screen for Org Units.
Class ilLocalUserGUI.
Class ilOrgUnitUserAssignmentGUI.
Class ilOrgUnitPositionGUI.
Class ilOrgUnitSimpleImportGUI.
Class ilAccessHandler.
Class ilOrgUnitExportGUI.
setContentSubTabs()
Set content sub tabs.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
setInfoObject($info)
get info sections
Class ilTranslationGUI.
updateAdvancedSettings()
Update Advanced Metadata.
static _checkAccessAdministrateUsers($ref_id)
redirection script todo: (a better solution should control the processing via a xml file) ...
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
Class ilOrgUnitTypeGUI.
editAdvancedSettings()
Edit Advanced Metadata.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
performPaste()
Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
Class ilOrgUnitStaffGUI.
Class ilObjUserFolderGUI.
Class ilOrgUnitSimpleUserImportGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjUserGUI.
$info
Definition: index.php:5
static _checkAccessExport($ref_id)
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
Class ilObjUserTrackingGUI.
keepObjectsInClipboardObject()
Keep objects in the clipboard.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjOrgUnitGUI::getAdminTabs ( )
Parameters
ilTabsGUI$tabs_gui

Definition at line 705 of file class.ilObjOrgUnitGUI.php.

References getTabs().

706  {
707  $this->getTabs();
708  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjOrgUnitGUI::getTabs ( )
Parameters
ilTabsGUI$tabs_gui

Definition at line 483 of file class.ilObjOrgUnitGUI.php.

References ilObjOrgUnitAccess\_checkAccessStaff(), ILIAS\Modules\OrgUnit\ARHelper\BaseCommands\CMD_INDEX, and ilObjOrgUnit\getRootOrgRefId().

Referenced by getAdminTabs().

484  {
485  $read_access_ref_id = $this->rbacsystem->checkAccess('visible,read', $this->object->getRefId());
486  if ($read_access_ref_id) {
487  $this->tabs_gui->addTab("view_content", $this->lng->txt("content"), $this->ctrl->getLinkTarget($this, ""));
488  $this->tabs_gui->addTab("info_short", "Info", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
489  }
490 
491  // Tabs for OrgUnits exclusive root!
492  if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
493  if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) {
494  // $this->tabs_gui->addTab('legacy_staff', 'legacy_staff', $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", "showStaff"));
495  $this->tabs_gui->addTab(self::TAB_STAFF, $this->lng->txt(self::TAB_STAFF), $this->ctrl->getLinkTargetByClass(ilOrgUnitUserAssignmentGUI::class, ilOrgUnitUserAssignmentGUI::CMD_INDEX));
496  }
497  if ($read_access_ref_id) {
498  $this->tabs_gui->addTab(self::TAB_SETTINGS, $this->lng->txt(self::TAB_SETTINGS), $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS));
499  $this->tabs_gui->addTab("administrate_users", $this->lng->txt("administrate_users"), $this->ctrl->getLinkTargetByClass("ilLocalUserGUI", "index"));
500  }
501  }
502 
503  if ($read_access_ref_id) {
504  if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
505  $this->tabs_gui->addTab(self::TAB_GLOBAL_SETTINGS, $this->lng->txt('settings'), $this->ctrl->getLinkTargetByClass(ilOrgUnitGlobalSettingsGUI::class));
506  }
507  $this->tabs_gui->addTab(self::TAB_EXPORT, $this->lng->txt(self::TAB_EXPORT), $this->ctrl->getLinkTargetByClass(ilOrgUnitExportGUI::class));
508 
509  // Add OrgUnit types and positions tabs
510  if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
511  $this->tabs_gui->addTab(self::TAB_ORGU_TYPES, $this->lng->txt(self::TAB_ORGU_TYPES), $this->ctrl->getLinkTargetByClass(ilOrgUnitTypeGUI::class));
512  $this->tabs_gui->addTab(self::TAB_POSITIONS, $this->lng->txt(self::TAB_POSITIONS), $this->ctrl->getLinkTargetByClass(ilOrgUnitPositionGUI::class));
513  }
514  }
515  parent::getTabs();
516  }
static _checkAccessStaff($ref_id)
static getRootOrgRefId()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTreeSelectorGUI()

ilObjOrgUnitGUI::getTreeSelectorGUI (   $cmd)
protected

Definition at line 690 of file class.ilObjOrgUnitGUI.php.

References $DIC, and $tree.

691  {
692  global $DIC;
693  $tree = $DIC['tree'];
694  $explorer = new ilOrgUnitExplorerGUI("rep_exp_sel", $this, "showPasteTree", $tree);
695  $explorer->setAjax(false);
696  $explorer->setSelectMode('nodes[]', false);
697 
698  return $explorer;
699  }
global $DIC
Definition: saml.php:7
Class ilOrgUnitExplorerGUI.

◆ getTreeWhiteList()

ilObjOrgUnitGUI::getTreeWhiteList ( )
protected

Definition at line 414 of file class.ilObjOrgUnitGUI.php.

Referenced by showTree().

415  {
416  $whiteList = array( "orgu" );
417  $pls = ilOrgUnitExtension::getActivePluginIdsForTree();
418 
419  return array_merge($whiteList, $pls);
420  }
+ Here is the caller graph for this function:

◆ initAdvancedSettingsForm()

ilObjOrgUnitGUI::initAdvancedSettingsForm ( )
protected

Initialize the form for editing advanced meta data.

Returns
ilPropertyFormGUI

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

References $form.

Referenced by editAdvancedSettings(), and updateAdvancedSettings().

577  {
578  $form = new ilPropertyFormGUI();
579  $form->setFormAction($this->ctrl->getFormAction($this));
580  $form->addCommandButton('updateAdvancedSettings', $this->lng->txt('save'));
581  $form->addCommandButton(self::CMD_EDIT_SETTINGS, $this->lng->txt('cancel'));
582 
583  return $form;
584  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjOrgUnitGUI::initCreationForms (   $a_new_type)
protected

initCreationForms

We override the method of class.ilObjectGUI because we have no copy functionality at the moment

Parameters
string$a_new_type
Returns
array

Definition at line 381 of file class.ilObjOrgUnitGUI.php.

References ilObjectGUI\initCreateForm(), and ilObjectGUI\initImportForm().

382  {
383  $forms = array(
384  self::CFORM_NEW => $this->initCreateForm($a_new_type),
385  self::CFORM_IMPORT => $this->initImportForm($a_new_type),
386  );
387 
388  return $forms;
389  }
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ performPaste()

ilObjOrgUnitGUI::performPaste ( )

Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject

Definition at line 714 of file class.ilObjOrgUnitGUI.php.

References $_GET, $_SESSION, $message, and ilContainerGUI\pasteObject().

Referenced by executeCommand().

715  {
716  if (!in_array($_SESSION['clipboard']['cmd'], array( 'cut' ))) {
717  $message = __METHOD__ . ": cmd was not 'cut' ; may be a hack attempt!";
718  $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
719  }
720  if ($_SESSION['clipboard']['cmd'] == 'cut') {
721  if (isset($_GET['ref_id']) && (int) $_GET['ref_id']) {
722  $this->pasteObject();
723  }
724  }
725  $this->ctrl->returnToParent($this);
726  }
$_SESSION["AccountId"]
$_GET["client_id"]
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
catch(Exception $e) $message
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:

◆ redirectToRefId()

ilObjOrgUnitGUI::redirectToRefId (   $a_ref_id,
  $a_cmd = "" 
)
protected
Parameters
int$a_ref_id
string$a_cmd

Definition at line 468 of file class.ilObjOrgUnitGUI.php.

References ilObject\_lookupType().

469  {
470  $obj_type = ilObject::_lookupType($a_ref_id, true);
471  if ($obj_type != "orgu") {
472  parent::redirectToRefId($a_ref_id, $a_cmd);
473  } else {
474  $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $a_ref_id);
475  $this->ctrl->redirectByClass("ilObjOrgUnitGUI", $a_cmd);
476  }
477  }
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjOrgUnitGUI::setContentSubTabs ( )

Set content sub tabs.

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

References $_GET, ilContainerGUI\addStandardContainerSubTabs(), and ilObjOrgUnit\getRootOrgRefId().

Referenced by executeCommand().

562  {
564  //only display the import tab at the first level
565  if ($this->rbacsystem->checkAccess("visible, read", $_GET["ref_id"]) and $this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
566  $this->tabs_gui->addSubTab("import", $this->lng->txt("import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleImportGUI", "chooseImport"));
567  }
568  }
$_GET["client_id"]
static getRootOrgRefId()
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubTabsSettings()

ilObjOrgUnitGUI::setSubTabsSettings (   $active_tab_id)
protected
Parameters
$active_tab_id

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

Referenced by executeCommand().

523  {
524  $next_class = $this->ctrl->getNextClass($this);
525  $cmd = $this->ctrl->getCmd();
526  $this->tabs_gui->addSubTab('edit_settings', $this->lng->txt(self::TAB_SETTINGS), $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS));
527  $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
528 
529  $ilOrgUnitType = $this->object->getOrgUnitType();
530  if ($ilOrgUnitType instanceof ilOrgUnitType) {
531  if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
532  $this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings'));
533  }
534  }
535 
536  $this->tabs_gui->setSubTabActive($active_tab_id);
537  switch ($next_class) {
538  case 'iltranslationgui':
539  $this->tabs_gui->setSubTabActive("edit_translations");
540  break;
541  case '':
542  switch ($cmd) {
543  case self::CMD_EDIT_SETTINGS:
544  $this->tabs_gui->setSubTabActive('edit_settings');
545  break;
546  case 'editAdvancedSettings':
547  case 'updateAdvancedSettings':
548  $this->tabs_gui->setSubTabActive('edit_advanced_settings');
549  break;
550  }
551  break;
552  }
553 
554  return;
555  }
Class ilOrgUnitType.
+ Here is the caller graph for this function:

◆ setTitleAndDescription()

ilObjOrgUnitGUI::setTitleAndDescription ( )

called by prepare output

Definition at line 426 of file class.ilObjOrgUnitGUI.php.

427  {
428  # all possible create permissions
429  parent::setTitleAndDescription();
430  if ($this->object->getTitle() == "__OrgUnitAdministration") {
431  $this->tpl->setTitle($this->lng->txt("objs_orgu"));
432  $this->tpl->setDescription($this->lng->txt("objs_orgu"));
433  }
434 
435  // Check for custom icon of type
436  if ($this->ilias->getSetting('custom_icons')) {
437  $icons_cache = ilObjOrgUnit::getIconsCache();
438  $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] : '';
439  if ($icon_file) {
440  $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
441  }
442  }
443  }
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ showPossibleSubObjects()

ilObjOrgUnitGUI::showPossibleSubObjects ( )

Definition at line 392 of file class.ilObjOrgUnitGUI.php.

References $_GET, ilObjectDefinition\MODE_ADMINISTRATION, and ilObjectAddNewItemGUI\setMode().

393  {
394  $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
396  $gui->setCreationUrl("ilias.php?ref_id=" . $_GET["ref_id"] . "&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI");
397  $gui->render();
398  }
$_GET["client_id"]
Render add new item selector.
+ Here is the call graph for this function:

◆ showTree()

ilObjOrgUnitGUI::showTree ( )

Definition at line 401 of file class.ilObjOrgUnitGUI.php.

References $_GET, $tree, ilObjOrgUnit\getRootOrgRefId(), and getTreeWhiteList().

Referenced by executeCommand().

402  {
403  $tree = new ilOrgUnitExplorerGUI("orgu_explorer", "ilObjOrgUnitGUI", "showTree", new ilTree(1));
404  $tree->setTypeWhiteList($this->getTreeWhiteList());
405  $tree->setNodeOpen(ilObjOrgUnit::getRootOrgRefId());
406 
407  if (!$tree->handleCommand()) {
408  $this->tpl->setLeftNavContent($tree->getHTML());
409  }
410  $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $_GET["ref_id"]);
411  }
$_GET["client_id"]
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static getRootOrgRefId()
Class ilOrgUnitExplorerGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateAdvancedSettings()

ilObjOrgUnitGUI::updateAdvancedSettings ( )
protected

Update Advanced Metadata.

Definition at line 607 of file class.ilObjOrgUnitGUI.php.

References $form, ilAccess\checkAccess(), initAdvancedSettingsForm(), ilAdvancedMDRecordGUI\MODE_EDITOR, ilUtil\sendFailure(), and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by executeCommand().

608  {
609  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
610  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
611  $this->ctrl->redirect($this);
612  }
613  $form = $this->initAdvancedSettingsForm();
614  $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
615  $gui->setPropertyForm($form);
616  $form->checkInput();
617  $gui->parse();
618  if ($gui->importEditFormPostValues()) {
619  $gui->writeEditForm();
620  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
621  $this->ctrl->redirect($this, 'editAdvancedSettings');
622  } else {
623  $this->tpl->setContent($form->getHTML());
624  }
625  }
setPropertyForm($form)
set property form object
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
if(isset($_POST['submit'])) $form
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:

◆ updateSettings()

ilObjOrgUnitGUI::updateSettings ( )

Definition at line 639 of file class.ilObjOrgUnitGUI.php.

References $DIC, $form, $key, $toolbar, ilAccess\checkAccess(), ilUtil\sendFailure(), and ilContainerGUI\showAdministrationPanel().

Referenced by executeCommand().

640  {
641  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
642  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
643  $this->ctrl->redirect($this);
644  }
645  $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
646  if ($form->saveObject()) {
647  ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
648  $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
649  } else {
650  $this->tpl->setContent($form->getHTML());
651  }
652  }
Class ilAccessHandler.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
check access for an object (provide $a_type and $a_obj_id if available for better performance)(option...
if(isset($_POST['submit'])) $form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilObjOrgUnitSettingsFormGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilObjOrgUnitGUI::view ( )

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

References $_GET, and ilUtil\sendFailure().

Referenced by executeCommand().

354  {
355  if (!$this->rbacsystem->checkAccess("read", $_GET["ref_id"])) {
356  if ($this->rbacsystem->checkAccess("visible", $_GET["ref_id"])) {
357  ilUtil::sendFailure($this->lng->txt("msg_no_perm_read"));
358  $this->ctrl->redirectByClass('ilinfoscreengui', '');
359  }
360 
361  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
362  }
363 
364  parent::renderObject();
365  $this->tabs_gui->activateTab("view_content");
366  $this->tabs_gui->removeSubTab("page_editor");
367  $this->tabs_gui->removeSubTab("ordering"); // Mantis 0014728
368  }
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
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:

Field Documentation

◆ $ctrl

ilObjOrgUnitGUI::$ctrl

Definition at line 37 of file class.ilObjOrgUnitGUI.php.

Referenced by deleteObject().

◆ $ilAccess

ilObjOrgUnitGUI::$ilAccess
protected

Definition at line 49 of file class.ilObjOrgUnitGUI.php.

Referenced by __construct().

◆ $ilias

ilObjOrgUnitGUI::$ilias

Definition at line 73 of file class.ilObjOrgUnitGUI.php.

Referenced by __construct().

◆ $ilLocator

ilObjOrgUnitGUI::$ilLocator
protected

Definition at line 57 of file class.ilObjOrgUnitGUI.php.

Referenced by __construct().

◆ $ilLog

ilObjOrgUnitGUI::$ilLog
protected

Definition at line 69 of file class.ilObjOrgUnitGUI.php.

Referenced by __construct().

◆ $object

ilObjOrgUnitGUI::$object

Definition at line 65 of file class.ilObjOrgUnitGUI.php.

◆ $tabs_gui

ilObjOrgUnitGUI::$tabs_gui

Definition at line 45 of file class.ilObjOrgUnitGUI.php.

◆ $toolbar

ilObjOrgUnitGUI::$toolbar
protected

Definition at line 53 of file class.ilObjOrgUnitGUI.php.

Referenced by updateSettings().

◆ $tpl

ilObjOrgUnitGUI::$tpl

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

Referenced by __construct().

◆ $tree

ilObjOrgUnitGUI::$tree

Definition at line 61 of file class.ilObjOrgUnitGUI.php.

Referenced by __construct(), getTreeSelectorGUI(), and showTree().

◆ CMD_EDIT_SETTINGS

const ilObjOrgUnitGUI::CMD_EDIT_SETTINGS = 'editSettings'

Definition at line 74 of file class.ilObjOrgUnitGUI.php.

◆ TAB_EXPORT

const ilObjOrgUnitGUI::TAB_EXPORT = 'export'

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

◆ TAB_GLOBAL_SETTINGS

const ilObjOrgUnitGUI::TAB_GLOBAL_SETTINGS = 'global_settings'

Definition at line 32 of file class.ilObjOrgUnitGUI.php.

◆ TAB_ORGU_TYPES

const ilObjOrgUnitGUI::TAB_ORGU_TYPES = 'orgu_types'

Definition at line 29 of file class.ilObjOrgUnitGUI.php.

◆ TAB_POSITIONS

const ilObjOrgUnitGUI::TAB_POSITIONS = 'positions'

Definition at line 28 of file class.ilObjOrgUnitGUI.php.

Referenced by ilOrgUnitPositionGUI\getActiveTabId().

◆ TAB_SETTINGS

const ilObjOrgUnitGUI::TAB_SETTINGS = "settings"

Definition at line 30 of file class.ilObjOrgUnitGUI.php.

◆ TAB_STAFF

const ilObjOrgUnitGUI::TAB_STAFF = 'orgu_staff'

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


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