ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjOrgUnitGUI Class Reference

Class ilObjOrgUnit GUI class. More...

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

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 view ()
 
 getCreatableObjectTypes ()
 
 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 ()
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 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 ()
 
 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
 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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)
 
 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 ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _goto (string $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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) 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
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 supportsPageEditor ()
 
 gotItems ()
 
 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 ()
 
 createActionDispatcherGUI ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ilAccessHandler $ilAccess
 
ilToolbarGUI $toolbar
 
ilLocatorGUI $ilLocator
 
ILIAS DI LoggingServices $ilLog
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
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
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 65 of file class.ilObjOrgUnitGUI.php.

66 {
67 global $DIC;
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
76 $this->ctrl = $dic['ctrl'];
77 $this->ilAccess = $dic['access'];
78 $to_int = $dic['refinery']->kindlyTo()->int();
79 $this->ref_id = $dic['query']->retrieve('ref_id', $to_int);
80
81 parent::__construct(array(), $this->ref_id, true, false);
82
83 $this->lng = $dic['lng'];
84 $this->lng->loadLanguageModule("orgu");
85
86 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
87 OrgUnitToolProvider::SHOW_ORGU_TREE,
88 true
89 );
90 }
Class ilAccessHandler Checks access for ILIAS objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: class.ilLog.php:31
$dic
Definition: ltiresult.php:33
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.
global $DIC
Definition: shib_login.php:26

References $DIC, $dic, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilOrgUnitLocalDIC\dic(), ILIAS\Repository\lng(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjOrgUnitGUI::_goto ( string  $ref_id)
static

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

763 : void
764 {
765 global $DIC;
766 $ilCtrl = $DIC['ilCtrl'];
767 $ilCtrl->setTargetScript('ilias.php');
768 $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
769 $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", self::TAB_SETTINGS);
770 $ilCtrl->setParameterByClass("IlObjPluginDispatchGUI", "admin_mode", self::TAB_SETTINGS);
771 $ilCtrl->redirectByClass(array("ilAdministrationGUI", "ilObjOrgUnitGUI"), "view");
772 }

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

479 : void
480 {
481 $path = $this->tree->getPathFull($this->ref_id, ilObjOrgUnit::getRootOrgRefId());
482 // add item for each node on path
483 foreach ((array) $path as $key => $row) {
484 if ($row["title"] === "__OrgUnitAdministration") {
485 $row["title"] = $this->lng->txt("objs_orgu");
486 }
487 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
488 $this->ilLocator->addItem(
489 $row["title"],
490 $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"),
491 ilFrameTargetInfo::_getFrame("MainContent"),
492 $row["child"]
493 );
494 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $this->ref_id);
495 }
496 }
static _getFrame(string $a_class)
static getRootOrgRefId()
$path
Definition: ltiservices.php:30

References $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 376 of file class.ilObjOrgUnitGUI.php.

376 : void
377 {
378 $new_object->writePath();
379 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
380 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
381
383 "save",
384 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS, "")
385 ));
386 }
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 816 of file class.ilObjOrgUnitGUI.php.

816 : void
817 {
818 $ids = filter_input(INPUT_POST, 'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
819 if (count($ids) > 0) {
821 $this->tpl->setOnScreenMessage('success', $this->lng->txt("info_deleted"), true);
822 }
823 $this->ctrl->returnToParent($this);
824 }
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 830 of file class.ilObjOrgUnitGUI.php.

830 : void
831 {
832 $ilCtrl = $this->ctrl;
833 $ru = new ilRepositoryTrashGUI($this);
834
835 $arr_ref_ids = [];
836 //Delete via Manage (more than one)
837 if (isset($_POST["id"]) && is_array($_POST['id']) && count($_POST['id']) > 0) {
838 $arr_ref_ids = $_POST['id'];
839 } elseif (isset($_GET['item_ref_id']) && (int) $_GET['item_ref_id'] > 0) {
840 $arr_ref_ids = [(int) $_GET['item_ref_id']];
841 }
842
843 if (!$ru->showDeleteConfirmation($arr_ref_ids, false)) {
844 $ilCtrl->returnToParent($this);
845 }
846 }
Repository GUI Utilities.
$_GET['cmd']
Definition: lti.php:26
$_POST['cmd']
Definition: lti.php:27

References $_GET, $_POST, $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 804 of file class.ilObjOrgUnitGUI.php.

804 : void
805 {
806 }

◆ editAdvancedSettings()

ilObjOrgUnitGUI::editAdvancedSettings ( )
protected

Edit Advanced Metadata.

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

675 : void
676 {
677 if ($this->ilAccess->checkAccess("write", "", $this->ref_id) === false) {
678 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
679 $this->ctrl->redirect($this);
680 }
684 'orgu',
685 $this->object->getId(),
686 'orgu_type',
687 $this->object->getOrgUnitTypeId()
688 );
689 $gui->setPropertyForm($form);
690 $gui->parse();
691 $this->tpl->setContent($form->getHTML());
692 }
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)
ILIAS Container InternalGUIService $gui
ilPropertyFormGUI $form
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.

References ilContainerGUI\$form, ilContainerGUI\$gui, 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 723 of file class.ilObjOrgUnitGUI.php.

723 : void
724 {
725 if (!$this->ilAccess->checkAccess('write', "", $this->ref_id)) {
726 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
727 $this->ctrl->redirect($this);
728 }
729 $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
730 $this->tpl->setContent($form->getHTML());
731 }
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 97 of file class.ilObjOrgUnitGUI.php.

97 : void
98 {
99 $cmd = $this->ctrl->getCmd();
100 $next_class = $this->ctrl->getNextClass($this);
101 parent::prepareOutput();
102
103 switch ($next_class) {
104 case 'ilorgunitglobalsettingsgui':
105 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
106 $global_settings = new ilOrgUnitGlobalSettingsGUI();
107 $this->ctrl->forwardCommand($global_settings);
108 break;
109 case "illocalusergui":
111 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
112 $this->ctrl->redirect($this);
113 }
114 $this->tabs_gui->activateTab('administrate_users');
115 $ilLocalUserGUI = new ilLocalUserGUI($this);
116 $this->ctrl->forwardCommand($ilLocalUserGUI);
117 break;
118 case "ilorgunitsimpleimportgui":
119 $this->tabs_gui->activateTab("view");
120 $this->setContentSubTabs();
121 $this->tabs_gui->setSubTabActive('import');
122 $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
123 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
124 break;
125 case "ilorgunitsimpleuserimportgui":
126 $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
127 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
128 break;
129 case "ilobjusergui":
130 switch ($cmd) {
131 case "create":
132 $ilObjUserGUI = new ilObjUserGUI("", $this->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("", $this->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("", $this->ref_id, true, false);
173 $ilObjUserFolderGUI->setUserOwnerId($this->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 (int) $_GET['obj_id']
227 )) {
228 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
229 $this->ctrl->redirectByClass("ilOrgUnitUserAssignmentGUI", "index");
230 }
231 $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
232 $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
233 $new_gui = new ilLearningProgressGUI(
235 $this->ref_id,
236 (int) $_GET['obj_id']
237 );
238 $this->ctrl->forwardCommand($new_gui);
239 break;
240 case 'ilorgunitexportgui':
241 if (!ilObjOrgUnitAccess::_checkAccessExport($this->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(TranslationGUI::class):
251 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
252 $this->setSubTabsSettings('edit_translations');
253 $translations_gui = new TranslationGUI(
254 $this->getObject(),
255 $this->lng,
256 $this->access,
257 $this->user,
258 $this->ctrl,
259 $this->tpl,
260 $this->ui_factory,
261 $this->ui_renderer,
262 $this->http,
263 $this->refinery,
264 $this->toolbar
265 );
266 $translations_gui->supportContentTranslation(false);
267 $this->ctrl->forwardCommand($translations_gui);
268 break;
269 case strtolower(ilOrgUnitTypeGUI::class):
270 $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
271 $types_gui = new ilOrgUnitTypeGUI($this);
272 $this->ctrl->forwardCommand($types_gui);
273 break;
274 case strtolower(ilOrgUnitPositionGUI::class):
275 $this->tabs_gui->activateTab(self::TAB_POSITIONS);
276 $types_gui = new ilOrgUnitPositionGUI($this);
277 $this->ctrl->forwardCommand($types_gui);
278 break;
279 case strtolower(ilOrgUnitUserAssignmentGUI::class):
280 $this->tabs_gui->activateTab(self::TAB_STAFF);
281 $ilOrgUnitUserAssignmentGUI = new ilOrgUnitUserAssignmentGUI();
282 $this->ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
283 break;
284 case strtolower(ilPropertyFormGUI::class):
285 /*
286 * Only used for async loading of the repository tree in custom md
287 * internal links (see #24875). This is necessary since OrgUnits don't
288 * use ilObjectMetaDataGUI.
289 */
291 $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
292 $gui->setPropertyForm($form);
293 $gui->parse();
294 $this->ctrl->forwardCommand($form);
295 break;
296 default:
297 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
298 switch ($cmd) {
299 case '':
300 case 'view':
301 case 'render':
302 case 'cancel':
303 case 'cancelDelete':
304 case 'return':
305 $this->view();
306 break;
307 case 'performPaste':
308 case 'paste':
309 $this->performPaste();
310 break;
311 case 'performPasteIntoMultipleObjects':
313 break;
314 case 'keepObjectsInClipboard':
316 break;
317 case 'create':
318 parent::createObject();
319 break;
320 case 'save':
321 parent::saveObject();
322 break;
323 case 'delete':
324 $this->tabs_gui->clearTargets();
325 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
326 $this->deleteObject();
327 break;
328 case 'confirmedDelete':
329 $this->confirmedDeleteObject();
330 break;
331 case 'cut':
332 $this->tabs_gui->clearTargets();
333 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
334 parent::cutObject();
335 break;
336 case 'clear':
337 parent::clearObject();
338 break;
339 case 'enableAdministrationPanel':
340 parent::enableAdministrationPanelObject();
341 break;
342 case 'disableAdministrationPanel':
343 parent::disableAdministrationPanelObject();
344 break;
346 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
347 $this->setSubTabsSettings('edit_settings');
348 $this->editSettings();
349 break;
350 case 'updateSettings':
351 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
352 $this->setSubTabsSettings('edit_settings');
353 $this->updateSettings();
354 break;
355 case 'editAdvancedSettings':
356 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
357 $this->setSubTabsSettings('edit_advanced_settings');
358 $this->editAdvancedSettings();
359 break;
360 case 'updateAdvancedSettings':
361 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
362 $this->setSubTabsSettings('edit_advanced_settings');
363 $this->updateAdvancedSettings();
364 break;
365 case 'routeImportCmd':
366 $this->routeImportCmdObject();
367 break;
368 case 'cancelMoveLink':
369 $this->cancelMoveLinkObject();
370 break;
371 }
372 break;
373 }
374 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
Class ilInfoScreenGUI.
Class ilObjUserTrackingGUI.
Class ilLocalUserGUI.
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)
Class ilObjUserGUI.
Class ilOrgUnitExportGUI.
Class ilOrgUnitPositionGUI.
Class ilOrgUnitSimpleImportGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilOrgUnitTypeGUI.
Class ilOrgUnitUserAssignmentGUI.
$info
Definition: entry_point.php:21
static http()
Fetches the global http state from ILIAS.

References $_GET, ilContainerGUI\$form, ilContainerGUI\$gui, $info, ilObjOrgUnitAccess\_checkAccessAdministrateUsers(), ilObjOrgUnitAccess\_checkAccessExport(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ILIAS\Repository\access(), ilContainerGUI\cancelMoveLinkObject(), ilAccess\checkAccess(), CMD_EDIT_SETTINGS, ILIAS\components\OrgUnit\ARHelper\BaseCommands\CMD_INDEX, confirmedDeleteObject(), ILIAS\Repository\ctrl(), deleteObject(), editAdvancedSettings(), editSettings(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\getObject(), ILIAS\FileDelivery\http(), initAdvancedSettingsForm(), ilContainerGUI\keepObjectsInClipboardObject(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_ORG_UNIT, ilAdvancedMDRecordGUI\MODE_EDITOR, ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), performPaste(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ILIAS\Repository\refinery(), ilObjectGUI\routeImportCmdObject(), setContentSubTabs(), setSubTabsSettings(), ILIAS\Repository\toolbar(), updateAdvancedSettings(), updateSettings(), ILIAS\Repository\user(), 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 783 of file class.ilObjOrgUnitGUI.php.

783 : void
784 {
785 $this->getTabs();
786 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ Here is the call graph for this function:

◆ getCreatableObjectTypes()

ilObjOrgUnitGUI::getCreatableObjectTypes ( )

Reimplemented from ilObjectGUI.

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

442 : array
443 {
444 $subtypes = $this->obj_definition->getCreatableSubObjects(
445 $this->object->getType(),
447 $this->object->getRefId()
448 );
449 unset($subtypes[ilObjEmployeeTalkSeries::TYPE]);
450 return array_filter(
451 $subtypes,
452 fn($key) => $this->access->checkAccess('create_' . $key, '', $this->ref_id, $this->type),
453 ARRAY_FILTER_USE_KEY
454 );
455 }

References ILIAS\Repository\access(), ilObjectDefinition\MODE_ADMINISTRATION, ILIAS\Repository\object(), and ilObjEmployeeTalkSeries\TYPE.

Referenced by showPossibleSubObjects().

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

◆ getTabs()

ilObjOrgUnitGUI::getTabs ( )

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilContainerGUI.

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

509 : void
510 {
511 $read_access_ref_id = $this->rbacsystem->checkAccess('visible', $this->object->getRefId())
512 && $this->rbacsystem->checkAccess('read', $this->object->getRefId());
513 if ($read_access_ref_id) {
514 $this->tabs_gui->addTab(
515 self::TAB_VIEW_CONTENT,
516 $this->lng->txt("content"),
517 $this->ctrl->getLinkTarget($this, "")
518 );
519 $this->tabs_gui->addTab(
520 "info_short",
521 "Info",
522 $this->ctrl->getLinkTargetByClass([self::class, ilInfoScreenGUI::class], "showSummary")
523 );
524 }
525
526 // Tabs for OrgUnits exclusive root!
527 if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
528 if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) {
529 $this->tabs_gui->addTab(
530 self::TAB_STAFF,
531 $this->lng->txt(self::TAB_STAFF),
532 $this->ctrl->getLinkTargetByClass(
533 [self::class, ilOrgUnitUserAssignmentGUI::class],
535 )
536 );
537 }
538 if (ilObjOrgUnitAccess::_checkAccessSettings($this->object->getRefId())) {
539 $this->tabs_gui->addTab(
540 self::TAB_SETTINGS,
541 $this->lng->txt(self::TAB_SETTINGS),
542 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
543 );
544 }
546 $this->tabs_gui->addTab(
547 "administrate_users",
548 $this->lng->txt("administrate_users"),
549 $this->ctrl->getLinkTargetByClass(
550 [self::class, ilLocalUserGUI::class],
551 'index'
552 )
553 );
554 }
555 }
556
557 if (ilObjOrgUnitAccess::_checkAccessSettings($this->object->getRefId())) {
558 if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
559 $this->tabs_gui->addTab(
560 self::TAB_GLOBAL_SETTINGS,
561 $this->lng->txt('settings'),
562 $this->ctrl->getLinkTargetByClass(
563 [self::class, ilOrgUnitGlobalSettingsGUI::class]
564 )
565 );
566 }
567 $this->tabs_gui->addTab(
568 self::TAB_EXPORT,
569 $this->lng->txt(self::TAB_EXPORT),
570 $this->ctrl->getLinkTargetByClass(
571 [self::class, ilOrgUnitExportGUI::class]
572 )
573 );
574
575 // Add OrgUnit types and positions tabs
576 if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
577 $this->tabs_gui->addTab(
578 self::TAB_ORGU_TYPES,
579 $this->lng->txt(self::TAB_ORGU_TYPES),
580 $this->ctrl->getLinkTargetByClass(
581 [self::class, ilOrgUnitTypeGUI::class]
582 )
583 );
584 $this->tabs_gui->addTab(
585 self::TAB_POSITIONS,
586 $this->lng->txt(self::TAB_POSITIONS),
587 $this->ctrl->getLinkTargetByClass(
588 [self::class, ilOrgUnitPositionGUI::class]
589 )
590 );
591 }
592 }
593 parent::getTabs();
594 }
static _checkAccessSettings(int $ref_id)
static _checkAccessStaff(int $ref_id)

References ilObjOrgUnitAccess\_checkAccessAdministrateUsers(), ilObjOrgUnitAccess\_checkAccessSettings(), ilObjOrgUnitAccess\_checkAccessStaff(), ILIAS\components\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 774 of file class.ilObjOrgUnitGUI.php.

775 {
776 $explorer = new ilOrgUnitExplorerGUI("rep_exp_sel", $this, "showPasteTree", $this->tree);
777 $explorer->setAjax(false);
778 $explorer->setSelectMode('nodes[]', false);
779
780 return $explorer;
781 }
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 662 of file class.ilObjOrgUnitGUI.php.

663 {
664 $form = new ilPropertyFormGUI();
665 $form->setFormAction($this->ctrl->getFormAction($this));
666 $form->addCommandButton('updateAdvancedSettings', $this->lng->txt('save'));
667 $form->addCommandButton(self::CMD_EDIT_SETTINGS, $this->lng->txt('cancel'));
668
669 return $form;
670 }
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:

◆ performPaste()

ilObjOrgUnitGUI::performPaste ( )

@description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject

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

791 : void
792 {
793 if ($this->clipboard->getCmd() != 'cut') {
794 $message = __METHOD__ . ": cmd was not 'cut' ; may be a hack attempt!";
795 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
796 } else {
797 if ($this->clipboard->hasEntries()) {
798 $this->pasteObject();
799 }
800 }
801 $this->ctrl->returnToParent($this);
802 }
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
$message
Definition: xapiexit.php:31

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

498 : void
499 {
500 $obj_type = ilObject::_lookupType($ref_id, true);
501 if ($obj_type !== "orgu") {
502 parent::redirectToRefId($ref_id, $cmd);
503 } else {
504 $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
505 $this->ctrl->redirectByClass("ilObjOrgUnitGUI", $cmd);
506 }
507 }
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 641 of file class.ilObjOrgUnitGUI.php.

641 : void
642 {
644
645 $ref_id = $this->object->getRefId();
646 $may_create_orgus = $this->ilAccess->checkAccess("create_orgu", "", $ref_id, 'orgu');
647
648 if ($ref_id === ilObjOrgUnit::getRootOrgRefId() //only display the import tab at the first level
649 && $may_create_orgus
650 ) {
651 $this->tabs_gui->addSubTab(
652 "import",
653 $this->lng->txt("import"),
654 $this->ctrl->getLinkTargetByClass([self::class, ilOrgUnitSimpleImportGUI::class], "chooseImport")
655 );
656 }
657 }
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 596 of file class.ilObjOrgUnitGUI.php.

596 : void
597 {
598 $next_class = $this->ctrl->getNextClass($this);
599 $cmd = $this->ctrl->getCmd();
600 $this->tabs_gui->addSubTab(
601 'edit_settings',
602 $this->lng->txt(self::TAB_SETTINGS),
603 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
604 );
605 $this->tabs_gui->addSubTab(
606 "edit_translations",
607 $this->lng->txt("obj_multilinguality"),
608 $this->ctrl->getLinkTargetByClass(TranslationGUI::class, "listTranslations")
609 );
610
611 $ilOrgUnitType = $this->object->getOrgUnitType();
612 if ($ilOrgUnitType instanceof ilOrgUnitType) {
613 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
614 $this->tabs_gui->addSubTab(
615 'edit_advanced_settings',
616 $this->lng->txt('orgu_adv_settings'),
617 $this->ctrl->getLinkTarget($this, 'editAdvancedSettings')
618 );
619 }
620 }
621
622 $this->tabs_gui->setSubTabActive($active_tab_id);
623 switch ($next_class) {
624 case strtolower(TranslationGUI::class):
625 $this->tabs_gui->setSubTabActive("edit_translations");
626 break;
627 case '':
628 switch ($cmd) {
630 $this->tabs_gui->setSubTabActive('edit_settings');
631 break;
632 case 'editAdvancedSettings':
633 case 'updateAdvancedSettings':
634 $this->tabs_gui->setSubTabActive('edit_advanced_settings');
635 break;
636 }
637 break;
638 }
639 }
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 460 of file class.ilObjOrgUnitGUI.php.

460 : void
461 {
462 # all possible create permissions
463 parent::setTitleAndDescription();
464 if ($this->object->getTitle() === "__OrgUnitAdministration") {
465 $this->tpl->setTitle($this->lng->txt("objs_orgu"));
466 $this->tpl->setDescription($this->lng->txt("objs_orgu"));
467 }
468
469 // Check for custom icon of type
470 if ($this->ilias->getSetting('custom_icons')) {
471 $icons_cache = ilObjOrgUnit::getIconsCache();
472 $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] : '';
473 if ($icon_file) {
474 $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
475 }
476 }
477 }
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 748 of file class.ilObjOrgUnitGUI.php.

748 : void
749 {
750 parent::showAdministrationPanel();
751 //an ugly encapsulation violation in order to remove the "verknüpfen"/"link" and copy button.
752 if (empty($this->toolbar->items) === false) {
753 foreach ($this->toolbar->items as $key => $item) {
754 if ($item["cmd"] == "link" || $item["cmd"] == "copy"
755 || $item["cmd"] == "download"
756 ) {
757 unset($this->toolbar->items[$key]);
758 }
759 }
760 }
761 }

References 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 ( )
protected

show possible sub objects (pull down menu)

Reimplemented from ilContainerGUI.

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

425 : void
426 {
427 $subtypes = $this->getCreatableObjectTypes();
428 if ($subtypes === []) {
429 return;
430 }
432 [$this->buildGroup(
433 self::class,
434 array_keys($subtypes),
435 $this->lng->txt('other'),
436 $subtypes
437 )]
438 );
439 $gui->render();
440 }
Render add new item selector.
buildGroup(string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)

References ilContainerGUI\$gui, ilObjectGUI\buildGroup(), getCreatableObjectTypes(), and ILIAS\Repository\lng().

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

697 : void
698 {
699 if (!$this->ilAccess->checkAccess('write', '', $this->ref_id)) {
700 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
701 $this->ctrl->redirect($this);
702 }
706 'orgu',
707 $this->object->getId(),
708 'orgu_type',
709 $this->object->getOrgUnitTypeId()
710 );
711 $gui->setPropertyForm($form);
712 $form->checkInput();
713 $gui->parse();
714 if ($gui->importEditFormPostValues()) {
715 $gui->writeEditForm();
716 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
717 $this->ctrl->redirect($this, 'editAdvancedSettings');
718 } else {
719 $this->tpl->setContent($form->getHTML());
720 }
721 }

References ilContainerGUI\$form, ilContainerGUI\$gui, 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 733 of file class.ilObjOrgUnitGUI.php.

733 : void
734 {
735 if (!$this->ilAccess->checkAccess('write', '', $this->ref_id)) {
736 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
737 $this->ctrl->redirect($this);
738 }
739 $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
740 if ($form->saveObject()) {
741 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
742 $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
743 } else {
744 $this->tpl->setContent($form->getHTML());
745 }
746 }

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

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

References 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 55 of file class.ilObjOrgUnitGUI.php.

Referenced by deleteObject().

◆ $ilAccess

ilAccessHandler ilObjOrgUnitGUI::$ilAccess
protected

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

◆ $ilias

Ilias ilObjOrgUnitGUI::$ilias

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

◆ $ilLocator

ilLocatorGUI ilObjOrgUnitGUI::$ilLocator
protected

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

◆ $ilLog

ILIAS DI LoggingServices ilObjOrgUnitGUI::$ilLog
protected

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

◆ $object

ilObject ilObjOrgUnitGUI::$object

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

◆ $tabs_gui

ilTabsGUI ilObjOrgUnitGUI::$tabs_gui

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

◆ $toolbar

ilToolbarGUI ilObjOrgUnitGUI::$toolbar
protected

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

◆ $tree

ilTree ilObjOrgUnitGUI::$tree

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

◆ CMD_EDIT_SETTINGS

const ilObjOrgUnitGUI::CMD_EDIT_SETTINGS = 'editSettings'

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

Referenced by executeCommand(), and setSubTabsSettings().

◆ TAB_EXPORT

const ilObjOrgUnitGUI::TAB_EXPORT = 'export'

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

◆ TAB_GLOBAL_SETTINGS

const ilObjOrgUnitGUI::TAB_GLOBAL_SETTINGS = 'global_settings'

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

◆ TAB_ORGU_TYPES

const ilObjOrgUnitGUI::TAB_ORGU_TYPES = 'orgu_types'

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

◆ TAB_POSITIONS

const ilObjOrgUnitGUI::TAB_POSITIONS = 'positions'

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

Referenced by ilOrgUnitPositionGUI\getActiveTabId().

◆ TAB_SETTINGS

const ilObjOrgUnitGUI::TAB_SETTINGS = "settings"

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

◆ TAB_STAFF

const ilObjOrgUnitGUI::TAB_STAFF = 'orgu_staff'

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

◆ TAB_VIEW_CONTENT

const ilObjOrgUnitGUI::TAB_VIEW_CONTENT = 'view_content'

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


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