ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 setContentSubTabs ()
 
 editSettings ()
 
 updateSettings ()
 
 showAdministrationPanel ()
 
 getAdminTabs ()
 
 performPaste ()
 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 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 ()
 
 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)
 
 showPossibleSubObjects ()
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 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 ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 
 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 ()
 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
 
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
 
ilObjectCustomIconFactory $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 64 of file class.ilObjOrgUnitGUI.php.

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

65  {
66  global $DIC;
67  $this->ilLocator = $DIC['ilLocator'];
68  $this->tree = $DIC->repositoryTree();
69  $this->toolbar = $DIC->toolbar();
70  $this->ilLog = $DIC->logger();
71  $this->ilias = $DIC['ilias'];
72  $this->type = 'orgu';
73 
75  $this->ctrl = $dic['ctrl'];
76  $this->ilAccess = $dic['access'];
77  $to_int = $dic['refinery']->kindlyTo()->int();
78  $this->ref_id = $dic['query']->retrieve('ref_id', $to_int);
79 
80  parent::__construct(array(), $this->ref_id, true, false);
81 
82  $this->lng = $dic['lng'];
83  $this->lng->loadLanguageModule("orgu");
84 
85  $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
86  OrgUnitToolProvider::SHOW_ORGU_TREE,
87  true
88  );
89  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: class.ilLog.php:30
global $DIC
Definition: shib_login.php:22
Class ilObjForumAdministration.
__construct(Container $dic, ilPlugin $plugin)
$dic
Definition: result.php:31
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjOrgUnitGUI::_goto ( string  $ref_id)
static

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

References $DIC.

750  : void
751  {
752  global $DIC;
753  $ilCtrl = $DIC['ilCtrl'];
754  $ilCtrl->setTargetScript('ilias.php');
755  $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
756  $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", self::TAB_SETTINGS);
757  $ilCtrl->setParameterByClass("IlObjPluginDispatchGUI", "admin_mode", self::TAB_SETTINGS);
758  $ilCtrl->redirectByClass(array("ilAdministrationGUI", "ilObjOrgUnitGUI"), "view");
759  }
global $DIC
Definition: shib_login.php:22

◆ addAdminLocatorItems()

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

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

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

466  : void
467  {
468  $path = $this->tree->getPathFull($this->ref_id, ilObjOrgUnit::getRootOrgRefId());
469  // add item for each node on path
470  foreach ((array) $path as $key => $row) {
471  if ($row["title"] === "__OrgUnitAdministration") {
472  $row["title"] = $this->lng->txt("objs_orgu");
473  }
474  $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
475  $this->ilLocator->addItem(
476  $row["title"],
477  $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"),
478  ilFrameTargetInfo::_getFrame("MainContent"),
479  $row["child"]
480  );
481  $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $this->ref_id);
482  }
483  }
$path
Definition: ltiservices.php:29
static getRootOrgRefId()
static _getFrame(string $a_class)
+ Here is the call graph for this function:

◆ afterSave()

ilObjOrgUnitGUI::afterSave ( ilObject  $new_object)
protected

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

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

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

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

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

Referenced by executeCommand().

803  : void
804  {
805  $ids = filter_input(INPUT_POST, 'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
806  if (count($ids) > 0) {
808  $this->tpl->setOnScreenMessage('success', $this->lng->txt("info_deleted"), true);
809  }
810  $this->ctrl->returnToParent($this);
811  }
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() ...
+ 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.

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

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

Referenced by executeCommand().

817  : void
818  {
819  $ilCtrl = $this->ctrl;
820  $ru = new ilRepositoryTrashGUI($this);
821 
822  $arr_ref_ids = [];
823  //Delete via Manage (more than one)
824  if (isset($_POST["id"]) && is_array($_POST['id']) && count($_POST['id']) > 0) {
825  $arr_ref_ids = $_POST['id'];
826  } elseif (isset($_GET['item_ref_id']) && (int) $_GET['item_ref_id'] > 0) {
827  $arr_ref_ids = [(int) $_GET['item_ref_id']];
828  }
829 
830  if (!$ru->showDeleteConfirmation($arr_ref_ids, false)) {
831  $ilCtrl->returnToParent($this);
832  }
833  }
$_GET["client_id"]
Definition: webdav.php:30
Repository GUI Utilities.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUserAutoCompleteObject()

ilObjOrgUnitGUI::doUserAutoCompleteObject ( )

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

791  : void
792  {
793  }

◆ editAdvancedSettings()

ilObjOrgUnitGUI::editAdvancedSettings ( )
protected

Edit Advanced Metadata.

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

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

Referenced by executeCommand().

662  : void
663  {
664  if ($this->ilAccess->checkAccess("write", "", $this->ref_id) === false) {
665  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
666  $this->ctrl->redirect($this);
667  }
668  $form = $this->initAdvancedSettingsForm();
671  'orgu',
672  $this->object->getId(),
673  'orgu_type',
674  $this->object->getOrgUnitTypeId()
675  );
676  $gui->setPropertyForm($form);
677  $gui->parse();
678  $this->tpl->setContent($form->getHTML());
679  }
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
ilPropertyFormGUI $form
ILIAS Container InternalGUIService $gui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editSettings()

ilObjOrgUnitGUI::editSettings ( )

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

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

Referenced by executeCommand().

710  : void
711  {
712  if (!$this->ilAccess->checkAccess('write', "", $this->ref_id)) {
713  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
714  $this->ctrl->redirect($this);
715  }
716  $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
717  $this->tpl->setContent($form->getHTML());
718  }
ilPropertyFormGUI $form
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjOrgUnitGUI::executeCommand ( )
Exceptions
ilCtrlException
ilException
ilRepositoryException

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

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

96  : void
97  {
98  $cmd = $this->ctrl->getCmd();
99  $next_class = $this->ctrl->getNextClass($this);
100  parent::prepareOutput();
101 
102  switch ($next_class) {
103  case 'ilorgunitglobalsettingsgui':
104  $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
105  $global_settings = new ilOrgUnitGlobalSettingsGUI();
106  $this->ctrl->forwardCommand($global_settings);
107  break;
108  case "illocalusergui":
110  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
111  $this->ctrl->redirect($this);
112  }
113  $this->tabs_gui->activateTab('administrate_users');
114  $ilLocalUserGUI = new ilLocalUserGUI($this);
115  $this->ctrl->forwardCommand($ilLocalUserGUI);
116  break;
117  case "ilorgunitsimpleimportgui":
118  $this->tabs_gui->activateTab("view");
119  $this->setContentSubTabs();
120  $this->tabs_gui->setSubTabActive('import');
121  $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
122  $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
123  break;
124  case "ilorgunitsimpleuserimportgui":
125  $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
126  $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
127  break;
128  case "ilobjusergui":
129  switch ($cmd) {
130  case "create":
131  $ilObjUserGUI = new ilObjUserGUI("", $this->ref_id, true, false);
132  $ilObjUserGUI->setCreationMode(true);
133  $this->ctrl->forwardCommand($ilObjUserGUI);
134  $this->tabs_gui->setBackTarget(
135  $this->lng->txt("back"),
136  $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
137  );
138  break;
139  case "save":
140  $ilObjUserGUI = new ilObjUserGUI("", $this->ref_id, true, false);
141  $ilObjUserGUI->setCreationMode(true);
142  $this->ctrl->forwardCommand($ilObjUserGUI);
143  $this->tabs_gui->clearTargets();
144  $this->tabs_gui->setBackTarget(
145  $this->lng->txt("back"),
146  $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
147  );
148  break;
149  case "view":
150  case "update":
151  $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['obj_id'], false, false);
152  $ilObjUserGUI->setCreationMode(false);
153  $this->ctrl->forwardCommand($ilObjUserGUI);
154  $this->tabs_gui->clearTargets();
155  $this->tabs_gui->setBackTarget(
156  $this->lng->txt("back"),
157  $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
158  );
159  break;
160  case "cancel":
161  $this->ctrl->redirectByClass("illocalusergui", "index");
162  break;
163  }
164  break;
165  case "ilobjuserfoldergui":
166  switch ($cmd) {
167  case "view":
168  $this->ctrl->redirectByClass("illocalusergui", "index");
169  break;
170  default:
171  $ilObjUserFolderGUI = new ilObjUserFolderGUI("", $this->ref_id, true, false);
172  $ilObjUserFolderGUI->setUserOwnerId($this->ref_id);
173  $ilObjUserFolderGUI->setCreationMode(true);
174  $this->ctrl->forwardCommand($ilObjUserFolderGUI);
175  $this->tabs_gui->clearTargets();
176  $this->tabs_gui->setBackTarget(
177  $this->lng->txt("back"),
178  $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')
179  );
180  break;
181  }
182  break;
183  case "ilinfoscreengui":
184  $this->tabs_gui->activateTab("info_short");
185  if (!$this->ilAccess->checkAccess(
186  "read",
187  "",
188  $this->ref_id
189  ) and !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
190  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
191  }
192  $info = new ilInfoScreenGUI($this);
193  $amd_gui = new ilAdvancedMDRecordGUI(
195  'orgu',
196  $this->object->getId(),
197  'orgu_type',
198  $this->object->getOrgUnitTypeId()
199  );
200  $amd_gui->setInfoObject($info);
201  $amd_gui->parse();
202  $this->ctrl->forwardCommand($info);
203  break;
204  case 'ilpermissiongui':
205  $this->tabs_gui->activateTab('perm_settings');
206  $ilPermissionGUI = new ilPermissionGUI($this);
207  $this->ctrl->forwardCommand($ilPermissionGUI);
208  break;
209  case "ilcommonactiondispatchergui":
211  $this->ctrl->forwardCommand($gui);
212  break;
213  case 'illearningprogressgui':
214  case 'illplistofprogressgui':
215  $this->tabs_gui->clearTargets();
216  $this->tabs_gui->setBackTarget(
217  $this->lng->txt('backto_staff'),
218  $this->ctrl->getLinkTargetByClass(
219  ilOrgUnitUserAssignmentGUI::class,
221  )
222  );
224  $this->object->getRefid(),
225  (int) $_GET['obj_id']
226  )) {
227  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
228  $this->ctrl->redirectByClass("ilOrgUnitUserAssignmentGUI", "index");
229  }
230  $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
231  $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
232  $new_gui = new ilLearningProgressGUI(
234  $this->ref_id,
235  (int) $_GET['obj_id']
236  );
237  $this->ctrl->forwardCommand($new_gui);
238  break;
239  case 'ilorgunitexportgui':
240  if (!ilObjOrgUnitAccess::_checkAccessExport($this->ref_id)) {
241  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
242  $this->ctrl->redirect($this);
243  }
244  $this->tabs_gui->activateTab(self::TAB_EXPORT);
245  $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
246  $ilOrgUnitExportGUI->addFormat('xml');
247  $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
248  break;
249  case strtolower(ilObjectTranslationGUI::class):
250  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
251  $this->setSubTabsSettings('edit_translations');
252  $translations_gui = new ilObjectTranslationGUI($this);
253  $translations_gui->supportContentTranslation(false);
254  $this->ctrl->forwardCommand($translations_gui);
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  */
277  $form = $this->initAdvancedSettingsForm();
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  case 'return':
292  $this->view();
293  break;
294  case 'performPaste':
295  case 'paste':
296  $this->performPaste();
297  break;
298  case 'performPasteIntoMultipleObjects':
300  break;
301  case 'keepObjectsInClipboard':
303  break;
304  case 'create':
305  parent::createObject();
306  break;
307  case 'save':
308  parent::saveObject();
309  break;
310  case 'delete':
311  $this->tabs_gui->clearTargets();
312  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
313  $this->deleteObject();
314  break;
315  case 'confirmedDelete':
316  $this->confirmedDeleteObject();
317  break;
318  case 'cut':
319  $this->tabs_gui->clearTargets();
320  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
321  parent::cutObject();
322  break;
323  case 'clear':
324  parent::clearObject();
325  break;
326  case 'enableAdministrationPanel':
327  parent::enableAdministrationPanelObject();
328  break;
329  case 'disableAdministrationPanel':
330  parent::disableAdministrationPanelObject();
331  break;
332  case self::CMD_EDIT_SETTINGS:
333  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
334  $this->setSubTabsSettings('edit_settings');
335  $this->editSettings();
336  break;
337  case 'updateSettings':
338  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
339  $this->setSubTabsSettings('edit_settings');
340  $this->updateSettings();
341  break;
342  case 'editAdvancedSettings':
343  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
344  $this->setSubTabsSettings('edit_advanced_settings');
345  $this->editAdvancedSettings();
346  break;
347  case 'updateAdvancedSettings':
348  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
349  $this->setSubTabsSettings('edit_advanced_settings');
350  $this->updateAdvancedSettings();
351  break;
352  case 'routeImportCmd':
353  $this->routeImportCmdObject();
354  break;
355  case 'cancelMoveLink':
356  $this->cancelMoveLinkObject();
357  break;
358  }
359  break;
360  }
361  }
$_GET["client_id"]
Definition: webdav.php:30
confirmedDeleteObject()
confirmed deletion of org units -> org units are deleted immediately, without putting them to the tra...
Class ilLocalUserGUI.
Class ilOrgUnitUserAssignmentGUI.
Class ilOrgUnitPositionGUI.
setSubTabsSettings(string $active_tab_id)
static _checkAccessExport(int $ref_id)
static _checkAccessAdministrateUsers(int $ref_id)
Class ilOrgUnitSimpleImportGUI.
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilOrgUnitExportGUI.
updateAdvancedSettings()
Update Advanced Metadata.
deleteObject(bool $error=false)
Display deletion confirmation screen for Org Units.
Class ilObjForumAdministration.
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
Class ilOrgUnitTypeGUI.
editAdvancedSettings()
Edit Advanced Metadata.
ilPropertyFormGUI $form
performPaste()
Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
static _checkAccessToUserLearningProgress(int $ref_id, int $usr_id)
setInfoObject(ilInfoScreenGUI $info)
get info sections
ILIAS Container InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjUserGUI.
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjOrgUnitGUI::getAdminTabs ( )

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

References getTabs().

770  : void
771  {
772  $this->getTabs();
773  }
+ Here is the call graph for this function:

◆ getCreatableObjectTypes()

ilObjOrgUnitGUI::getCreatableObjectTypes ( )

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

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

Referenced by showPossibleSubObjects().

429  : array
430  {
431  $subtypes = $this->obj_definition->getCreatableSubObjects(
432  $this->object->getType(),
434  $this->object->getRefId()
435  );
436  unset($subtypes[ilObjEmployeeTalkSeries::TYPE]);
437  return array_filter(
438  $subtypes,
439  fn($key) => $this->access->checkAccess('create_' . $key, '', $this->ref_id, $this->type),
440  ARRAY_FILTER_USE_KEY
441  );
442  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjOrgUnitGUI::getTabs ( )

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

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

496  : void
497  {
498  $read_access_ref_id = $this->rbacsystem->checkAccess('visible', $this->object->getRefId())
499  && $this->rbacsystem->checkAccess('read', $this->object->getRefId());
500  if ($read_access_ref_id) {
501  $this->tabs_gui->addTab(
502  self::TAB_VIEW_CONTENT,
503  $this->lng->txt("content"),
504  $this->ctrl->getLinkTarget($this, "")
505  );
506  $this->tabs_gui->addTab(
507  "info_short",
508  "Info",
509  $this->ctrl->getLinkTargetByClass([self::class, ilInfoScreenGUI::class], "showSummary")
510  );
511  }
512 
513  // Tabs for OrgUnits exclusive root!
514  if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
515  if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) {
516  $this->tabs_gui->addTab(
517  self::TAB_STAFF,
518  $this->lng->txt(self::TAB_STAFF),
519  $this->ctrl->getLinkTargetByClass(
520  [self::class, ilOrgUnitUserAssignmentGUI::class],
522  )
523  );
524  }
525  if (ilObjOrgUnitAccess::_checkAccessSettings($this->object->getRefId())) {
526  $this->tabs_gui->addTab(
527  self::TAB_SETTINGS,
528  $this->lng->txt(self::TAB_SETTINGS),
529  $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
530  );
531  }
533  $this->tabs_gui->addTab(
534  "administrate_users",
535  $this->lng->txt("administrate_users"),
536  $this->ctrl->getLinkTargetByClass(
537  [self::class, ilLocalUserGUI::class],
538  'index'
539  )
540  );
541  }
542  }
543 
544  if (ilObjOrgUnitAccess::_checkAccessSettings($this->object->getRefId())) {
545  if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
546  $this->tabs_gui->addTab(
547  self::TAB_GLOBAL_SETTINGS,
548  $this->lng->txt('settings'),
549  $this->ctrl->getLinkTargetByClass(
550  [self::class, ilOrgUnitGlobalSettingsGUI::class]
551  )
552  );
553  }
554  $this->tabs_gui->addTab(
555  self::TAB_EXPORT,
556  $this->lng->txt(self::TAB_EXPORT),
557  $this->ctrl->getLinkTargetByClass(
558  [self::class, ilOrgUnitExportGUI::class]
559  )
560  );
561 
562  // Add OrgUnit types and positions tabs
563  if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
564  $this->tabs_gui->addTab(
565  self::TAB_ORGU_TYPES,
566  $this->lng->txt(self::TAB_ORGU_TYPES),
567  $this->ctrl->getLinkTargetByClass(
568  [self::class, ilOrgUnitTypeGUI::class]
569  )
570  );
571  $this->tabs_gui->addTab(
572  self::TAB_POSITIONS,
573  $this->lng->txt(self::TAB_POSITIONS),
574  $this->ctrl->getLinkTargetByClass(
575  [self::class, ilOrgUnitPositionGUI::class]
576  )
577  );
578  }
579  }
580  parent::getTabs();
581  }
static _checkAccessSettings(int $ref_id)
static _checkAccessAdministrateUsers(int $ref_id)
static _checkAccessStaff(int $ref_id)
static getRootOrgRefId()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTreeSelectorGUI()

ilObjOrgUnitGUI::getTreeSelectorGUI ( string  $cmd)
protected

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

762  {
763  $explorer = new ilOrgUnitExplorerGUI("rep_exp_sel", $this, "showPasteTree", $this->tree);
764  $explorer->setAjax(false);
765  $explorer->setSelectMode('nodes[]', false);
766 
767  return $explorer;
768  }
Explorer class that works on tree objects (Services/Tree)

◆ initAdvancedSettingsForm()

ilObjOrgUnitGUI::initAdvancedSettingsForm ( )
protected

Initialize the form for editing advanced meta data.

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

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

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

650  {
651  $form = new ilPropertyFormGUI();
652  $form->setFormAction($this->ctrl->getFormAction($this));
653  $form->addCommandButton('updateAdvancedSettings', $this->lng->txt('save'));
654  $form->addCommandButton(self::CMD_EDIT_SETTINGS, $this->lng->txt('cancel'));
655 
656  return $form;
657  }
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilPropertyFormGUI $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performPaste()

ilObjOrgUnitGUI::performPaste ( )

Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject

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

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

Referenced by executeCommand().

778  : void
779  {
780  if ($this->clipboard->getCmd() != 'cut') {
781  $message = __METHOD__ . ": cmd was not 'cut' ; may be a hack attempt!";
782  $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
783  } else {
784  if ($this->clipboard->hasEntries()) {
785  $this->pasteObject();
786  }
787  }
788  $this->ctrl->returnToParent($this);
789  }
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
Class ilObjForumAdministration.
$message
Definition: xapiexit.php:31
+ 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

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

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

485  : void
486  {
487  $obj_type = ilObject::_lookupType($ref_id, true);
488  if ($obj_type !== "orgu") {
489  parent::redirectToRefId($ref_id, $cmd);
490  } else {
491  $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
492  $this->ctrl->redirectByClass("ilObjOrgUnitGUI", $cmd);
493  }
494  }
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjOrgUnitGUI::setContentSubTabs ( )

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

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

Referenced by executeCommand(), and view().

628  : void
629  {
631 
632  $ref_id = $this->object->getRefId();
633  $may_create_orgus = $this->ilAccess->checkAccess("create_orgu", "", $ref_id, 'orgu');
634 
635  if ($ref_id === ilObjOrgUnit::getRootOrgRefId() //only display the import tab at the first level
636  && $may_create_orgus
637  ) {
638  $this->tabs_gui->addSubTab(
639  "import",
640  $this->lng->txt("import"),
641  $this->ctrl->getLinkTargetByClass([self::class, ilOrgUnitSimpleImportGUI::class], "chooseImport")
642  );
643  }
644  }
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link...
static getRootOrgRefId()
+ 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 583 of file class.ilObjOrgUnitGUI.php.

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

Referenced by executeCommand().

583  : void
584  {
585  $next_class = $this->ctrl->getNextClass($this);
586  $cmd = $this->ctrl->getCmd();
587  $this->tabs_gui->addSubTab(
588  'edit_settings',
589  $this->lng->txt(self::TAB_SETTINGS),
590  $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
591  );
592  $this->tabs_gui->addSubTab(
593  "edit_translations",
594  $this->lng->txt("obj_multilinguality"),
595  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "listTranslations")
596  );
597 
598  $ilOrgUnitType = $this->object->getOrgUnitType();
599  if ($ilOrgUnitType instanceof ilOrgUnitType) {
600  if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
601  $this->tabs_gui->addSubTab(
602  'edit_advanced_settings',
603  $this->lng->txt('orgu_adv_settings'),
604  $this->ctrl->getLinkTarget($this, 'editAdvancedSettings')
605  );
606  }
607  }
608 
609  $this->tabs_gui->setSubTabActive($active_tab_id);
610  switch ($next_class) {
611  case 'iltranslationgui':
612  $this->tabs_gui->setSubTabActive("edit_translations");
613  break;
614  case '':
615  switch ($cmd) {
616  case self::CMD_EDIT_SETTINGS:
617  $this->tabs_gui->setSubTabActive('edit_settings');
618  break;
619  case 'editAdvancedSettings':
620  case 'updateAdvancedSettings':
621  $this->tabs_gui->setSubTabActive('edit_advanced_settings');
622  break;
623  }
624  break;
625  }
626  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTitleAndDescription()

ilObjOrgUnitGUI::setTitleAndDescription ( )

called by prepare output

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

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

447  : void
448  {
449  # all possible create permissions
450  parent::setTitleAndDescription();
451  if ($this->object->getTitle() === "__OrgUnitAdministration") {
452  $this->tpl->setTitle($this->lng->txt("objs_orgu"));
453  $this->tpl->setDescription($this->lng->txt("objs_orgu"));
454  }
455 
456  // Check for custom icon of type
457  if ($this->ilias->getSetting('custom_icons')) {
458  $icons_cache = ilObjOrgUnit::getIconsCache();
459  $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] : '';
460  if ($icon_file) {
461  $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
462  }
463  }
464  }
static getIconsCache()
Returns an array that maps from OrgUnit object IDs to its icon defined by the assigned OrgUnit type...
Class ilObjForumAdministration.
+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilObjOrgUnitGUI::showAdministrationPanel ( )

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

References ILIAS\Repository\toolbar().

Referenced by view().

735  : void
736  {
737  parent::showAdministrationPanel();
738  //an ugly encapsulation violation in order to remove the "verknüpfen"/"link" and copy button.
739  if (empty($this->toolbar->items) === false) {
740  foreach ($this->toolbar->items as $key => $item) {
741  if ($item["cmd"] == "link" || $item["cmd"] == "copy"
742  || $item["cmd"] == "download"
743  ) {
744  unset($this->toolbar->items[$key]);
745  }
746  }
747  }
748  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilObjOrgUnitGUI::showPossibleSubObjects ( )
protected

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

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

Referenced by view().

412  : void
413  {
414  $subtypes = $this->getCreatableObjectTypes();
415  if ($subtypes === []) {
416  return;
417  }
419  [$this->buildGroup(
420  self::class,
421  array_keys($subtypes),
422  $this->lng->txt('other'),
423  $subtypes
424  )]
425  );
426  $gui->render();
427  }
Render add new item selector.
ILIAS Container InternalGUIService $gui
buildGroup(string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
+ 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 684 of file class.ilObjOrgUnitGUI.php.

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

Referenced by executeCommand().

684  : void
685  {
686  if (!$this->ilAccess->checkAccess('write', '', $this->ref_id)) {
687  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
688  $this->ctrl->redirect($this);
689  }
690  $form = $this->initAdvancedSettingsForm();
693  'orgu',
694  $this->object->getId(),
695  'orgu_type',
696  $this->object->getOrgUnitTypeId()
697  );
698  $gui->setPropertyForm($form);
699  $form->checkInput();
700  $gui->parse();
701  if ($gui->importEditFormPostValues()) {
702  $gui->writeEditForm();
703  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
704  $this->ctrl->redirect($this, 'editAdvancedSettings');
705  } else {
706  $this->tpl->setContent($form->getHTML());
707  }
708  }
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
ilPropertyFormGUI $form
ILIAS Container InternalGUIService $gui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSettings()

ilObjOrgUnitGUI::updateSettings ( )

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

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

Referenced by executeCommand().

720  : void
721  {
722  if (!$this->ilAccess->checkAccess('write', '', $this->ref_id)) {
723  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
724  $this->ctrl->redirect($this);
725  }
726  $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
727  if ($form->saveObject()) {
728  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
729  $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
730  } else {
731  $this->tpl->setContent($form->getHTML());
732  }
733  }
ilPropertyFormGUI $form
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilObjOrgUnitGUI::view ( )

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

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

Referenced by executeCommand().

375  : void
376  {
377  if (!$this->rbacsystem->checkAccess("read", $this->ref_id)) {
378  if ($this->rbacsystem->checkAccess("visible", $this->ref_id)) {
379  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_perm_read"));
380  $this->ctrl->redirectByClass('ilinfoscreengui', '');
381  }
382 
383  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
384  }
385 
386  $container_view = $this->getContentGUI();
387 
388  $this->setContentSubTabs();
389  if ($this->isActiveAdministrationPanel()) {
390  $this->tabs->activateSubTab("manage");
391  } else {
392  $this->tabs->activateSubTab("view_content");
393  }
394 
395  $container_view->setOutput();
396 
397  // it is important not to show the subobjects/admin panel here, since
398  // we will create nested forms in case, e.g. a news/calendar item is added
399  if (! $this->ctrl->isAsynch()) {
400  $this->showAdministrationPanel();
401  $this->showPossibleSubObjects();
402  }
403 
404  $container_view->setOutput();
405 
406  $this->showPermanentLink();
407  $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
408  $this->tabs_gui->removeSubTab("page_editor");
409  $this->tabs_gui->removeSubTab("ordering"); // Mantis 0014728
410  }
Class ilObjForumAdministration.
+ 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 54 of file class.ilObjOrgUnitGUI.php.

Referenced by deleteObject().

◆ $ilAccess

ilAccessHandler ilObjOrgUnitGUI::$ilAccess
protected

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

◆ $ilias

Ilias ilObjOrgUnitGUI::$ilias

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

◆ $ilLocator

ilLocatorGUI ilObjOrgUnitGUI::$ilLocator
protected

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

◆ $ilLog

ILIAS DI LoggingServices ilObjOrgUnitGUI::$ilLog
protected

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

◆ $object

ilObject ilObjOrgUnitGUI::$object

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

◆ $tabs_gui

ilTabsGUI ilObjOrgUnitGUI::$tabs_gui

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

◆ $toolbar

ilToolbarGUI ilObjOrgUnitGUI::$toolbar
protected

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

◆ $tree

ilTree ilObjOrgUnitGUI::$tree

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

◆ CMD_EDIT_SETTINGS

const ilObjOrgUnitGUI::CMD_EDIT_SETTINGS = 'editSettings'

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

◆ TAB_EXPORT

const ilObjOrgUnitGUI::TAB_EXPORT = 'export'

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

◆ TAB_GLOBAL_SETTINGS

const ilObjOrgUnitGUI::TAB_GLOBAL_SETTINGS = 'global_settings'

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

◆ TAB_ORGU_TYPES

const ilObjOrgUnitGUI::TAB_ORGU_TYPES = 'orgu_types'

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

◆ TAB_POSITIONS

const ilObjOrgUnitGUI::TAB_POSITIONS = 'positions'

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

Referenced by ilOrgUnitPositionGUI\getActiveTabId().

◆ TAB_SETTINGS

const ilObjOrgUnitGUI::TAB_SETTINGS = "settings"

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

◆ TAB_STAFF

const ilObjOrgUnitGUI::TAB_STAFF = 'orgu_staff'

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

◆ TAB_VIEW_CONTENT

const ilObjOrgUnitGUI::TAB_VIEW_CONTENT = 'view_content'

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


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