ILIAS  release_8 Revision v8.24
ilObjOrgUnitGUI Class Reference

Class ilObjOrgUnit GUI class. More...

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

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 view ()
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 setContentSubTabs ()
 
 editSettings ()
 
 updateSettings ()
 
 showAdministrationPanel ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 performPaste ()
 @description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject More...
 
 doUserAutoCompleteObject ()
 
 confirmedDeleteObject ()
 confirmed deletion of org units -> org units are deleted immediately, without putting them to the trash More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen for Org Units. More...
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 prepareOutput (bool $show_subobjects=true)
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
 
 addMessageRow (ilTemplate $a_tpl, string $a_message, string $a_type)
 
 setPageEditorTabs ()
 
 addStandardContainerSubTabs (bool $a_include_view=true)
 Add standard container subtabs for view, manage, oderdering and text/media editor link. More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 editOrderObject ()
 
 isActiveOrdering ()
 
 isActiveItemOrdering ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard @access public 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 ()
 
 getBucketTitle ()
 
 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 ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 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 ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 getAsynchItemListObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 competencesObject ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 

Static Public Member Functions

static _goto (int $ref_id)
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath (int $a_ref_id, int $a_course_ref_id)
 build path More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

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'
 
const TAB_VIEW_CONTENT = 'view_content'
 
const CMD_EDIT_SETTINGS = 'editSettings'
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilTree $tree
 
ilObject $object
 
Ilias $ilias
 
- Data Fields inherited from ilContainerGUI
int $bl_cnt = 1
 
bool $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initCreationForms (string $new_type)
 initCreationForms We override the method of class.ilObjectGUI because we have no copy functionality at the moment More...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 setSubTabsSettings (string $active_tab_id)
 
 initAdvancedSettingsForm ()
 Initialize the form for editing advanced meta data. More...
 
 editAdvancedSettings ()
 Edit Advanced Metadata. More...
 
 updateAdvancedSettings ()
 Update Advanced Metadata. More...
 
 getTreeSelectorGUI (string $cmd)
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 supportsPageEditor ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 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)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilAccessHandler $ilAccess
 
ilToolbarGUI $toolbar
 
ilLocatorGUI $ilLocator
 
ILIAS DI LoggingServices $ilLog
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ViewManager $view_manager
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjOrgUnitGUI::__construct ( )

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

64 {
65 global $DIC;
66 $this->ctrl = $DIC->ctrl();
67 $this->ilAccess = $DIC->access();
68 $this->ilLocator = $DIC['ilLocator'];
69 $this->tree = $DIC->repositoryTree();
70 $this->toolbar = $DIC->toolbar();
71 $this->ilLog = $DIC->logger();
72 $this->ilias = $DIC['ilias'];
73 $this->type = 'orgu';
74
75 parent::__construct(array(), $_GET["ref_id"], true, false);
76
77 $lng = $DIC->language();
78 $lng->loadLanguageModule("orgu");
79
80 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
81 OrgUnitToolProvider::SHOW_ORGU_TREE,
82 true
83 );
84 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: class.ilLog.php:31
ilLanguage $lng
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
header include for all ilias files.
$_GET['client_id']
Definition: saml1-acs.php:21

References $_GET, $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilLanguage\loadLanguageModule(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjOrgUnitGUI::_goto ( int  $ref_id)
static

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

732 : void
733 {
734 global $DIC;
735 $ilCtrl = $DIC['ilCtrl'];
736 $ilCtrl->setTargetScript('ilias.php');
737 $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
738 $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", self::TAB_SETTINGS);
739 $ilCtrl->setParameterByClass("IlObjPluginDispatchGUI", "admin_mode", self::TAB_SETTINGS);
740 $ilCtrl->redirectByClass(array("ilAdministrationGUI", "ilObjOrgUnitGUI"), "view");
741 }

References $DIC, and ilObjectGUI\$ref_id.

◆ addAdminLocatorItems()

ilObjOrgUnitGUI::addAdminLocatorItems ( bool  $do_not_add_object = false)
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

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

459 : void
460 {
461 $path = $this->tree->getPathFull($_GET["ref_id"], ilObjOrgUnit::getRootOrgRefId());
462 // add item for each node on path
463 foreach ((array) $path as $key => $row) {
464 if ($row["title"] === "__OrgUnitAdministration") {
465 $row["title"] = $this->lng->txt("objs_orgu");
466 }
467 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
468 $this->ilLocator->addItem(
469 $row["title"],
470 $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"),
471 ilFrameTargetInfo::_getFrame("MainContent"),
472 $row["child"]
473 );
474 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $_GET["ref_id"]);
475 }
476 }
static _getFrame(string $a_class)
static getRootOrgRefId()
$path
Definition: ltiservices.php:32
string $key
Consumer key/client ID value.
Definition: System.php:193

References $_GET, ILIAS\LTI\ToolProvider\$key, $path, ilFrameTargetInfo\_getFrame(), ILIAS\Repository\ctrl(), ilObjOrgUnit\getRootOrgRefId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ afterSave()

ilObjOrgUnitGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

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

365 : void
366 {
367 $new_object->writePath();
368 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
369 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
370
372 "save",
373 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS, "")
374 ));
375 }
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
static redirect(string $a_script)

References ILIAS\Repository\ctrl(), ilObject\getRefId(), ilObjectGUI\getReturnLocation(), ILIAS\Repository\lng(), and ilUtil\redirect().

+ Here is the call 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

Reimplemented from ilObjectGUI.

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

785 : void
786 {
787 $ids = filter_input(INPUT_POST, 'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
788 if (count($ids) > 0) {
790 $this->tpl->setOnScreenMessage('success', $this->lng->txt("info_deleted"), true);
791 }
792 $this->ctrl->returnToParent($this);
793 }
static removeObjectsFromSystem(array $a_ref_ids, bool $a_from_recovery_folder=false)
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilRepUtil\removeObjectsFromSystem().

Referenced by executeCommand().

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

◆ deleteObject()

ilObjOrgUnitGUI::deleteObject ( bool  $error = false)

Display deletion confirmation screen for Org Units.

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

Reimplemented from ilObjectGUI.

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

799 : void
800 {
801 $ilCtrl = $this->ctrl;
802 $ru = new ilRepositoryTrashGUI($this);
803
804 $arr_ref_ids = [];
805 //Delete via Manage (more than one)
806 if (isset($_POST["id"]) && is_array($_POST['id']) && count($_POST['id']) > 0) {
807 $arr_ref_ids = $_POST['id'];
808 } elseif (isset($_GET['item_ref_id']) && (int) $_GET['item_ref_id'] > 0) {
809 $arr_ref_ids = [(int) $_GET['item_ref_id']];
810 }
811
812 if (!$ru->showDeleteConfirmation($arr_ref_ids, false)) {
813 $ilCtrl->returnToParent($this);
814 }
815 }
Repository GUI Utilities.

References $_GET, $ctrl, and ILIAS\Repository\int().

Referenced by executeCommand().

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

◆ doUserAutoCompleteObject()

ilObjOrgUnitGUI::doUserAutoCompleteObject ( )

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

773 : void
774 {
775 }

◆ editAdvancedSettings()

ilObjOrgUnitGUI::editAdvancedSettings ( )
protected

Edit Advanced Metadata.

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

644 : void
645 {
646 if ($this->ilAccess->checkAccess("write", "", $this->ref_id) === false) {
647 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
648 $this->ctrl->redirect($this);
649 }
651 $gui = new ilAdvancedMDRecordGUI(
653 'orgu',
654 $this->object->getId(),
655 'orgu_type',
656 $this->object->getOrgUnitTypeId()
657 );
658 $gui->setPropertyForm($form);
659 $gui->parse();
660 $this->tpl->setContent($form->getHTML());
661 }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
ilPropertyFormGUI $form
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.

References ilContainerGUI\$form, ilAccess\checkAccess(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), initAdvancedSettingsForm(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ILIAS\Repository\object().

Referenced by executeCommand().

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

◆ editSettings()

ilObjOrgUnitGUI::editSettings ( )

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

692 : void
693 {
694 if (!$this->ilAccess->checkAccess('write', "", $this->ref_id)) {
695 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
696 $this->ctrl->redirect($this);
697 }
698 $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
699 $this->tpl->setContent($form->getHTML());
700 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilContainerGUI\$form, ilAccess\checkAccess(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), and ILIAS\Repository\lng().

Referenced by executeCommand().

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

◆ executeCommand()

ilObjOrgUnitGUI::executeCommand ( )
Exceptions
ilCtrlException
ilException
ilRepositoryException

Reimplemented from ilContainerGUI.

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

91 : void
92 {
93 $cmd = $this->ctrl->getCmd();
94 $next_class = $this->ctrl->getNextClass($this);
95 parent::prepareOutput();
96
97 switch ($next_class) {
98 case 'ilorgunitglobalsettingsgui':
99 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
100 $global_settings = new ilOrgUnitGlobalSettingsGUI();
101 $this->ctrl->forwardCommand($global_settings);
102 break;
103 case "illocalusergui":
105 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
106 $this->ctrl->redirect($this);
107 }
108 $this->tabs_gui->activateTab('administrate_users');
109 $ilLocalUserGUI = new ilLocalUserGUI($this);
110 $this->ctrl->forwardCommand($ilLocalUserGUI);
111 break;
112 case "ilorgunitsimpleimportgui":
113 $this->tabs_gui->activateTab("view");
114 $this->setContentSubTabs();
115 $this->tabs_gui->setSubTabActive('import');
116 $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
117 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
118 break;
119 case "ilorgunitsimpleuserimportgui":
120 $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
121 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
122 break;
123 case "ilorgunitstaffgui":
124 case "ilrepositorysearchgui":
125 $this->tabs_gui->activateTab(self::TAB_STAFF);
126 $ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this);
127 $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
128 break;
129 case "ilobjusergui":
130 switch ($cmd) {
131 case "create":
132 $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['ref_id'], true, false);
133 $ilObjUserGUI->setCreationMode(true);
134 $this->ctrl->forwardCommand($ilObjUserGUI);
135 $this->tabs_gui->setBackTarget(
136 $this->lng->txt("back"),
137 $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
138 );
139 break;
140 case "save":
141 $ilObjUserGUI = new ilObjUserGUI("", $_GET['ref_id'], true, false);
142 $ilObjUserGUI->setCreationMode(true);
143 $this->ctrl->forwardCommand($ilObjUserGUI);
144 $this->tabs_gui->clearTargets();
145 $this->tabs_gui->setBackTarget(
146 $this->lng->txt("back"),
147 $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
148 );
149 break;
150 case "view":
151 case "update":
152 $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['obj_id'], false, false);
153 $ilObjUserGUI->setCreationMode(false);
154 $this->ctrl->forwardCommand($ilObjUserGUI);
155 $this->tabs_gui->clearTargets();
156 $this->tabs_gui->setBackTarget(
157 $this->lng->txt("back"),
158 $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
159 );
160 break;
161 case "cancel":
162 $this->ctrl->redirectByClass("illocalusergui", "index");
163 break;
164 }
165 break;
166 case "ilobjuserfoldergui":
167 switch ($cmd) {
168 case "view":
169 $this->ctrl->redirectByClass("illocalusergui", "index");
170 break;
171 default:
172 $ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false);
173 $ilObjUserFolderGUI->setUserOwnerId((int) $_GET['ref_id']);
174 $ilObjUserFolderGUI->setCreationMode(true);
175 $this->ctrl->forwardCommand($ilObjUserFolderGUI);
176 $this->tabs_gui->clearTargets();
177 $this->tabs_gui->setBackTarget(
178 $this->lng->txt("back"),
179 $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
180 );
181 break;
182 }
183 break;
184 case "ilinfoscreengui":
185 $this->tabs_gui->activateTab("info_short");
186 if (!$this->ilAccess->checkAccess(
187 "read",
188 "",
189 $this->ref_id
190 ) and !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
191 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
192 }
193 $info = new ilInfoScreenGUI($this);
194 $amd_gui = new ilAdvancedMDRecordGUI(
196 'orgu',
197 $this->object->getId(),
198 'orgu_type',
199 $this->object->getOrgUnitTypeId()
200 );
201 $amd_gui->setInfoObject($info);
202 $amd_gui->parse();
203 $this->ctrl->forwardCommand($info);
204 break;
205 case 'ilpermissiongui':
206 $this->tabs_gui->activateTab('perm_settings');
207 $ilPermissionGUI = new ilPermissionGUI($this);
208 $this->ctrl->forwardCommand($ilPermissionGUI);
209 break;
210 case "ilcommonactiondispatchergui":
212 $this->ctrl->forwardCommand($gui);
213 break;
214 case 'illearningprogressgui':
215 case 'illplistofprogressgui':
216 $this->tabs_gui->clearTargets();
217 $this->tabs_gui->setBackTarget(
218 $this->lng->txt('backto_staff'),
219 $this->ctrl->getLinkTargetByClass(
220 ilOrgUnitUserAssignmentGUI::class,
222 )
223 );
225 $this->object->getRefid(),
226 $_GET['obj_id']
227 )) {
228 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
229 $this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff");
230 }
231 $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
232 $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
233 $new_gui = new ilLearningProgressGUI(
235 $_GET["ref_id"],
236 $_GET['obj_id']
237 );
238 $this->ctrl->forwardCommand($new_gui);
239 break;
240 case 'ilorgunitexportgui':
241 if (!ilObjOrgUnitAccess::_checkAccessExport((int) $_GET['ref_id'])) {
242 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
243 $this->ctrl->redirect($this);
244 }
245 $this->tabs_gui->activateTab(self::TAB_EXPORT);
246 $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
247 $ilOrgUnitExportGUI->addFormat('xml');
248 $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
249 break;
250 case strtolower(ilTranslationGUI::class):
251 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
252 $this->setSubTabsSettings('edit_translations');
253 $ilTranslationGui = new ilTranslationGUI($this);
254 $this->ctrl->forwardCommand($ilTranslationGui);
255 break;
256 case strtolower(ilOrgUnitTypeGUI::class):
257 $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
258 $types_gui = new ilOrgUnitTypeGUI($this);
259 $this->ctrl->forwardCommand($types_gui);
260 break;
261 case strtolower(ilOrgUnitPositionGUI::class):
262 $this->tabs_gui->activateTab(self::TAB_POSITIONS);
263 $types_gui = new ilOrgUnitPositionGUI($this);
264 $this->ctrl->forwardCommand($types_gui);
265 break;
266 case strtolower(ilOrgUnitUserAssignmentGUI::class):
267 $this->tabs_gui->activateTab(self::TAB_STAFF);
268 $ilOrgUnitUserAssignmentGUI = new ilOrgUnitUserAssignmentGUI();
269 $this->ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
270 break;
271 case strtolower(ilPropertyFormGUI::class):
272 /*
273 * Only used for async loading of the repository tree in custom md
274 * internal links (see #24875). This is necessary since OrgUnits don't
275 * use ilObjectMetaDataGUI.
276 */
278 $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
279 $gui->setPropertyForm($form);
280 $gui->parse();
281 $this->ctrl->forwardCommand($form);
282 break;
283 default:
284 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
285 switch ($cmd) {
286 case '':
287 case 'view':
288 case 'render':
289 case 'cancel':
290 case 'cancelDelete':
291 $this->view();
292 break;
293 case 'performPaste':
294 case 'paste':
295 $this->performPaste();
296 break;
297 case 'performPasteIntoMultipleObjects':
299 break;
300 case 'keepObjectsInClipboard':
302 break;
303 case 'create':
304 parent::createObject();
305 break;
306 case 'save':
307 parent::saveObject();
308 break;
309 case 'delete':
310 $this->tabs_gui->clearTargets();
311 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
312 $this->deleteObject();
313 break;
314 case 'confirmedDelete':
315 $this->confirmedDeleteObject();
316 break;
317 case 'cut':
318 $this->tabs_gui->clearTargets();
319 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
320 parent::cutObject();
321 break;
322 case 'clear':
323 parent::clearObject();
324 break;
325 case 'enableAdministrationPanel':
326 parent::enableAdministrationPanelObject();
327 break;
328 case 'disableAdministrationPanel':
329 parent::disableAdministrationPanelObject();
330 break;
331 case 'getAsynchItemList':
332 parent::getAsynchItemListObject();
333 break;
335 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
336 $this->setSubTabsSettings('edit_settings');
337 $this->editSettings();
338 break;
339 case 'updateSettings':
340 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
341 $this->setSubTabsSettings('edit_settings');
342 $this->updateSettings();
343 break;
344 case 'editAdvancedSettings':
345 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
346 $this->setSubTabsSettings('edit_advanced_settings');
347 $this->editAdvancedSettings();
348 break;
349 case 'updateAdvancedSettings':
350 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
351 $this->setSubTabsSettings('edit_advanced_settings');
352 $this->updateAdvancedSettings();
353 break;
354 case 'importFile':
355 $this->importFileObject();
356 break;
357 case 'cancelMoveLink':
358 $this->cancelMoveLinkObject();
359 break;
360 }
361 break;
362 }
363 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
Class ilInfoScreenGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _checkAccessToUserLearningProgress(int $ref_id, int $usr_id)
static _checkAccessAdministrateUsers(int $ref_id)
static _checkAccessExport(int $ref_id)
confirmedDeleteObject()
confirmed deletion of org units -> org units are deleted immediately, without putting them to the tra...
updateAdvancedSettings()
Update Advanced Metadata.
deleteObject(bool $error=false)
Display deletion confirmation screen for Org Units.
editAdvancedSettings()
Edit Advanced Metadata.
performPaste()
@description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
setSubTabsSettings(string $active_tab_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
importFileObject(int $parent_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilOrgUnitPositionGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilOrgUnitUserAssignmentGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $_GET, ilContainerGUI\$form, ilObjOrgUnitAccess\_checkAccessAdministrateUsers(), ilObjOrgUnitAccess\_checkAccessExport(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ilContainerGUI\cancelMoveLinkObject(), ilAccess\checkAccess(), CMD_EDIT_SETTINGS, ILIAS\Modules\OrgUnit\ARHelper\BaseCommands\CMD_INDEX, confirmedDeleteObject(), ILIAS\Repository\ctrl(), deleteObject(), editAdvancedSettings(), editSettings(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\importFileObject(), initAdvancedSettingsForm(), ilContainerGUI\keepObjectsInClipboardObject(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_ORG_UNIT, ilAdvancedMDRecordGUI\MODE_EDITOR, ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), performPaste(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), setContentSubTabs(), setSubTabsSettings(), updateAdvancedSettings(), updateSettings(), and view().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjOrgUnitGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilContainerGUI.

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

752 : void
753 {
754 $this->getTabs();
755 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ Here is the call graph for this function:

◆ getTabs()

ilObjOrgUnitGUI::getTabs ( )

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilContainerGUI.

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

489 : void
490 {
491 $read_access_ref_id = $this->rbacsystem->checkAccess('visible, read', $this->object->getRefId());
492 if ($read_access_ref_id) {
493 $this->tabs_gui->addTab(
494 self::TAB_VIEW_CONTENT,
495 $this->lng->txt("content"),
496 $this->ctrl->getLinkTarget($this, "")
497 );
498 $this->tabs_gui->addTab(
499 "info_short",
500 "Info",
501 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
502 );
503 }
504
505 // Tabs for OrgUnits exclusive root!
506 if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
507 if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) {
508 // $this->tabs_gui->addTab('legacy_staff', 'legacy_staff', $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", "showStaff"));
509 $this->tabs_gui->addTab(
510 self::TAB_STAFF,
511 $this->lng->txt(self::TAB_STAFF),
512 $this->ctrl->getLinkTargetByClass(
513 ilOrgUnitUserAssignmentGUI::class,
515 )
516 );
517 }
518 if (ilObjOrgUnitAccess::_checkAccessSettings($this->object->getRefId())) {
519 $this->tabs_gui->addTab(
520 self::TAB_SETTINGS,
521 $this->lng->txt(self::TAB_SETTINGS),
522 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
523 );
524 }
526 $this->tabs_gui->addTab(
527 "administrate_users",
528 $this->lng->txt("administrate_users"),
529 $this->ctrl->getLinkTargetByClass("ilLocalUserGUI", "index")
530 );
531 }
532 }
533
534 if (ilObjOrgUnitAccess::_checkAccessSettings($this->object->getRefId())) {
535 if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
536 $this->tabs_gui->addTab(
537 self::TAB_GLOBAL_SETTINGS,
538 $this->lng->txt('settings'),
539 $this->ctrl->getLinkTargetByClass(ilOrgUnitGlobalSettingsGUI::class)
540 );
541 }
542 $this->tabs_gui->addTab(
543 self::TAB_EXPORT,
544 $this->lng->txt(self::TAB_EXPORT),
545 $this->ctrl->getLinkTargetByClass(ilOrgUnitExportGUI::class)
546 );
547
548 // Add OrgUnit types and positions tabs
549 if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
550 $this->tabs_gui->addTab(
551 self::TAB_ORGU_TYPES,
552 $this->lng->txt(self::TAB_ORGU_TYPES),
553 $this->ctrl->getLinkTargetByClass(ilOrgUnitTypeGUI::class)
554 );
555 $this->tabs_gui->addTab(
556 self::TAB_POSITIONS,
557 $this->lng->txt(self::TAB_POSITIONS),
558 $this->ctrl->getLinkTargetByClass(ilOrgUnitPositionGUI::class)
559 );
560 }
561 }
562 parent::getTabs();
563 }
static _checkAccessSettings(int $ref_id)
static _checkAccessStaff(int $ref_id)

References ilObjOrgUnitAccess\_checkAccessAdministrateUsers(), ilObjOrgUnitAccess\_checkAccessSettings(), ilObjOrgUnitAccess\_checkAccessStaff(), ILIAS\Modules\OrgUnit\ARHelper\BaseCommands\CMD_INDEX, ILIAS\Repository\ctrl(), ilObjOrgUnit\getRootOrgRefId(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by getAdminTabs().

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

◆ getTreeSelectorGUI()

ilObjOrgUnitGUI::getTreeSelectorGUI ( string  $cmd)
protected

Reimplemented from ilContainerGUI.

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

744 {
745 $explorer = new ilOrgUnitExplorerGUI("rep_exp_sel", $this, "showPasteTree", $this->tree);
746 $explorer->setAjax(false);
747 $explorer->setSelectMode('nodes[]', false);
748
749 return $explorer;
750 }
Class ilOrgUnitExplorerGUI.
Explorer class that works on tree objects (Services/Tree)

◆ initAdvancedSettingsForm()

ilObjOrgUnitGUI::initAdvancedSettingsForm ( )
protected

Initialize the form for editing advanced meta data.

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

632 {
633 $form = new ilPropertyFormGUI();
634 $form->setFormAction($this->ctrl->getFormAction($this));
635 $form->addCommandButton('updateAdvancedSettings', $this->lng->txt('save'));
636 $form->addCommandButton(self::CMD_EDIT_SETTINGS, $this->lng->txt('cancel'));
637
638 return $form;
639 }
setFormAction(string $a_formaction)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References ilContainerGUI\$form, ilPropertyFormGUI\addCommandButton(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilFormGUI\setFormAction().

Referenced by editAdvancedSettings(), executeCommand(), and updateAdvancedSettings().

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

◆ initCreationForms()

ilObjOrgUnitGUI::initCreationForms ( string  $new_type)
protected

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

Reimplemented from ilObjectGUI.

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

418 : array
419 {
420 $forms = array(
421 self::CFORM_NEW => $this->initCreateForm($new_type),
422 self::CFORM_IMPORT => $this->initImportForm($new_type),
423 );
424
425 return $forms;
426 }
initImportForm(string $new_type)
initCreateForm(string $new_type)

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

+ Here is the call graph for this function:

◆ performPaste()

ilObjOrgUnitGUI::performPaste ( )

@description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject

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

760 : void
761 {
762 if ($this->clipboard->getCmd() != 'cut') {
763 $message = __METHOD__ . ": cmd was not 'cut' ; may be a hack attempt!";
764 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
765 } else {
766 if ($this->clipboard->hasEntries()) {
767 $this->pasteObject();
768 }
769 }
770 $this->ctrl->returnToParent($this);
771 }
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
$message
Definition: xapiexit.php:32

References $message, ILIAS\Repository\ctrl(), and ilContainerGUI\pasteObject().

Referenced by executeCommand().

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

◆ redirectToRefId()

ilObjOrgUnitGUI::redirectToRefId ( int  $ref_id,
string  $cmd = "" 
)
protected

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 ["ref_id"] value of the request

Reimplemented from ilObjectGUI.

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

478 : void
479 {
480 $obj_type = ilObject::_lookupType($ref_id, true);
481 if ($obj_type !== "orgu") {
482 parent::redirectToRefId($ref_id, $cmd);
483 } else {
484 $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
485 $this->ctrl->redirectByClass("ilObjOrgUnitGUI", $cmd);
486 }
487 }
static _lookupType(int $id, bool $reference=false)

References ilObjectGUI\$ref_id, ilObject\_lookupType(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjOrgUnitGUI::setContentSubTabs ( )

Reimplemented from ilContainerGUI.

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

610 : void
611 {
613
614 $ref_id = $this->object->getRefId();
615 $may_create_orgus = $this->ilAccess->checkAccess("create_orgu", "", $ref_id, 'orgu');
616
617 if ($ref_id === ilObjOrgUnit::getRootOrgRefId() //only display the import tab at the first level
618 && $may_create_orgus
619 ) {
620 $this->tabs_gui->addSubTab(
621 "import",
622 $this->lng->txt("import"),
623 $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleImportGUI", "chooseImport")
624 );
625 }
626 }
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link.

References ilObjectGUI\$ref_id, ilContainerGUI\addStandardContainerSubTabs(), ilAccess\checkAccess(), ilObjOrgUnit\getRootOrgRefId(), and ILIAS\Repository\lng().

Referenced by executeCommand(), and view().

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

◆ setSubTabsSettings()

ilObjOrgUnitGUI::setSubTabsSettings ( string  $active_tab_id)
protected

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

565 : void
566 {
567 $next_class = $this->ctrl->getNextClass($this);
568 $cmd = $this->ctrl->getCmd();
569 $this->tabs_gui->addSubTab(
570 'edit_settings',
571 $this->lng->txt(self::TAB_SETTINGS),
572 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
573 );
574 $this->tabs_gui->addSubTab(
575 "edit_translations",
576 $this->lng->txt("obj_multilinguality"),
577 $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations")
578 );
579
580 $ilOrgUnitType = $this->object->getOrgUnitType();
581 if ($ilOrgUnitType instanceof ilOrgUnitType) {
582 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
583 $this->tabs_gui->addSubTab(
584 'edit_advanced_settings',
585 $this->lng->txt('orgu_adv_settings'),
586 $this->ctrl->getLinkTarget($this, 'editAdvancedSettings')
587 );
588 }
589 }
590
591 $this->tabs_gui->setSubTabActive($active_tab_id);
592 switch ($next_class) {
593 case 'iltranslationgui':
594 $this->tabs_gui->setSubTabActive("edit_translations");
595 break;
596 case '':
597 switch ($cmd) {
599 $this->tabs_gui->setSubTabActive('edit_settings');
600 break;
601 case 'editAdvancedSettings':
602 case 'updateAdvancedSettings':
603 $this->tabs_gui->setSubTabActive('edit_advanced_settings');
604 break;
605 }
606 break;
607 }
608 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References CMD_EDIT_SETTINGS, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand().

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

◆ setTitleAndDescription()

ilObjOrgUnitGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilContainerGUI.

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

440 : void
441 {
442 # all possible create permissions
443 parent::setTitleAndDescription();
444 if ($this->object->getTitle() === "__OrgUnitAdministration") {
445 $this->tpl->setTitle($this->lng->txt("objs_orgu"));
446 $this->tpl->setDescription($this->lng->txt("objs_orgu"));
447 }
448
449 // Check for custom icon of type
450 if ($this->ilias->getSetting('custom_icons')) {
451 $icons_cache = ilObjOrgUnit::getIconsCache();
452 $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] : '';
453 if ($icon_file) {
454 $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
455 }
456 }
457 }
static getIconsCache()
Returns an array that maps from OrgUnit object IDs to its icon defined by the assigned OrgUnit type.

References ilObjOrgUnit\getIconsCache(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilObjOrgUnitGUI::showAdministrationPanel ( )

Reimplemented from ilContainerGUI.

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

717 : void
718 {
719 parent::showAdministrationPanel();
720 //an ugly encapsulation violation in order to remove the "verknüpfen"/"link" and copy button.
721 if (empty($this->toolbar->items) === false) {
722 foreach ($this->toolbar->items as $key => $item) {
723 if ($item["cmd"] == "link" || $item["cmd"] == "copy"
724 || $item["cmd"] == "download"
725 ) {
726 unset($this->toolbar->items[$key]);
727 }
728 }
729 }
730 }

References ILIAS\LTI\ToolProvider\$key, and ILIAS\Repository\toolbar().

Referenced by view().

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

◆ showPossibleSubObjects()

ilObjOrgUnitGUI::showPossibleSubObjects ( )

show possible sub objects (pull down menu)

Reimplemented from ilContainerGUI.

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

428 : void
429 {
430 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
432 //$gui->setCreationUrl("ilias.php?ref_id=" . $_GET["ref_id"] . "&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI&cmdClass=ilobjorgunitgui");
433 $gui->setCreationUrl($this->ctrl->getLinkTarget($this, 'create'));
434 $gui->render();
435 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), ilObjectDefinition\MODE_ADMINISTRATION, and ILIAS\Repository\object().

Referenced by view().

+ 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 666 of file class.ilObjOrgUnitGUI.php.

666 : void
667 {
668 if (!$this->ilAccess->checkAccess('write', '', $this->ref_id)) {
669 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
670 $this->ctrl->redirect($this);
671 }
673 $gui = new ilAdvancedMDRecordGUI(
675 'orgu',
676 $this->object->getId(),
677 'orgu_type',
678 $this->object->getOrgUnitTypeId()
679 );
680 $gui->setPropertyForm($form);
681 $form->checkInput();
682 $gui->parse();
683 if ($gui->importEditFormPostValues()) {
684 $gui->writeEditForm();
685 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
686 $this->ctrl->redirect($this, 'editAdvancedSettings');
687 } else {
688 $this->tpl->setContent($form->getHTML());
689 }
690 }

References ilContainerGUI\$form, ilAccess\checkAccess(), ilPropertyFormGUI\checkInput(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), initAdvancedSettingsForm(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ILIAS\Repository\object().

Referenced by executeCommand().

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

◆ updateSettings()

ilObjOrgUnitGUI::updateSettings ( )

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

702 : void
703 {
704 if (!$this->ilAccess->checkAccess('write', '', $this->ref_id)) {
705 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
706 $this->ctrl->redirect($this);
707 }
708 $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
709 if ($form->saveObject()) {
710 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
711 $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
712 } else {
713 $this->tpl->setContent($form->getHTML());
714 }
715 }

References ilContainerGUI\$form, ilAccess\checkAccess(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), and ILIAS\Repository\lng().

Referenced by executeCommand().

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

◆ view()

ilObjOrgUnitGUI::view ( )

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

377 : void
378 {
379 if (!$this->rbacsystem->checkAccess("read", $_GET["ref_id"])) {
380 if ($this->rbacsystem->checkAccess("visible", $_GET["ref_id"])) {
381 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_perm_read"));
382 $this->ctrl->redirectByClass('ilinfoscreengui', '');
383 }
384
385 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
386 }
387
388 $container_view = $this->getContentGUI();
389
390 $this->setContentSubTabs();
391 if ($this->isActiveAdministrationPanel()) {
392 $this->tabs->activateSubTab("manage");
393 } else {
394 $this->tabs->activateSubTab("view_content");
395 }
396
397 $container_view->setOutput();
398
399 $this->adminCommands = $container_view->adminCommands;
400
401 // it is important not to show the subobjects/admin panel here, since
402 // we will create nested forms in case, e.g. a news/calendar item is added
403 if (! $this->ctrl->isAsynch()) {
405 $this->showPossibleSubObjects();
406 }
407 $this->showPermanentLink();
408 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
409 $this->tabs_gui->removeSubTab("page_editor");
410 $this->tabs_gui->removeSubTab("ordering"); // Mantis 0014728
411 }
showPossibleSubObjects()
show possible sub objects (pull down menu)

References $_GET, ILIAS\Repository\ctrl(), ilContainerGUI\getContentGUI(), ilContainerGUI\isActiveAdministrationPanel(), ILIAS\Repository\lng(), setContentSubTabs(), showAdministrationPanel(), ilContainerGUI\showPermanentLink(), showPossibleSubObjects(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

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

Field Documentation

◆ $ctrl

ilCtrl ilObjOrgUnitGUI::$ctrl

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

Referenced by deleteObject().

◆ $ilAccess

ilAccessHandler ilObjOrgUnitGUI::$ilAccess
protected

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

◆ $ilias

Ilias ilObjOrgUnitGUI::$ilias

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

◆ $ilLocator

ilLocatorGUI ilObjOrgUnitGUI::$ilLocator
protected

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

◆ $ilLog

ILIAS DI LoggingServices ilObjOrgUnitGUI::$ilLog
protected

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

◆ $object

ilObject ilObjOrgUnitGUI::$object

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

◆ $tabs_gui

ilTabsGUI ilObjOrgUnitGUI::$tabs_gui

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

◆ $toolbar

ilToolbarGUI ilObjOrgUnitGUI::$toolbar
protected

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

◆ $tree

ilTree ilObjOrgUnitGUI::$tree

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

◆ CMD_EDIT_SETTINGS

const ilObjOrgUnitGUI::CMD_EDIT_SETTINGS = 'editSettings'

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

Referenced by executeCommand(), and setSubTabsSettings().

◆ TAB_EXPORT

const ilObjOrgUnitGUI::TAB_EXPORT = 'export'

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

◆ TAB_GLOBAL_SETTINGS

const ilObjOrgUnitGUI::TAB_GLOBAL_SETTINGS = 'global_settings'

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

◆ TAB_ORGU_TYPES

const ilObjOrgUnitGUI::TAB_ORGU_TYPES = 'orgu_types'

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

◆ TAB_POSITIONS

const ilObjOrgUnitGUI::TAB_POSITIONS = 'positions'

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

Referenced by ilOrgUnitPositionGUI\getActiveTabId().

◆ TAB_SETTINGS

const ilObjOrgUnitGUI::TAB_SETTINGS = "settings"

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

◆ TAB_STAFF

const ilObjOrgUnitGUI::TAB_STAFF = 'orgu_staff'

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

◆ TAB_VIEW_CONTENT

const ilObjOrgUnitGUI::TAB_VIEW_CONTENT = 'view_content'

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


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