ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilContainerGUI Class Reference

Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder, course, group, category, folder. More...

+ Inheritance diagram for ilContainerGUI:
+ Collaboration diagram for ilContainerGUI:

Public Member Functions

 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 _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

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

 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 getDidacticTemplateIdFromQuery ()
 
 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

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

Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder, course, group, category, folder.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Stefan Hecken stefa.nosp@m.n.he.nosp@m.cken@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de

Definition at line 34 of file class.ilContainerGUI.php.

Member Function Documentation

◆ _buildPath()

static ilContainerGUI::_buildPath ( int  $a_ref_id,
int  $a_course_ref_id 
)
static

build path

Definition at line 2057 of file class.ilContainerGUI.php.

2060 : string {
2061 global $DIC;
2062
2063 $tree = $DIC->repositoryTree();
2064 $path = "";
2065
2066 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2067 $counter = 0;
2068 foreach ($path_arr as $data) {
2069 if ($counter++) {
2070 $path .= " > ";
2071 }
2072 $path .= $data['title'];
2073 }
2074
2075 return $path;
2076 }
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
$path
Definition: ltiservices.php:30
global $DIC
Definition: shib_login.php:26
$counter

References $counter, $data, and $path.

◆ addHeaderRow()

ilContainerGUI::addHeaderRow ( ilTemplate  $a_tpl,
string  $a_type,
bool  $a_show_image = true 
)

Definition at line 723 of file class.ilContainerGUI.php.

727 : void {
728 $icon = ilUtil::getImagePath("standard/icon_" . $a_type . ".svg");
729 $title = $this->lng->txt("objs_" . $a_type);
730
731 if ($a_show_image) {
732 $a_tpl->setCurrentBlock("container_header_row_image");
733 $a_tpl->setVariable("HEADER_IMG", $icon);
734 $a_tpl->setVariable("HEADER_ALT", $title);
735 } else {
736 $a_tpl->setCurrentBlock("container_header_row");
737 }
738
739 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
740 $a_tpl->parseCurrentBlock();
741 //$a_tpl->touchBlock("container_row");
742 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

+ Here is the call graph for this function:

◆ addMessageRow()

ilContainerGUI::addMessageRow ( ilTemplate  $a_tpl,
string  $a_message,
string  $a_type 
)

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

803 : void {
804 $type = $this->lng->txt("obj_" . $a_type);
805 $a_message = str_replace("[type]", $type, $a_message);
806
807 $a_tpl->setVariable("ROW_NBSP", " ");
808
809 $a_tpl->setCurrentBlock("container_standard_row");
810 $a_tpl->setVariable(
811 "BLOCK_ROW_CONTENT",
812 $a_message
813 );
814 $a_tpl->parseCurrentBlock();
815 $a_tpl->touchBlock("container_row");
816 }
touchBlock(string $block)

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Definition at line 278 of file class.ilContainerGUI.php.

278 : void
279 {
280 $ilTabs = $this->tabs;
281 $ilCtrl = $this->ctrl;
282
283 $ilTabs->addTarget(
284 "obj_sty",
285 $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", ''),
286 "editStyleProperties",
287 "ilobjectcontentstylesettingsgui"
288 );
289 }

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs ( bool  $a_include_view = true)

Add standard container subtabs for view, manage, oderdering and text/media editor link.

Definition at line 850 of file class.ilContainerGUI.php.

852 : void {
853 $ilTabs = $this->tabs;
855 $ilCtrl = $this->ctrl;
856 $ilUser = $this->user;
857
858 if (!is_object($this->object)) {
859 return;
860 }
861
862 if ($a_include_view && $this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
863 if (!$this->isActiveAdministrationPanel()) {
864 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass(static::class, "view"));
865 } else {
866 $ilTabs->addSubTab(
867 "view_content",
868 $lng->txt("view"),
869 $ilCtrl->getLinkTarget($this, "disableAdministrationPanel")
870 );
871 }
872 }
873
875 if ($item_presentation->canManageItems()) {
876 if ($this->isActiveAdministrationPanel()) {
877 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
878 } else {
879 $ilTabs->addSubTab(
880 "manage",
881 $lng->txt("cntr_manage"),
882 $ilCtrl->getLinkTarget($this, "enableAdministrationPanel")
883 );
884 }
885 }
886 if ($item_presentation->canOrderItems()) {
887 $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
888 }
889 }
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
ILIAS Container Content ItemPresentationManager $item_presentation
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng

Referenced by ilObjStudyProgrammeGUI\getSubTabs(), and ilObjOrgUnitGUI\setContentSubTabs().

+ Here is the caller graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

Post (successful) object update hook.

Reimplemented from ilObjectGUI.

Definition at line 193 of file class.ilContainerGUI.php.

193 : void
194 {
195 // check if template is changed
197 $this->object->getRefId()
198 );
199 $new_tpl_id = $this->getDidacticTemplateVar('dtpl');
200
201 if ($new_tpl_id !== $current_tpl_id) {
202 // redirect to didactic template confirmation
203 $this->ctrl->setParameterByClass(ilDidacticTemplateGUI::class, "didactic_type", $new_tpl_id);
204 $this->ctrl->redirectByClass(ilDidacticTemplateGUI::class, "confirmTemplateSwitch");
205 }
206 parent::afterUpdate();
207 }
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.

References ILIAS\Repository\ctrl(), ilDidacticTemplateObjSettings\lookupTemplateId(), and ILIAS\Repository\object().

Referenced by ilObjCourseGUI\updateObject().

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

◆ allowBlocksConfigure()

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

Definition at line 1925 of file class.ilContainerGUI.php.

1925 : bool
1926 {
1927 return true;
1928 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

Definition at line 1917 of file class.ilContainerGUI.php.

1917 : bool
1918 {
1919 return true;
1920 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

Definition at line 1595 of file class.ilContainerGUI.php.

1595 : void
1596 {
1597 $ilCtrl = $this->ctrl;
1598
1599 $this->clipboard->clear();
1600 $ilCtrl->returnToParent($this);
1601 }
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
@inheritDoc

Referenced by ilObjOrgUnitGUI\executeCommand().

+ Here is the caller graph for this function:

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

Definition at line 652 of file class.ilContainerGUI.php.

652 : void
653 {
654 $this->ctrl->redirect($this, "");
655 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

Definition at line 1236 of file class.ilContainerGUI.php.

1236 : void
1237 {
1238 $this->clipboard->clear();
1239
1240 //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1241
1242 // only redirect if clipboard was cleared
1243 if ($this->ctrl->getCmd() === "clear") {
1244 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_clear_clipboard"), true);
1245 // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1246 $this->ctrl->redirect($this, 'render');
1247 }
1248 }

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

+ Here is the call graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

Definition at line 1824 of file class.ilContainerGUI.php.

1824 : void
1825 {
1827 $ilLog = $this->log;
1828 $ilTabs = $this->tabs;
1829 $tpl = $this->tpl;
1830 $ilToolbar = $this->toolbar;
1831 $ilCtrl = $this->ctrl;
1832 $lng = $this->lng;
1833
1834 $ilTabs->activateTab("clipboard");
1835
1836 // function should not be called if clipboard is empty
1837 if (!$this->clipboard->hasEntries()) {
1838 $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1839 $ilLog->write($message, $ilLog->FATAL);
1840 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->WARNING);
1841 }
1842
1843 $data = [];
1844 foreach ($this->clipboard->getRefIds() as $ref_id) {
1845 if (!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
1846 continue;
1847 }
1848
1849 $data[] = [
1850 "type" => $tmp_obj->getType(),
1851 "type_txt" => $this->lng->txt("obj_" . $tmp_obj->getType()),
1852 "title" => $tmp_obj->getTitle(),
1853 "cmd" => ($this->clipboard->getCmd() === "cut") ? $this->lng->txt("move") : $this->lng->txt(
1854 $this->clipboard->getCmd()
1855 ),
1856 "ref_id" => $ref_id,
1857 "obj_id" => $tmp_obj->getId()
1858 ];
1859
1860 unset($tmp_obj);
1861 }
1862
1863 $tab = new ilObjClipboardTableGUI($this, "clipboard");
1864 $tab->setData($data);
1865 $tpl->setContent($tab->getHTML());
1866
1867 if (count($data) > 0) {
1868 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1869 $ilToolbar->addFormButton(
1870 $lng->txt("insert_object_here"),
1871 "paste"
1872 );
1873 $ilToolbar->addFormButton(
1874 $lng->txt("clear_clipboard"),
1875 "clear"
1876 );
1877 }
1878 }
ilErrorHandling $error
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
ilGlobalTemplateInterface $tpl
ilToolbarGUI $toolbar
setContent(string $a_html)
Sets content for standard template.
$ilErr
Definition: raiseError.php:33

References $data, $ilErr, $lng, $log, $ref_id, ilObjectFactory\getInstanceByRefId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

Definition at line 1935 of file class.ilContainerGUI.php.

1935 : void
1936 {
1937 $ilCtrl = $this->ctrl;
1938
1939 $ilAccess = $this->access;
1942
1943 $new_type = $this->std_request->getNewType();
1945 $clone_source = $this->std_request->getCloneSource();
1946
1947 if (!$rbacsystem->checkAccess('create', $ref_id, $new_type)) {
1948 $ilErr->raiseError($this->lng->txt('permission_denied'));
1949 }
1950 if (!$clone_source) {
1951 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
1952 $this->createObject();
1953 return;
1954 }
1955 if (!$ilAccess->checkAccess('write', '', $clone_source, $new_type)) {
1956 $ilErr->raiseError($this->lng->txt('permission_denied'));
1957 }
1958
1959 $options = $this->std_request->getCopyOptions();
1960 $orig = ilObjectFactory::getInstanceByRefId($clone_source);
1961 $result = $orig->cloneAllObject(
1962 $_COOKIE[session_name()],
1963 $_COOKIE['ilClientId'],
1964 $new_type,
1965 $ref_id,
1966 $clone_source,
1967 $options
1968 );
1969
1970 if (ilCopyWizardOptions::_isFinished($result['copy_id'])) {
1971 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_duplicated"), true);
1972 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
1973 } else {
1974 $this->tpl->setOnScreenMessage('info', $this->lng->txt("object_copy_in_progress"), true);
1975 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
1976 }
1977 $ilCtrl->redirectByClass("ilrepositorygui", "");
1978 }
ilRbacSystem $rbacsystem
static _isFinished(int $a_copy_id)
ilAccessHandler $access
createObject()
create new object form
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
$_COOKIE[session_name()]
Definition: xapitoken.php:52

References $_COOKIE, $ilErr, ILIAS\UI\Implementation\Component\Input\Field\$options, $ref_id, $requested_ref_id, ilCopyWizardOptions\_isFinished(), ilObjectFactory\getInstanceByRefId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ cloneNodes()

ilContainerGUI::cloneNodes ( int  $srcRef,
int  $dstRef,
array &  $mapping,
?string  $newName = null 
)

Recursively clones all nodes of the RBAC tree.

Definition at line 1996 of file class.ilContainerGUI.php.

2001 : int {
2003
2004 // clone the source node
2005 $srcObj = ilObjectFactory::getInstanceByRefId($srcRef);
2006 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2007
2008 // We must immediately apply a new name to the object, to
2009 // prevent confusion of WebDAV clients about having two objects with identical
2010 // name in the repository.
2011 if (!is_null($newName)) {
2012 $newObj = ilObjectFactory::getInstanceByRefId($newRef);
2013 $newObj->setTitle($newName);
2014 $newObj->update();
2015 unset($newObj);
2016 }
2017 unset($srcObj);
2018 $mapping[$newRef] = $srcRef;
2019
2020 // clone all children of the source node
2021 $children = $tree->getChilds($srcRef);
2022 foreach ($tree->getChilds($srcRef) as $child) {
2023 // Don't clone role folders, because it does not make sense to clone local roles
2024 // FIXME - Maybe it does make sense (?)
2025 if ($child["type"] !== 'rolf') {
2026 $this->cloneNodes($child["ref_id"], $newRef, $mapping);
2027 } elseif (count($rolf = $tree->getChildsByType($newRef, "rolf"))) {
2028 $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
2029 }
2030 }
2031 return $newRef;
2032 }
cloneNodes(int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
Recursively clones all nodes of the RBAC tree.
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
getChildsByType(int $a_node_id, string $a_type)
get child nodes of given node by object type

◆ competencesObject()

ilContainerGUI::competencesObject ( )

Definition at line 2735 of file class.ilContainerGUI.php.

2735 : void
2736 {
2738
2739 $ctrl->redirectByClass(["ilContainerSkillGUI", "ilContSkillPresentationGUI"]);
2740 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

Definition at line 2603 of file class.ilContainerGUI.php.

2603 : void
2604 {
2605 $lng = $this->lng;
2606 $this->checkPermission("write");
2607 if (count($this->std_request->getTrashIds()) == 0) {
2608 $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
2609 $this->ctrl->redirect($this, "trash");
2610 }
2611
2612 $ru = new ilRepositoryTrashGUI($this);
2613 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2614 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Repository GUI Utilities.

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

+ Here is the call graph for this function:

◆ copyObject()

ilContainerGUI::copyObject ( )

Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.

Definition at line 1039 of file class.ilContainerGUI.php.

1039 : void
1040 {
1042 $ilCtrl = $this->ctrl;
1043 $objDefinition = $this->obj_definition;
1045
1046 $no_copy = [];
1047
1048 $ids = $this->std_request->getSelectedIds();
1049
1050 if (count($ids) === 0) {
1051 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1052 $this->ctrl->redirect($this, "");
1053 }
1054
1055 // FOR ALL OBJECTS THAT SHOULD BE COPIED
1056 $containers = 0;
1057 foreach ($ids as $ref_id) {
1058 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1059 $node_data = $this->tree->getNodeData($ref_id);
1060
1061 // count containers
1062 if ($objDefinition->isContainer($node_data["type"])) {
1063 $containers++;
1064 }
1065
1066 $subtree_nodes = $this->tree->getSubTree($node_data);
1067
1068 $all_node_data[] = $node_data;
1069 $all_subtree_nodes[] = $subtree_nodes;
1070
1071 // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1072 foreach ($subtree_nodes as $node) {
1073 if ($node['type'] === 'rolf') {
1074 continue;
1075 }
1076
1077 if (!$rbacsystem->checkAccess('visible,read', $node["ref_id"])) {
1078 $no_copy[] = $node["ref_id"];
1079 }
1080 }
1081 }
1082
1083 if ($containers > 0 && count($this->std_request->getSelectedIds()) > 1) {
1084 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cntr_container_only_on_their_own"), true);
1085 $this->ctrl->redirect($this, "");
1086 }
1087
1088 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1089 if (is_array($no_copy) && count($no_copy)) {
1090 $titles = [];
1091 foreach ($no_copy as $copy_id) {
1092 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($copy_id));
1093 }
1094 $this->tpl->setOnScreenMessage(
1095 'failure',
1096 $this->lng->txt("msg_no_perm_copy") . " " . implode(',', $titles),
1097 true
1098 );
1099 $this->ctrl->redirect($this, "");
1100 }
1101
1102 // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1103 $ids = $this->std_request->getSelectedIds();
1104 if (count($ids) === 1) {
1105 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ids[0]);
1106 } else {
1107 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $ids));
1108 }
1109 $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1110
1111 $this->clipboard->setParent($this->requested_ref_id);
1112 $this->clipboard->setCmd($ilCtrl->getCmd());
1113 $this->clipboard->setRefIds($ids);
1114
1115 $this->tpl->setOnScreenMessage('info', $this->lng->txt("msg_copy_clipboard"), true);
1116
1118 }
ilObjectDefinition $obj_definition
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)

References $ilErr, $ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ cutObject()

ilContainerGUI::cutObject ( )

cut object(s) out from a container and write the information to clipboard @access public

Definition at line 981 of file class.ilContainerGUI.php.

981 : void
982 {
984 $ilCtrl = $this->ctrl;
986
987 $ids = $this->std_request->getSelectedIds();
988 $no_cut = [];
989
990 if (count($ids) === 0) {
991 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
992 $this->ctrl->redirect($this, "");
993 }
994
995 // FOR ALL OBJECTS THAT SHOULD BE COPIED
996 foreach ($ids as $ref_id) {
997 // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
998 $node_data = $this->tree->getNodeData($ref_id);
999 $subtree_nodes = $this->tree->getSubTree($node_data);
1000
1001 $all_node_data[] = $node_data;
1002 $all_subtree_nodes[] = $subtree_nodes;
1003
1004 // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1005 foreach ($subtree_nodes as $node) {
1006 if ($node['type'] === 'rolf') {
1007 continue;
1008 }
1009
1010 if (!$rbacsystem->checkAccess('delete', $node["ref_id"])) {
1011 $no_cut[] = $node["ref_id"];
1012 }
1013 }
1014 }
1015 // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1016 if (count($no_cut)) {
1017 $titles = [];
1018 foreach ($no_cut as $cut_id) {
1019 $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($cut_id));
1020 }
1021 $ilErr->raiseError(
1022 $this->lng->txt("msg_no_perm_cut") . " " . implode(',', $titles),
1023 $ilErr->MESSAGE
1024 );
1025 }
1026 $this->clipboard->setParent($this->requested_ref_id);
1027 $this->clipboard->setCmd($ilCtrl->getCmd());
1028 $this->clipboard->setRefIds($this->std_request->getSelectedIds());
1029
1030 $this->tpl->setOnScreenMessage('info', $this->lng->txt("msg_cut_clipboard"), true);
1031
1033 }

References $ilErr, $ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

Reimplemented in ilObjGroupGUI.

Definition at line 932 of file class.ilContainerGUI.php.

932 : void
933 {
934 $this->getModeManager()->setContentMode();
935 $this->ctrl->redirect($this, "render");
936 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

Definition at line 1120 of file class.ilContainerGUI.php.

1120 : void
1121 {
1122 if (in_array($this->user->getId(), [ANONYMOUS_USER_ID, 0], true)) {
1123 return;
1124 }
1125
1127 // This variable determines whether the task has been initiated by a folder's action drop-down to prevent a folder
1128 // duplicate inside the zip.
1129 $initiated_by_folder_action = false;
1130
1131 $ids = $this->std_request->getSelectedIds();
1132
1133 if (count($ids) === 0) {
1134 $object = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
1135 $object_type = $object->getType();
1136 if ($object_type === "fold") {
1137 $ids = [$this->requested_ref_id];
1138 $initiated_by_folder_action = true;
1139 } else {
1140 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1141 $this->ctrl->redirect($this, "");
1142 }
1143 }
1144
1145 foreach ($ids as $ref_id) {
1146 if (!in_array(ilObject::_lookupType($ref_id, true), ["crs", "grp", "fold", "file"])) {
1147 $this->lng->loadLanguageModule("cont");
1148 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_only_crs_grp_fold_download"), true);
1149 $this->ctrl->redirect($this, "");
1150 }
1151 }
1152
1153 $download_job = new ilDownloadContainerFilesBackgroundTask(
1154 $GLOBALS['DIC']->user()->getId(),
1155 $ids,
1156 $initiated_by_folder_action
1157 );
1158
1159 $download_job->setBucketTitle($this->getBucketTitle());
1160 if ($download_job->run()) {
1161 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_bt_download_started'), true);
1162 }
1163 $GLOBALS['DIC']->ctrl()->redirect($this);
1164 }
static _lookupType(int $id, bool $reference=false)
const ANONYMOUS_USER_ID
Definition: constants.php:27
$GLOBALS["DIC"]
Definition: wac.php:54

References $GLOBALS, $ilErr, $ref_id, $requested_ref_id, ilObject\_lookupType(), ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Definition at line 938 of file class.ilContainerGUI.php.

938 : void
939 {
940 $ilTabs = $this->tabs;
941 $this->edit_order = true;
942 $this->getModeManager()->setOrderingMode();
943 $this->renderObject();
944
945 $ilTabs->activateSubTab("ordering");
946 }

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

Definition at line 647 of file class.ilContainerGUI.php.

647 : void
648 {
649 $this->ctrl->redirectByClass([static::class, "ilcontainerpagegui"], "edit");
650 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Definition at line 2079 of file class.ilContainerGUI.php.

2079 : void
2080 {
2081 $this->content_style_gui
2082 ->redirectToObjectSettings();
2083 }

Referenced by ilObjStudyProgrammeGUI\executeCommand().

+ Here is the caller graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

Reimplemented in ilObjGroupGUI.

Definition at line 926 of file class.ilContainerGUI.php.

926 : void
927 {
928 $this->getModeManager()->setAdminMode();
929 $this->ctrl->redirect($this, "render");
930 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

Definition at line 966 of file class.ilContainerGUI.php.

966 : void
967 {
968 $this->multi_download_enabled = true;
969 $this->renderObject();
970 }

◆ executeCommand()

ilContainerGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Reimplemented in ilObjRecoveryFolderGUI, ilObjCategoryGUI, ilObjCourseGUI, ilObjTalkTemplateAdministrationGUI, ilObjTalkTemplateGUI, ilObjEmployeeTalkSeriesGUI, ilObjFolderGUI, ilObjGroupGUI, ilObjLearningSequenceGUI, ilObjOrgUnitGUI, ilObjRootFolderGUI, and ilObjStudyProgrammeGUI.

Definition at line 157 of file class.ilContainerGUI.php.

157 : void
158 {
160
161 $next_class = $this->ctrl->getNextClass();
162 $cmd = $this->ctrl->getCmd("render");
163
164 switch ($next_class) {
165 // page editing
166 case "ilcontainerpagegui":
167 if ($this->requested_redirectSource !== "ilinternallinkgui") {
168 $ret = $this->forwardToPageObject();
169 $tpl->setContent($ret);
170 } else {
171 return;
172 }
173 break;
174
175 default:
176 $this->prepareOutput();
177 $cmd .= "Object";
178 $this->$cmd();
179 break;
180 }
181 }
prepareOutput(bool $show_sub_objects=true)

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ forwardToPageObject()

ilContainerGUI::forwardToPageObject ( )

Definition at line 214 of file class.ilContainerGUI.php.

214 : string
215 {
217 $ilTabs = $this->tabs;
218 $ilCtrl = $this->ctrl;
219 $cmd = $ilCtrl->getCmd();
220 if (in_array($cmd, ["displayMediaFullscreen", "downloadFile", "displayMedia"])) {
221 $this->checkPermission("read");
222 } else {
223 $this->checkPermission("write");
224 }
225
226 $ilTabs->clearTargets();
227
228 if ($this->requested_redirectSource === "ilinternallinkgui") {
229 exit;
230 }
231
232 $ilTabs->setBackTarget(
233 $lng->txt("back"),
234 $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "edit")
235 );
236
237 // page object
238
239 $lng->loadLanguageModule("content");
240 $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
241 // $this->tpl->setCurrentBlock("SyntaxStyle");
242 $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
243 // $this->tpl->parseCurrentBlock();
244
246 "cont",
247 $this->object->getId()
248 )) {
249 // doesn't exist -> create new one
250 $new_page_object = new ilContainerPage();
251 $new_page_object->setParentId($this->object->getId());
252 $new_page_object->setId($this->object->getId());
253 $new_page_object->createFromXML();
254 }
255
256 // get page object
257 $page_gui = new ilContainerPageGUI($this->object->getId());
258 $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
259 $page_gui->setStyleId(
260 $style->getEffectiveStyleId()
261 );
262 $page_gui->setItemPresentationManager($this->getItemPresentation(
263 false,
264 $page_gui->getLanguage()
265 ));
266 $page_gui->setTemplateTargetVar("ADM_CONTENT");
267 $page_gui->setFileDownloadLink("");
268 //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
269 $page_gui->setPresentationTitle("");
270 $page_gui->setTemplateOutput(false);
271
272 // style tab
273 $page_gui->setTabHook($this, "addPageTabs");
274
275 return $this->ctrl->forwardCommand($page_gui);
276 }
Container page GUI class.
Container page object.
getCmd(?string $fallback_command=null)
@inheritDoc
loadLanguageModule(string $a_module)
Load language module.
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
exit

References $lng, ilPageObject\_exists(), ILIAS\Repository\ctrl(), exit, ilObjStyleSheet\getSyntaxStylePath(), and ILIAS\Repository\object().

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), and ilObjRootFolderGUI\executeCommand().

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

◆ getAdminTabs()

ilContainerGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Reimplemented in ilObjTalkTemplateAdministrationGUI, ilObjTalkTemplateGUI, ilObjEmployeeTalkSeriesGUI, and ilObjOrgUnitGUI.

Definition at line 2702 of file class.ilContainerGUI.php.

2702 : void
2703 {
2704 if ($this->checkPermissionBool("visible,read")) {
2705 $this->tabs_gui->addTab(
2706 'view',
2707 $this->lng->txt('view'),
2708 $this->ctrl->getLinkTarget($this, 'view')
2709 );
2710 }
2711
2712 if ($this->checkPermissionBool("write")) {
2713 $this->tabs_gui->addTab(
2714 'trash',
2715 $this->lng->txt('trash'),
2716 $this->ctrl->getLinkTarget($this, 'trash')
2717 );
2718 }
2719
2720 if ($this->checkPermissionBool("edit_permission")) {
2721 $this->tabs_gui->addTab(
2722 'perm_settings',
2723 $this->lng->txt('perm_settings'),
2724 $this->ctrl->getLinkTargetByClass(
2725 [
2726 get_class($this),
2727 'ilpermissiongui'
2728 ],
2729 'perm'
2730 )
2731 );
2732 }
2733 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getBucketTitle()

ilContainerGUI::getBucketTitle ( )

Definition at line 1166 of file class.ilContainerGUI.php.

1166 : string
1167 {
1168 return ilFileUtils::getASCIIFilename($this->object->getTitle());
1169 }
static getASCIIFilename(string $a_filename)

References ilFileUtils\getASCIIFilename(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

Definition at line 291 of file class.ilContainerGUI.php.

291 : string
292 {
294 $ilUser = $this->user;
295
296 if (!$ilSetting->get("enable_cat_page_edit") || $this->object->filteredSubtree()) {
297 return "";
298 }
299
300 // if page does not exist, return nothing
302 "cont",
303 $this->object->getId()
304 )) {
305 return "";
306 }
307 $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
308 $this->tpl->setCurrentBlock("SyntaxStyle");
309 $this->tpl->setVariable(
310 "LOCATION_SYNTAX_STYLESHEET",
312 );
313 $this->tpl->parseCurrentBlock();
314
315 // get page object
316 $ot = $this->object->getObjectTranslation();
317 $lang = $ot->getEffectiveCOPageLang($ilUser->getCurrentLanguage(), "cont");
318 $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
319 $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
320 $page_gui->setStyleId($style->getEffectiveStyleId());
321
322 $page_gui->setPresentationTitle("");
323 $page_gui->setTemplateOutput(false);
324 $page_gui->setHeader("");
325 $ret = $page_gui->showPage();
326
327 //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
328
329 //$ret =& $page_gui->executeCommand();
330 return $ret;
331 }
ilSetting $settings
static _existsAndNotEmpty(string $a_parent_type, int $a_id, string $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
global $ilSetting
Definition: privfeed.php:31

References $ilSetting, ilPageUtil\_existsAndNotEmpty(), ilObjStyleSheet\getSyntaxStylePath(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

Reimplemented in ilObjTalkTemplateAdministrationGUI.

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

354 {
355 $view_mode = $this->object->getViewMode();
356 if ($this->object->filteredSubtree()) {
357 $view_mode = ilContainer::VIEW_SIMPLE;
358 }
359 switch ($view_mode) {
360 // all items in one block
362 $container_view = new ilContainerSimpleContentGUI(
363 $this,
364 $this->getItemPresentation()
365 );
366 break;
367
369 $container_view = new ilContainerObjectiveGUI(
370 $this,
371 $this->getItemPresentation()
372 );
373 break;
374
375 // all items in one block
377 case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
378 $container_view = new ilContainerSessionsContentGUI(
379 $this,
380 $this->getItemPresentation()
381 );
382 break;
383
384 // all items in one block
386 default:
387 $container_view = new ilContainerByTypeContentGUI(
388 $this,
389 $this->getItemPresentation()
390 );
391 break;
392 }
393 return $container_view;
394 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Parent class of all container content GUIs.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilContainerContentGUI\getViewMode(), ilCourseConstants\IL_CRS_VIEW_TIMING, ILIAS\Repository\object(), ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_OBJECTIVE, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by ilObjOrgUnitGUI\view().

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

◆ getDidacticTemplateIdFromQuery()

ilContainerGUI::getDidacticTemplateIdFromQuery ( )
protected

Definition at line 209 of file class.ilContainerGUI.php.

209 : int
210 {
211 return $this->std_request->getDidacticTemplateId();
212 }

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), and ilObjFolderGUI\executeCommand().

+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, and ilObjRootFolderGUI.

Definition at line 183 of file class.ilContainerGUI.php.

183 : array
184 {
185 $values = parent::getEditFormValues();
186
187 $values['didactic_type'] =
188 'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
189
190 return $values;
191 }

References ilDidacticTemplateObjSettings\lookupTemplateId(), and ILIAS\Repository\object().

Referenced by ilObjFolderGUI\editObject().

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

◆ getItemPresentation()

ilContainerGUI::getItemPresentation (   $include_empty_blocks = true,
?string  $lang = null 
)
protected

Definition at line 140 of file class.ilContainerGUI.php.

144 if (is_null($this->item_presentation)) {
145 $this->item_presentation = $this->domain
146 ->content()
147 ->itemPresentation(
148 $this->getObject(),
149 $this->container_user_filter,
150 $include_empty_blocks,
151 $lang
152 );
153 }
155 }

References ilObjectGUI\getObject().

Referenced by ilObjTalkTemplateAdministrationGUI\getContentGUI().

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

◆ getModeManager()

ilContainerGUI::getModeManager ( )
protected

Definition at line 130 of file class.ilContainerGUI.php.

131 {
132 if (is_null($this->mode_manager)) {
133 $this->mode_manager = $this->domain
134 ->content()
135 ->mode($this->getObject());
136 }
137 return $this->mode_manager;
138 }
ModeManager $mode_manager

References $mode_manager, and ilObjectGUI\getObject().

Referenced by ilObjGroupGUI\disableAdministrationPanelObject(), ilObjGroupGUI\enableAdministrationPanelObject(), and ilObjStudyProgrammeGUI\executeCommand().

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

◆ getTabs()

ilContainerGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjTalkTemplateAdministrationGUI, ilObjTalkTemplateGUI, ilObjEmployeeTalkSeriesGUI, ilObjFolderGUI, ilObjGroupGUI, ilObjLearningSequenceGUI, ilObjOrgUnitGUI, ilObjRootFolderGUI, and ilObjStudyProgrammeGUI.

Definition at line 891 of file class.ilContainerGUI.php.

891 : void
892 {
894 $ilCtrl = $this->ctrl;
895
896 // edit permissions
897 if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
898 $this->tabs_gui->addTarget(
899 "perm_settings",
900 $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], "perm"),
901 ["perm", "info", "owner"],
902 'ilpermissiongui'
903 );
904 if ($ilCtrl->getNextClass() === "ilpermissiongui") {
905 $this->tabs_gui->activateTab("perm_settings");
906 }
907 }
908
909 // show clipboard
910 if (strtolower($this->std_request->getBaseClass()) === "ilrepositorygui" &&
911 $this->clipboard->hasEntries()) {
912 $this->tabs_gui->addTarget(
913 "clipboard",
914 $this->ctrl->getLinkTarget($this, "clipboard"),
915 "clipboard",
916 get_class($this)
917 );
918 }
919 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getTreeSelectorGUI()

ilContainerGUI::getTreeSelectorGUI ( string  $cmd)
protected

Reimplemented in ilObjOrgUnitGUI.

Definition at line 2616 of file class.ilContainerGUI.php.

2617 {
2618 $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
2619 // TODO: The study programme 'prg' is not included here, as the
2620 // ilRepositorySelectorExplorerGUI only handles static rules for
2621 // parent-child-relations and not the dynamic relationsships
2622 // required for the SP (see #16909).
2623 $exp->setTypeWhiteList(["root", "cat", "grp", "crs", "fold"]);
2624
2625 // Not all types are allowed in the LearningSequence
2626 // Extend whitelist, if all selected types are possible subojects of LSO
2627 if (in_array($this->clipboard->getCmd(), ["link", "cut"])) {
2628 $lso_types = array_keys($this->obj_definition->getSubObjects('lso'));
2629 $refs = $this->clipboard->getRefIds();
2630 $allow_lso = true;
2631 foreach ($refs as $item_ref_id) {
2632 $type = ilObject::_lookupType($item_ref_id, true);
2633 if (!in_array($type, $lso_types)) {
2634 $allow_lso = false;
2635 }
2636 }
2637 if ($allow_lso) {
2638 $whitelist = $exp->getTypeWhiteList();
2639 $whitelist[] = 'lso';
2640 $exp->setTypeWhiteList($whitelist);
2641 }
2642 }
2643
2644 if ($cmd === "link") {
2645 $exp->setSelectMode("nodes", true);
2646 } else {
2647 $exp->setSelectMode("nodes[]", false);
2648 }
2649 return $exp;
2650 }
Explorer for selecting repository items.
Explorer class that works on tree objects (Services/Tree)

References ilObject\_lookupType().

+ Here is the call graph for this function:

◆ gotItems()

ilContainerGUI::gotItems ( )
protected

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

628 : bool
629 {
630 return $this->getItemPresentation()->hasItems();
631 }

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

Definition at line 1611 of file class.ilContainerGUI.php.

1611 : void
1612 {
1613 $this->showPasteTreeObject();
1614 }

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

Definition at line 1537 of file class.ilContainerGUI.php.

1537 : void
1538 {
1539 $this->showPasteTreeObject();
1540 }

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

Definition at line 1616 of file class.ilContainerGUI.php.

1616 : void
1617 {
1618 $this->showPasteTreeObject();
1619 }

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjTalkTemplateGUI, ilObjFolderGUI, and ilObjRootFolderGUI.

Definition at line 2215 of file class.ilContainerGUI.php.

2216 {
2217 $lng = $this->lng;
2218 $lng->loadLanguageModule($this->object->getType());
2219
2220 $form = new ilPropertyFormGUI();
2221 $form->setFormAction($this->ctrl->getFormAction($this, "update"));
2222 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
2223
2224 $this->initFormTitleDescription($form);
2225
2226 $this->initEditCustomForm($form);
2227
2228 $form->addCommandButton("update", $this->lng->txt("save"));
2229
2230 return $form;
2231 }
ilPropertyFormGUI $form
setFormAction(string $a_formaction)
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

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

+ Here is the call graph for this function:

◆ initFilter()

ilContainerGUI::initFilter ( )
protected

Definition at line 2657 of file class.ilContainerGUI.php.

2657 : void
2658 {
2659 global $DIC;
2660
2661 if (!$this->object || !ilContainer::_lookupContainerSetting($this->object->getId(), "filter", '0')) {
2662 return;
2663 }
2664
2665 if ($this->isActiveOrdering() || $this->ctrl->getCmd() === "editOrder") {
2666 return;
2667 }
2668
2669 $filter_service = $this->container_filter_service;
2670 $request = $DIC->http()->request();
2671
2672 $filter = $filter_service->util()->getFilterForRefId(
2673 $this->ref_id,
2674 $DIC->ctrl()->getLinkTarget($this, "render", "", true),
2675 $this->isActiveAdministrationPanel()
2676 );
2677
2678 $filter_data = $DIC->uiService()->filter()->getData($filter);
2679
2680 $this->container_user_filter = $filter_service->userFilter($filter_data);
2681 $this->ui_filter = $filter;
2682 }
ilContainerFilterService $container_filter_service
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
ServerRequestInterface $request

References $DIC, ilContainer\_lookupContainerSetting(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

Definition at line 2120 of file class.ilContainerGUI.php.

2121 {
2122 $this->form = new ilPropertyFormGUI();
2123 $this->form->setFormAction($this->ctrl->getFormAction($this));
2124
2125 // new password
2126 $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
2127 $ipass->setRequired(true);
2128
2129 $this->form->addItem($ipass);
2130 $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
2131 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
2132
2133 $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
2134 $this->form->setFormAction($this->ctrl->getFormAction($this));
2135
2136 return $this->form;
2137 }
This class represents a password property in a property form.
form(?array $class_path, string $cmd, string $submit_caption="")

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

+ Here is the call graph for this function:

◆ initListPresentationForm()

ilContainerGUI::initListPresentationForm ( ilPropertyFormGUI  $form)
protected

Add list presentation settings to form.

Definition at line 2344 of file class.ilContainerGUI.php.

2345 {
2346 $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
2347
2348 $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
2349 $item_list->setInfo($this->lng->txt('cont_item_list_info'));
2350 $lpres->addOption($item_list);
2351
2352 $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
2353 $tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
2354 $lpres->addOption($tile_view);
2355
2356 // tile size
2357
2358 $si = new ilRadioGroupInputGUI($this->lng->txt("cont_tile_size"), "tile_size");
2359 foreach ($this->object->getTileSizes() as $key => $txt) {
2360 $op = new ilRadioOption($txt, $key);
2361 $si->addOption($op);
2362 }
2363 $tile_view->addSubItem($si);
2364 $si->setValue(
2365 (string) ((int) ilContainer::_lookupContainerSetting($this->object->getId(), "tile_size"))
2366 );
2367
2368 $lpres->setValue(
2369 ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
2370 );
2371
2372 $form->addItem($lpres);
2373
2374 return $form;
2375 }
This class represents a property in a property form.
This class represents an option in a radio group.

References ilContainer\_lookupContainerSetting(), ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by ilObjCourseGUI\initEditForm(), ilObjFolderGUI\initEditForm(), and ilObjGroupGUI\initForm().

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

◆ initManualSortingOptionForm()

ilContainerGUI::initManualSortingOptionForm ( ilContainerSortingSettings  $settings,
ilRadioOption  $element,
string  $a_prefix,
array  $a_sorting_settings 
)
protected

Add manual sorting options.

Definition at line 2430 of file class.ilContainerGUI.php.

2435 : ilRadioOption {
2436 $position = new ilRadioGroupInputGUI(
2437 $this->lng->txt('sorting_new_items_position'),
2438 $a_prefix . '_new_items_position'
2439 );
2440 $position->setValue((string) $settings->getSortNewItemsPosition());
2441 $position->setRequired(true);
2442
2443 //new items insert on top
2444 $new_top = new ilRadioOption(
2445 $this->lng->txt('sorting_new_items_at_top'),
2447 );
2448
2449 $position->addOption($new_top);
2450
2451 //new items insert at bottom
2452 $new_bottom = new ilRadioOption(
2453 $this->lng->txt('sorting_new_items_at_bottom'),
2455 );
2456
2457 $position->addOption($new_bottom);
2458
2459 $element->addSubItem($position);
2460
2461 $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
2462 $order->setValue((string) $settings->getSortNewItemsOrder());
2463 $order->setRequired(true);
2464
2465 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2466 //new items sort in alphabetical order
2467 $new_title = new ilRadioOption(
2468 $this->lng->txt('sorting_title_header'),
2470 );
2471
2472 $order->addOption($new_title);
2473 }
2474
2475 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2476 //new items sort by creation date
2477 $new_creation = new ilRadioOption(
2478 $this->lng->txt('sorting_creation_header'),
2480 );
2481
2482 $order->addOption($new_creation);
2483 }
2484
2485 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2486 //new items by activation
2487 $new_activation = new ilRadioOption(
2488 $this->lng->txt('crs_sort_activation'),
2490 );
2491
2492 $order->addOption($new_activation);
2493 }
2494
2495 $element->addSubItem($order);
2496
2497 $this->initSortingDirectionForm($settings, $element, 'manual');
2498
2499 return $element;
2500 }
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
Add sorting direction.
const SORT_NEW_ITEMS_ORDER_ACTIVATION
const SORT_NEW_ITEMS_ORDER_TITLE
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_POSITION_BOTTOM
const SORT_NEW_ITEMS_POSITION_TOP

◆ initSortingDirectionForm()

ilContainerGUI::initSortingDirectionForm ( ilContainerSortingSettings  $sorting_settings,
ilRadioOption  $element,
string  $a_prefix 
)
protected

Add sorting direction.

Definition at line 2393 of file class.ilContainerGUI.php.

2397 : ilRadioOption {
2398 if ($a_prefix === 'manual') {
2399 $txt = $this->lng->txt('sorting_new_items_direction');
2400 } else {
2401 $txt = $this->lng->txt('sorting_direction');
2402 }
2403
2404 $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
2405 $direction->setValue((string) $sorting_settings->getSortDirection());
2406 $direction->setRequired(true);
2407
2408 // asc
2409 $asc = new ilRadioOption(
2410 $this->lng->txt('sorting_asc'),
2412 );
2413 $direction->addOption($asc);
2414
2415 // desc
2416 $desc = new ilRadioOption(
2417 $this->lng->txt('sorting_desc'),
2419 );
2420 $direction->addOption($desc);
2421
2422 $element->addSubItem($direction);
2423
2424 return $element;
2425 }
const SORT_DIRECTION_DESC
const SORT_DIRECTION_ASC

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initSortingForm()

ilContainerGUI::initSortingForm ( ilPropertyFormGUI  $form,
array  $a_sorting_settings 
)
protected

Append sorting settings to property form.

Definition at line 2274 of file class.ilContainerGUI.php.

2278 $settings = new ilContainerSortingSettings($this->object->getId());
2279 $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
2280
2281 if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
2282 $sort_inherit = new ilRadioOption();
2283 $sort_inherit->setTitle(
2284 $this->lng->txt('sort_inherit_prefix') .
2287 $this->object->getId()
2288 )
2289 ) . ') '
2290 );
2291 $sort_inherit->setValue((string) ilContainer::SORT_INHERIT);
2292 $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
2293 $sort->addOption($sort_inherit);
2294 }
2295 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2296 $sort_title = new ilRadioOption(
2297 $this->lng->txt('sorting_title_header'),
2299 );
2300 $sort_title->setInfo($this->lng->txt('sorting_info_title'));
2301
2302 $this->initSortingDirectionForm($settings, $sort_title, 'title');
2303 $sort->addOption($sort_title);
2304 }
2305 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2306 $sort_activation = new ilRadioOption(
2307 $this->lng->txt('sorting_creation_header'),
2309 );
2310 $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
2311 $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
2312 $sort->addOption($sort_activation);
2313 }
2314 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2315 $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), (string) ilContainer::SORT_ACTIVATION);
2316 $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
2317 $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
2318 $sort->addOption($sort_activation);
2319 }
2320 if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
2321 $sort_manual = new ilRadioOption(
2322 $this->lng->txt('sorting_manual_header'),
2324 );
2325 $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
2326 $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
2327 $sort->addOption($sort_manual);
2328 }
2329
2330 // Handle moved containers and there possibly invalid values
2331 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2332 $sort->setValue((string) $settings->getSortMode());
2333 } else {
2334 $sort->setValue((string) ilContainer::SORT_TITLE);
2335 }
2336 $form->addItem($sort);
2337
2338 return $form;
2339 }
initManualSortingOptionForm(ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
Add manual sorting options.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupSortModeFromParentContainer(int $a_obj_id)
static sortModeToString(int $a_sort_mode)
Get string representation of sort mode.

Referenced by ilObjCourseGUI\initEditForm(), ilObjFolderGUI\initEditForm(), and ilObjGroupGUI\initForm().

+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilContainerGUI::isActiveAdministrationPanel ( )

Reimplemented in ilObjTalkTemplateAdministrationGUI.

Definition at line 1880 of file class.ilContainerGUI.php.

1880 : bool
1881 {
1882 // #10081
1883 if ($this->object->getRefId() &&
1884 !$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
1885 return false;
1886 }
1887
1888 return $this->getModeManager()->isAdminMode();
1889 }

References ILIAS\Repository\object().

Referenced by ilObjOrgUnitGUI\view(), and ilObjGroupGUI\viewObject().

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

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

Definition at line 954 of file class.ilContainerGUI.php.

954 : bool
955 {
956 if ($this->isActiveOrdering()) {
958 }
959 return false;
960 }

References ilContainerSortingSettings\_lookupSortMode(), ILIAS\Repository\object(), and ilContainer\SORT_MANUAL.

+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

Definition at line 949 of file class.ilContainerGUI.php.

949 : bool
950 {
951 return $this->edit_order;
952 }

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

Definition at line 972 of file class.ilContainerGUI.php.

972 : bool
973 {
975 }

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

Definition at line 1603 of file class.ilContainerGUI.php.

1603 : void
1604 {
1605 $ilCtrl = $this->ctrl;
1606
1607 $this->tpl->setOnScreenMessage('success', $this->lng->txt("obj_inserted_clipboard"), true);
1608 $ilCtrl->returnToParent($this);
1609 }

References ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand(), and ilObjOrgUnitGUI\executeCommand().

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

◆ linkObject()

ilContainerGUI::linkObject ( )

create an new reference of an object in tree it's like a hard link of unix

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

1175 : void
1176 {
1178 $ilCtrl = $this->ctrl;
1180
1181 $no_cut = [];
1182 $no_link = [];
1183
1184 $ids = $this->std_request->getSelectedIds();
1185
1186 if (count($ids) === 0) {
1187 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1188 $this->ctrl->redirect($this, "");
1189 }
1190
1191 // CHECK ACCESS
1192 foreach ($ids as $ref_id) {
1193 if (!$rbacsystem->checkAccess('delete', $ref_id)) {
1194 $no_cut[] = $ref_id;
1195 }
1196
1198
1199 if (!$this->obj_definition->allowLink($object->getType())) {
1200 $no_link[] = $object->getType();
1201 }
1202 }
1203
1204 // NO ACCESS
1205 if ($no_cut !== []) {
1206 $this->tpl->setOnScreenMessage(
1207 'failure',
1208 $this->lng->txt("msg_no_perm_link") . " " . implode(',', $no_cut),
1209 true
1210 );
1211 $this->ctrl->redirect($this, "");
1212 }
1213
1214 if ($no_link !== []) {
1215 //#12203
1216 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_obj_no_link'), true);
1217 $this->ctrl->redirect($this, "");
1218 }
1219
1220 $this->clipboard->setParent($this->requested_ref_id);
1221 $this->clipboard->setCmd($ilCtrl->getCmd());
1222 $this->clipboard->setRefIds($ids);
1223
1224 $suffix = 'p';
1225 if (count($this->clipboard->getRefIds()) === 1) {
1226 $suffix = 's';
1227 }
1228 $this->tpl->setOnScreenMessage('info', $this->lng->txt("msg_link_clipboard_" . $suffix), true);
1229
1231 }

References $ilErr, $ref_id, ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByRefId(), and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ modifyItemGUI()

ilContainerGUI::modifyItemGUI ( ilObjectListGUI  $a_item_list_gui,
array  $a_item_data 
)

Reimplemented in ilObjCourseGUI, ilObjFolderGUI, and ilObjGroupGUI.

Definition at line 2036 of file class.ilContainerGUI.php.

2039 : void {
2040 /* not really implemented buildPath does not exist
2041 $lng = $this->lng;
2042
2043 if ($a_show_path) {
2044 $a_item_list_gui->addCustomProperty(
2045 $lng->txt('path'),
2046 ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2047 false,
2048 true
2049 );
2050 }
2051 */
2052 }

◆ pasteObject()

ilContainerGUI::pasteObject ( )

paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved

Definition at line 1625 of file class.ilContainerGUI.php.

1625 : void
1626 {
1629 $ilLog = $this->log;
1631 $ilUser = $this->user;
1632 $ilCtrl = $this->ctrl;
1634
1635 $exists = [];
1636 $no_paste = [];
1637 $is_child = [];
1638 $not_allowed_subobject = [];
1639
1640
1641 if (!in_array($this->clipboard->getCmd(), ["cut", "link", "copy"])) {
1642 $message = get_class(
1643 $this
1644 ) . "::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1645 $ilErr->raiseError($message, $ilErr->WARNING);
1646 }
1647
1648 // this loop does all checks
1649 foreach ($this->clipboard->getRefIds() as $ref_id) {
1651
1652 // CHECK ACCESS
1653 if (!$rbacsystem->checkAccess('create', $this->object->getRefId(), $obj_data->getType())) {
1654 $no_paste[] = $ref_id;
1655 $no_paste_titles[] = $obj_data->getTitle();
1656 }
1657
1658 // CHECK IF REFERENCE ALREADY EXISTS
1659 if ($this->object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1660 $exists[] = $ref_id;
1661 break;
1662 }
1663
1664 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1665 if ($this->tree->isGrandChild($ref_id, $this->object->getRefId())) {
1667 }
1668
1669 if ($ref_id == $this->object->getRefId()) {
1671 }
1672
1673 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1674 $obj_type = $obj_data->getType();
1675
1676 if (!array_key_exists($obj_type, $this->object->getPossibleSubObjects())) {
1677 $not_allowed_subobject[] = $obj_data->getType();
1678 }
1679 }
1680
1682 // process checking results
1683 // BEGIN WebDAV: Copying an object into the same container is allowed
1684 if (count($exists) > 0 && $this->clipboard->getCmd() !== "copy") {
1685 // END WebDAV: Copying an object into the same container is allowed
1686 $ilErr->raiseError($this->lng->txt("msg_obj_exists"), $ilErr->MESSAGE);
1687 }
1688
1689 if (count($is_child) > 0) {
1690 $ilErr->raiseError(
1691 $this->lng->txt("msg_not_in_itself") . " " . implode(',', $is_child),
1692 $ilErr->MESSAGE
1693 );
1694 }
1695
1696 if (count($not_allowed_subobject) > 0) {
1697 $ilErr->raiseError(
1698 $this->lng->txt("msg_may_not_contain") . " " . implode(',', $not_allowed_subobject),
1699 $ilErr->MESSAGE
1700 );
1701 }
1702
1703 if (count($no_paste) > 0) {
1704 $ilErr->raiseError(
1705 $this->lng->txt("msg_no_perm_paste") . " " .
1706 implode(',', $no_paste),
1707 $ilErr->MESSAGE
1708 );
1709 }
1710
1711 // log pasteObject call
1712 $ilLog->write("ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1713
1715 // everything ok: now paste the objects to new location
1716
1717 // to prevent multiple actions via back/reload button
1718 $ref_ids = $this->clipboard->getRefIds();
1719
1720 // save cmd for correct message output after clearing the clipboard
1721 $last_cmd = $this->clipboard->getCmd();
1722
1723 // BEGIN WebDAV: Support a copy command in the repository
1724 // process COPY command
1725 if ($this->clipboard->getCmd() === "copy") {
1726 $this->clipboard->clear();
1727
1728 // new implementation, redirects to ilObjectCopyGUI
1729 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
1730 if (count($ref_ids) === 1) {
1731 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
1732 } else {
1733 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $ref_ids));
1734 }
1735 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
1736
1737 $ilLog->write("ilObjectGUI::pasteObject(), copy finished");
1738 }
1739 // END WebDAV: Support a Copy command in the repository
1740
1741 // process CUT command
1742 if ($this->clipboard->getCmd() === "cut") {
1743 foreach ($ref_ids as $ref_id) {
1744 // Store old parent
1745 $old_parent = $tree->getParentId($ref_id);
1746 $this->tree->moveTree($ref_id, $this->object->getRefId());
1747 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1748
1750 $availability = new ilObjectActivation();
1751 $availability->read($ref_id);
1752 $availability->update($ref_id, $this->object->getRefId());
1753
1754 // BEGIN ChangeEvent: Record cut event.
1755 $node_data = $tree->getNodeData($ref_id);
1756 $old_parent_data = $tree->getNodeData($old_parent);
1758 $node_data['obj_id'],
1759 $ilUser->getId(),
1760 'remove',
1761 $old_parent_data['obj_id']
1762 );
1764 $node_data['obj_id'],
1765 $ilUser->getId(),
1766 'add',
1767 $this->object->getId()
1768 );
1769 // END PATCH ChangeEvent: Record cut event.
1770 }
1771 } // END CUT
1772
1773 // process LINK command
1774 $ref_id = 0;
1775 $subnodes = [];
1776 if ($this->clipboard->getCmd() === "link") {
1777 foreach ($ref_ids as $ref_id) {
1778 // get node data
1779 $top_node = $this->tree->getNodeData($ref_id);
1780
1781 // get subnodes of top nodes
1782 $subnodes[$ref_id] = $this->tree->getSubTree($top_node);
1783 }
1784 // now move all subtrees to new location
1785 foreach ($subnodes as $key => $subnode) {
1786 // first paste top_node....
1787 $obj_data = ilObjectFactory::getInstanceByRefId($key);
1788 $new_ref_id = $obj_data->createReference();
1789 $obj_data->putInTree($this->requested_ref_id);
1790 $obj_data->setPermissions($this->requested_ref_id);
1791
1792 // BEGIN ChangeEvent: Record link event.
1793 $node_data = $tree->getNodeData($new_ref_id);
1795 $node_data['obj_id'],
1796 $ilUser->getId(),
1797 'add',
1798 $this->object->getId()
1799 );
1800 // END PATCH ChangeEvent: Record link event.
1801 }
1802
1803 $ilLog->write("ilObjectGUI::pasteObject(), link finished");
1804 } // END LINK
1805
1806
1807 // clear clipboard
1808 $this->clearObject();
1809
1810 if ($last_cmd === "cut") {
1811 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_cut_copied"), true);
1812 } // BEGIN WebDAV: Support a copy command in repository
1813 elseif ($last_cmd === "copy") {
1814 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_cloned"), true);
1815 } elseif ($last_cmd === 'link') {
1816 // END WebDAV: Support copy command in repository
1817 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_linked"), true);
1818 }
1819
1820 $this->ctrl->returnToParent($this);
1821 }
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
static _adjustMovedObjectConditions(int $a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
clearObject()
clear clipboard and go back to last object
Class ilObjectActivation.
adjustMovedObjectPermissions(int $ref_id, int $old_parent)
Adjust permissions of moved objects.
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getParentId(int $a_node_id)
get parent id of given node

References $ilErr, $log, $ref_id, ilConditionHandler\_adjustMovedObjectConditions(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by ilObjOrgUnitGUI\performPaste().

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

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

Definition at line 1250 of file class.ilContainerGUI.php.

1250 : void
1251 {
1255 $ilLog = $this->log;
1257 $ilObjDataCache = $this->obj_data_cache;
1258 $ilUser = $this->user;
1260 $lng = $this->lng;
1261 $ui = $this->ui;
1262
1263 $exists = [];
1264 $is_child = [];
1265 $not_allowed_subobject = [];
1266 $no_paste = [];
1267
1268 $command = $this->clipboard->getCmd();
1269 if (!in_array($command, ['cut', 'link', 'copy'])) {
1270 $message = __METHOD__ . ": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1271 $ilErr->raiseError($message, $ilErr->WARNING);
1272 }
1273
1274 $nodes = $this->std_request->getNodes();
1275
1276 if (count($nodes) === 0) {
1277 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_at_least_one_object'));
1278 switch ($command) {
1279 case 'link':
1280 case 'copy':
1281 case 'cut':
1282 $this->showPasteTreeObject();
1283 break;
1284 }
1285 return;
1286 }
1287
1288 // this loop does all checks
1289 $folder_objects_cache = [];
1290 foreach ($this->clipboard->getRefIds() as $ref_id) {
1292 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1293
1294 foreach ($nodes as $folder_ref_id) {
1295 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1296 $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
1297 }
1298
1299 // CHECK ACCESS
1300 if (!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType())) {
1301 $no_paste[] = sprintf(
1302 $this->lng->txt('msg_no_perm_paste_object_in_folder'),
1303 $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']',
1304 $folder_objects_cache[$folder_ref_id]->getTitle(
1305 ) . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']'
1306 );
1307 }
1308
1309 // CHECK IF REFERENCE ALREADY EXISTS
1310 if ($folder_ref_id == $current_parent_id) {
1311 $exists[] = sprintf(
1312 $this->lng->txt('msg_obj_exists_in_folder'),
1313 $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']',
1314 $folder_objects_cache[$folder_ref_id]->getTitle(
1315 ) . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']'
1316 );
1317 }
1318
1319 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1320 if ($ref_id == $folder_ref_id || $tree->isGrandChild($ref_id, $folder_ref_id)) {
1321 $is_child[] = sprintf(
1322 $this->lng->txt('msg_paste_object_not_in_itself'),
1323 $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']'
1324 );
1325 }
1326
1327 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1328 if (!array_key_exists(
1329 $obj_data->getType(),
1330 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1331 )) {
1332 $not_allowed_subobject[] = sprintf(
1333 $this->lng->txt('msg_obj_may_not_contain_objects_of_type'),
1334 $folder_objects_cache[$folder_ref_id]->getTitle(
1335 ) . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']',
1336 $lng->txt('obj_' . $obj_data->getType())
1337 );
1338 }
1339 }
1340 }
1341
1343 // process checking results
1344 $error = "";
1345 if ($command !== "copy" && count($exists)) {
1346 $error .= implode('<br />', $exists);
1347 }
1348
1349 if (count($is_child)) {
1350 $error .= $error !== '' ? '<br />' : '';
1351 $error .= implode('<br />', $is_child);
1352 }
1353
1354 if (count($not_allowed_subobject)) {
1355 $error .= $error !== '' ? '<br />' : '';
1356 $error .= implode('<br />', $not_allowed_subobject);
1357 }
1358
1359 if (count($no_paste)) {
1360 $error .= $error !== '' ? '<br />' : '';
1361 $error .= implode('<br />', $no_paste);
1362 }
1363
1364 if ($error !== '') {
1365 $this->tpl->setOnScreenMessage('failure', $error);
1366 switch ($command) {
1367 case 'link':
1368 case 'copy':
1369 case 'cut':
1370 $this->showPasteTreeObject();
1371 break;
1372 }
1373 return;
1374 }
1375
1376 // log pasteObject call
1377 $ilLog->write(__METHOD__ . ", cmd: " . $command);
1378
1380 // everything ok: now paste the objects to new location
1381
1382 // to prevent multiple actions via back/reload button
1383 $ref_ids = $this->clipboard->getRefIds();
1384 $this->clipboard->clear();
1385
1386
1387 // process COPY command
1388 if ($command === 'copy') {
1389 foreach ($nodes as $folder_ref_id) {
1390 foreach ($ref_ids as $ref_id) {
1391 $revIdMapping = [];
1392
1393 $oldNode_data = $tree->getNodeData($ref_id);
1394 if ($oldNode_data['parent'] == $folder_ref_id) {
1395 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'], null);
1396 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1397 } else {
1398 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
1399 }
1400
1401 // BEGIN ChangeEvent: Record copy event.
1402 $old_parent_data = $tree->getParentNodeData($ref_id);
1403 $newNode_data = $tree->getNodeData($newRef);
1405 $oldNode_data['type'],
1406 $ref_id,
1407 $oldNode_data['obj_id'],
1408 $ilUser->getId()
1409 );
1411 $newNode_data['obj_id'],
1412 $ilUser->getId(),
1413 'add',
1414 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1415 );
1416 // END PATCH ChangeEvent: Record cut event.
1417 }
1418 }
1419
1420 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_cloned'), true);
1421 } // END COPY
1422
1423 // process CUT command
1424 if ($command === 'cut') {
1425 foreach ($nodes as $folder_ref_id) {
1426 foreach ($ref_ids as $ref_id) {
1427 // Store old parent
1428 $old_parent = $tree->getParentId($ref_id);
1429 $tree->moveTree($ref_id, $folder_ref_id);
1431
1433 $availability = new ilObjectActivation();
1434 $availability->read($ref_id);
1435 $availability->update($ref_id, $folder_ref_id);
1436
1437 // BEGIN ChangeEvent: Record cut event.
1438 $node_data = $tree->getNodeData($ref_id);
1439 $old_parent_data = $tree->getNodeData($old_parent);
1441 $node_data['obj_id'],
1442 $ilUser->getId(),
1443 'remove',
1444 $old_parent_data['obj_id']
1445 );
1447 $node_data['obj_id'],
1448 $ilUser->getId(),
1449 'add',
1450 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1451 );
1452 // END PATCH ChangeEvent: Record cut event.
1453 }
1454
1455 // prevent multiple iterations for cut cmommand
1456 break;
1457 }
1458
1459 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_cut_copied'), true);
1460 } // END CUT
1461
1462 // process LINK command
1463 if ($command === 'link') {
1464 $subnodes = [];
1465 $linked_to_folders = [];
1466
1467 $rbac_log_active = ilRbacLog::isActive();
1468
1469 foreach ($nodes as $folder_ref_id) {
1470 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1471 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1472 );
1473
1474 foreach ($ref_ids as $ref_id) {
1475 // get node data
1476 $top_node = $tree->getNodeData($ref_id);
1477
1478 // get subnodes of top nodes
1479 $subnodes[$ref_id] = $tree->getSubTree($top_node);
1480 }
1481
1482 // now move all subtrees to new location
1483 foreach ($subnodes as $key => $subnode) {
1484 // first paste top_node....
1485 $obj_data = ilObjectFactory::getInstanceByRefId($key);
1486 $new_ref_id = $obj_data->createReference();
1487 $obj_data->putInTree($folder_ref_id);
1488 $obj_data->setPermissions($folder_ref_id);
1489
1490 // rbac log
1491 if ($rbac_log_active) {
1492 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
1493 $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
1494 ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
1495 }
1496
1497 // BEGIN ChangeEvent: Record link event.
1498 $node_data = $tree->getNodeData($new_ref_id);
1500 $node_data['obj_id'],
1501 $ilUser->getId(),
1502 'add',
1503 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1504 );
1505 // END PATCH ChangeEvent: Record link event.
1506 }
1507
1508 $ilLog->write(__METHOD__ . ', link finished');
1509 }
1510
1511 $links = [];
1512 if (count($linked_to_folders)) {
1513 foreach ($linked_to_folders as $ref_id => $title) {
1514 $links[] = $ui->factory()->link()->standard($title, ilLink::_getLink($ref_id));
1515 }
1516 }
1517
1518 $suffix = 'p';
1519 if (count($ref_ids) === 1) {
1520 $suffix = 's';
1521 }
1522
1523 $mbox = $ui->factory()->messageBox()->success(
1524 $this->lng->txt('mgs_objects_linked_to_the_following_folders_' . $suffix)
1525 )
1526 ->withLinks($links);
1527
1528 $this->tpl->setOnScreenMessage('success', $ui->renderer()->render($mbox), true);
1529 } // END LINK
1530
1531 // clear clipboard
1532 $this->clearObject();
1533
1534 $this->ctrl->returnToParent($this);
1535 }
renderer()
Get a renderer for UI components.
Definition: UIServices.php:44
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:36
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, $a_ext_rc=null, $a_ext_time=null)
ilRbacReview $rbacreview
ilObjectDataCache $obj_data_cache
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null)
Appends the text " - Copy" to a filename in the language of the current user.
static add(int $action, int $ref_id, array $diff, bool $source_ref_id=false)
static gatherFaPa(int $ref_id, array $role_ids, bool $add_action=false)
const LINK_OBJECT
static isActive()
getParentRoleIds(int $a_endnode_id, bool $a_templates=false)
Get an array of parent role ids of all parent roles, if last parameter is set true you get also all p...
isGrandChild(int $a_startnode_id, int $a_querynode_id)
checks if a node is in the path of an other node
moveTree(int $a_source_id, int $a_target_id, int $a_location=self::POS_LAST_NODE)
Move Tree Implementation @access public.
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
getParentNodeData(int $a_node_id)
get data of parent node from tree and object_data

References $ilErr, $lng, $log, $ref_id, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), ILIAS\Repository\ctrl(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilRbacLog\isActive(), ilRbacLog\LINK_OBJECT, and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand(), and ilObjOrgUnitGUI\executeCommand().

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

◆ redrawListItemObject()

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

Definition at line 2157 of file class.ilContainerGUI.php.

2157 : void
2158 {
2159 $tpl = $this->tpl;
2160
2161 $html = null;
2162
2163 $child_ref_id = $this->std_request->getChildRefId();
2164 $parent_ref_id = $this->std_request->getParentRefId();
2165
2166 $item_data = $this->object->getSubItems(false, false, $child_ref_id);
2167 $container_view = $this->getContentGUI();
2168
2169 // see #41377 (material not redrawn, when not a direct child)
2170 $sess_data = [];
2171 if (isset($this->object->items["sess"])) {
2172 $sess_data = $this->object->items["sess"]; // before #41377
2173 } elseif (ilObject::_lookupType($parent_ref_id, true) === "sess") {
2174 $sess_data[] = [
2175 "obj_id" => ilObject::_lookupObjectId($parent_ref_id)
2176 ]; // added with #41377
2177 }
2178
2179 // list item is session material (not part of "_all"-items - see below)
2180 $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
2181 if (in_array($child_ref_id, $event_items)) {
2182 foreach (($sess_data) as $id) {
2183 $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
2184 foreach ($items as $event_item) {
2185 if ($event_item["child"] == $child_ref_id) {
2186 // sessions
2187 if ($parent_ref_id > 0) {
2188 $event_item["parent"] = $parent_ref_id;
2189 }
2190 $html = $container_view->renderItem($event_item);
2191 }
2192 }
2193 }
2194 }
2195
2196 // "normal" list item
2197 if (!$html) {
2198 foreach (($this->object->items["_all"] ?? []) as $id) {
2199 if ($id["child"] == $child_ref_id) {
2200 $html = $container_view->renderItem($id);
2201 }
2202 }
2203 }
2204
2205 if ($html) {
2206 echo $html;
2207
2208 // we need to add onload code manually (rating, comments, etc.)
2210 }
2211
2212 exit;
2213 }
static _getItemsOfContainer(int $a_ref_id)
static getItemsByEvent(int $event_id)
Get session material / event items.
static _lookupObjectId(int $ref_id)
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.

References $id, ilEventItems\_getItemsOfContainer(), ilObject\_lookupObjectId(), ilObject\_lookupType(), exit, ilObjectActivation\getItemsByEvent(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ removeFromSystemObject()

ilContainerGUI::removeFromSystemObject ( )

Reimplemented in ilObjRecoveryFolderGUI.

Definition at line 2574 of file class.ilContainerGUI.php.

2574 : void
2575 {
2576 $this->checkPermission("write");
2577 $ru = new ilRepositoryTrashGUI($this);
2578 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2579 $this->ctrl->redirect($this, "trash");
2580 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ renderBlockAsynchObject()

ilContainerGUI::renderBlockAsynchObject ( )

render the object

Definition at line 477 of file class.ilContainerGUI.php.

477 : void
478 {
479 $container_view = $this->getContentGUI();
480 echo $container_view->getSingleTypeBlockAsynch(
481 $this->std_request->getType()
482 );
483 exit;
484 }

References exit.

◆ renderObject()

ilContainerGUI::renderObject ( )

Reimplemented in ilObjCategoryGUI, ilObjCourseGUI, ilObjFolderGUI, ilObjGroupGUI, and ilObjRootFolderGUI.

Definition at line 396 of file class.ilContainerGUI.php.

396 : void
397 {
398 $ilTabs = $this->tabs;
399 $ilCtrl = $this->ctrl;
404
405 $container_view = $this->getContentGUI();
406
407 $this->setContentSubTabs();
408 if ($this->isActiveAdministrationPanel()) {
409 if (!$this->item_presentation->canManageItems()) {
410 $this->ctrl->redirect($this, "disableAdministrationPanel");
411 }
412 $ilTabs->activateSubTab("manage");
413 } else {
414 $ilTabs->activateSubTab("view_content");
415 }
416
417 $container_view->setOutput();
418
419 //$this->adminCommands = $container_view->adminCommands;
420
421 $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
422 || ($this->std_request->getCmdClass() === "");
423
424 // it is important not to show the subobjects/admin panel here, since
425 // we will create nested forms in case, e.g. a news/calendar item is added
426 if ($is_container_cmd) {
428
429 if (!$this->edit_order) {
430 $this->showPossibleSubObjects();
431 }
432 if ($this->isActiveAdministrationPanel()) {
434 }
435
436 if (is_object($this->object) &&
438 $this->rbacsystem->checkAccess("write", $this->object->getRefId())
439 ) {
440 if ($ilSetting->get("enable_cat_page_edit")) {
441 if (!$this->isActiveAdministrationPanel() &&
442 !$this->isActiveOrdering() &&
443 $this->supportsPageEditor()
444 ) {
446 $lng->txt("cntr_text_media_editor"),
447 $ilCtrl->getLinkTarget($this, "editPageFrame")
448 );
449 }
450 }
451 }
452 if (!$this->edit_order) {
453 if (!$this->isActiveAdministrationPanel() && $this->getCreationMode() === false) {
455 }
456 }
457 }
458
459 $this->showContainerFilter();
460
461 $this->showPermanentLink();
462
463 // add tree updater javascript
464 if ($this->requested_ref_id > 1 && $ilSetting->get("rep_tree_synchronize")) {
465 $ilCtrl->setParameter($this, "active_node", $this->requested_ref_id);
466 }
467 }
showPossibleSubObjects()
show possible sub objects (pull down menu)
static showMemberViewSwitch(int $a_ref_id)
addButton(string $a_txt, string $a_cmd, string $a_target="", ?int $a_acc_key=null, string $a_additional_attrs='', string $a_id="", string $a_class='submit')

References $ilSetting, $lng, ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and ilMemberViewGUI\showMemberViewSwitch().

+ Here is the call graph for this function:

◆ restoreToNewLocationObject()

ilContainerGUI::restoreToNewLocationObject ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 2582 of file class.ilContainerGUI.php.

2582 : void
2583 {
2584 $this->tabs_gui->activateTab('trash');
2585
2586 $ru = new ilRepositoryTrashGUI($this);
2587 $ru->restoreToNewLocation();
2588 }

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

Definition at line 2377 of file class.ilContainerGUI.php.

2377 : void
2378 {
2379 $val = ($form->getInput('list_presentation') === "tile")
2380 ? "tile"
2381 : "";
2382 ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
2384 $this->object->getId(),
2385 "tile_size",
2386 (string) ((int) $form->getInput('tile_size'))
2387 );
2388 }
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References ilContainer\_writeContainerSetting(), ilPropertyFormGUI\getInput(), and ILIAS\Repository\object().

Referenced by ilObjFolderGUI\updateCustom(), ilObjCourseGUI\updateObject(), and ilObjGroupGUI\updateObject().

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

◆ savePasswordObject()

ilContainerGUI::savePasswordObject ( )
protected

Definition at line 2139 of file class.ilContainerGUI.php.

2139 : void
2140 {
2141 $ilUser = $this->user;
2142
2144 if ($form->checkInput()) {
2145 $ilUser->resetPassword($this->form->getInput('new_password'));
2146 $this->tpl->setOnScreenMessage('success', $this->lng->txt('webdav_pwd_instruction_success'), true);
2147 $this->showPasswordInstructionObject(false);
2148 return;
2149 }
2152 }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject(bool $a_init=true)

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

+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

Reimplemented in ilObjCourseGUI.

Definition at line 1980 of file class.ilContainerGUI.php.

1980 : void
1981 {
1982 $sorting = ilContainerSorting::_getInstance($this->object->getId());
1983
1984 // Allow comma
1985 $positions = $this->std_request->getPositions();
1986 $sorting->savePost($positions);
1987 $this->tpl->setOnScreenMessage('success', $this->lng->txt('cntr_saved_sorting'), true);
1988 $this->ctrl->redirect($this, "editOrder");
1989 }
static _getInstance(int $a_obj_id)

References ilContainerSorting\_getInstance(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

Definition at line 2502 of file class.ilContainerGUI.php.

2502 : void
2503 {
2504 $settings = new ilContainerSortingSettings($this->object->getId());
2505 $settings->setSortMode((int) $form->getInput("sorting"));
2506
2507 switch ($form->getInput('sorting')) {
2509 $settings->setSortDirection((int) $form->getInput('title_sorting_direction'));
2510 break;
2512 $settings->setSortDirection((int) $form->getInput('activation_sorting_direction'));
2513 break;
2515 $settings->setSortDirection((int) $form->getInput('creation_sorting_direction'));
2516 break;
2518 $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
2519 $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
2520 $settings->setSortDirection((int) $form->getInput('manual_sorting_direction'));
2521 break;
2522 }
2523
2524 $settings->update();
2525 }

References ilPropertyFormGUI\getInput(), ILIAS\Repository\object(), ilContainerSortingSettings\setSortDirection(), ilContainerSortingSettings\setSortMode(), ilContainerSortingSettings\setSortNewItemsOrder(), ilContainerSortingSettings\setSortNewItemsPosition(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ilContainerSortingSettings\update().

Referenced by ilObjFolderGUI\updateCustom(), ilObjCourseGUI\updateObject(), and ilObjGroupGUI\updateObject().

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

◆ setColumnSettings()

ilContainerGUI::setColumnSettings ( ilColumnGUI  $column_gui)

Reimplemented from ilObjectGUI.

Definition at line 1891 of file class.ilContainerGUI.php.

1891 : void
1892 {
1893 $ilAccess = $this->access;
1894 parent::setColumnSettings($column_gui);
1895
1896 $column_gui->setItemPresentationManager(
1897 $this->item_presentation
1898 );
1899
1900 //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
1901 // && $this->allowBlocksConfigure())
1902 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1903 $column_gui->setBlockProperty("news", "settings", '1');
1904 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
1905 $column_gui->setBlockProperty("news", "default_visibility_option", '1');
1906 $column_gui->setBlockProperty("news", "hide_news_block_option", '1');
1907 }
1908
1909 if ($this->isActiveAdministrationPanel()) {
1910 $column_gui->setAdminCommands(true);
1911 }
1912 }
setAdminCommands(bool $a_admincommands)
setItemPresentationManager(ItemPresentationManager $item_presentation)
setBlockProperty(string $a_block_type, string $a_property, string $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...

References ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), and ilColumnGUI\setItemPresentationManager().

+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

Reimplemented in ilObjCourseGUI, ilObjTalkTemplateAdministrationGUI, ilObjOrgUnitGUI, and ilObjStudyProgrammeGUI.

Definition at line 486 of file class.ilContainerGUI.php.

486 : void
487 {
489 }
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link.

◆ setPageEditorTabs()

ilContainerGUI::setPageEditorTabs ( )

Definition at line 818 of file class.ilContainerGUI.php.

818 : void
819 {
821
822 if (!$this->isActiveAdministrationPanel()
823 || strtolower($this->ctrl->getCmdClass()) !== "ilcontainerpagegui") {
824 return;
825 }
826
827 $lng->loadLanguageModule("content");
828 //$tabs_gui = new ilTabsGUI();
829 //$tabs_gui->setSubTabs();
830
831 // back to upper context
832 $this->tabs_gui->setBackTarget(
833 $this->lng->txt("obj_cat"),
834 $this->ctrl->getLinkTarget($this, "")
835 );
836
837 $this->tabs_gui->addTarget(
838 "edit",
839 $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view"),
840 ["", "view"],
841 "ilcontainerpagegui"
842 );
843
844 //$this->tpl->setTabs($tabs_gui->getHTML());
845 }

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

+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilContainerGUI::setSideColumnReturn ( )

Reimplemented in ilObjCourseGUI, and ilObjGroupGUI.

Definition at line 2652 of file class.ilContainerGUI.php.

2652 : void
2653 {
2654 $this->ctrl->setReturn($this, "");
2655 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )
protected

Reimplemented from ilObjectGUI.

Reimplemented in ilObjTalkTemplateAdministrationGUI, ilObjEmployeeTalkSeriesGUI, ilObjOrgUnitGUI, and ilObjRootFolderGUI.

Definition at line 333 of file class.ilContainerGUI.php.

333 : void
334 {
335 if (ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
336 $this->tpl->setTitle($this->object->getTitle(), true);
337 } else {
338 parent::setTitleAndDescription();
339 }
340 }

References ilContainer\_lookupContainerSetting(), and ILIAS\Repository\object().

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), and ilObjGroupGUI\executeCommand().

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

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( )

Reimplemented in ilObjOrgUnitGUI.

Definition at line 491 of file class.ilContainerGUI.php.

491 : void
492 {
493 global $DIC;
494
495 $ilAccess = $this->access;
497
498 $main_tpl = $DIC->ui()->mainTemplate();
499
500 $lng->loadLanguageModule('cntr');
501
502 if ($this->clipboard->hasEntries() && !$this->edit_order) {
503 // #11545
504 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
505
506 $toolbar = new ilToolbarGUI();
507 $toolbar->setId("admclip");
508 $this->ctrl->setParameter($this, "type", "");
509 $this->ctrl->setParameter($this, "item_ref_id", "");
510
512 $this->ui->factory()->button()->standard(
513 $this->lng->txt('paste_clipboard_items'),
514 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class], 'paste')
515 )
516 );
517
519 $this->ui->factory()->button()->standard(
520 $this->lng->txt('clear_clipboard'),
521 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class], 'clear')
522 )
523 );
524
525 $main_tpl->addAdminPanelToolbar($toolbar, true, false);
526 } elseif ($this->isActiveAdministrationPanel()) {
527 // #11545
528 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
529 $toolbar = new ilToolbarGUI();
530 $toolbar->setId("adm");
531 $this->ctrl->setParameter($this, "type", "");
532 $this->ctrl->setParameter($this, "item_ref_id", "");
533
534 if ($this->gotItems()) {
536 ilUtil::getImagePath("nav/arrow_upright.svg"),
537 $lng->txt("actions")
538 );
540 $this->lng->txt('delete_selected_items'),
541 'delete'
542 );
544 $this->lng->txt('move_selected_items'),
545 'cut'
546 );
548 $this->lng->txt('copy_selected_items'),
549 'copy'
550 );
552 $this->lng->txt('link_selected_items'),
553 'link'
554 );
555
557 // add download button if multi download enabled
558 $folder_set = new ilSetting('fold');
559 if ((bool) $folder_set->get('enable_multi_download') === true) {
562 $this->lng->txt('download_selected_items'),
563 'download'
564 );
565 }
566 }
567 $main_tpl->addAdminPanelToolbar(
568 $toolbar,
569 $this->gotItems() && !$this->clipboard->hasEntries(),
570 $this->gotItems() && !$this->clipboard->hasEntries()
571 );
572
573 // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
574 if ($this->gotItems()) {
575 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
576 }
577 } elseif ($this->edit_order) {
578 if ($this->getItemPresentation()->hasItems() && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
579 if ($this->isActiveOrdering()) {
580 // #11843
581 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
582
583 $toolbar = new ilToolbarGUI();
584 $this->ctrl->setParameter($this, "type", "");
585 $this->ctrl->setParameter($this, "item_ref_id", "");
586
588 $this->lng->txt('sorting_save'),
589 'saveSorting'
590 );
591
592 $main_tpl->addAdminPanelToolbar($toolbar, true, false);
593 }
594 }
595 }
596 // bugfix mantis 24559
597 // undoing an erroneous change inside mantis 23516 by adding "Download Multiple Objects"-functionality for non-admins
598 // as they don't have the possibility to use the multi-download-capability of the manage-tab
599 elseif ($this->isMultiDownloadEnabled()) {
600 // bugfix mantis 0021272
602 $num_files = $this->tree->getChildsByType($ref_id, "file");
603 $num_folders = $this->tree->getChildsByType($ref_id, "fold");
604 if (count($num_files) > 0 || count($num_folders) > 0) {
605 // #11843
606 $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
607
608 $toolbar = new ilToolbarGUI();
609 $this->ctrl->setParameter($this, "type", "");
610 $this->ctrl->setParameter($this, "item_ref_id", "");
611
613 $this->lng->txt('download_selected_items'),
614 'download'
615 );
616
617 $GLOBALS['tpl']->addAdminPanelToolbar(
618 $toolbar,
619 $this->gotItems(),
620 $this->gotItems()
621 );
622 } else {
623 $this->tpl->setOnScreenMessage('info', $this->lng->txt('msg_no_downloadable_objects'), true);
624 }
625 }
626 }
addAvailabilityPeriodButtonToToolbar(ilToolbarGUI $toolbar)
ILIAS Setting Class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setId(string $a_val)
addComponent(\ILIAS\UI\Component\Component $a_comp)
setLeadingImage(string $a_img, string $a_alt)
addFormButton(string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)

References $DIC, $GLOBALS, $lng, $ref_id, $requested_ref_id, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ showContainerFilter()

ilContainerGUI::showContainerFilter ( )
protected

Definition at line 2684 of file class.ilContainerGUI.php.

2684 : void
2685 {
2686 global $DIC;
2687 if (!is_null($this->ui_filter)) {
2688 $renderer = $DIC->ui()->renderer();
2689
2690 $main_tpl = $this->tpl;
2691 $main_tpl->setFilter($renderer->render($this->ui_filter));
2692 if ($this->container_user_filter->isEmpty() && !ilContainer::_lookupContainerSetting(
2693 $this->object->getId(),
2694 "filter_show_empty",
2695 '0'
2696 )) {
2697 $this->tpl->setOnScreenMessage('info', $this->lng->txt("cont_filter_empty"));
2698 }
2699 }
2700 }
$renderer
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.

References $DIC, $renderer, ilContainer\_lookupContainerSetting(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showContainerPageTabs()

ilContainerGUI::showContainerPageTabs ( )
protected

Definition at line 2085 of file class.ilContainerGUI.php.

2085 : void
2086 {
2090 $page_gui = new ilContainerPageGUI($this->object->getId());
2091 $tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($page_gui, "edit"));
2092 }
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets

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

Referenced by ilObjCategoryGUI\executeCommand(), ilObjCourseGUI\executeCommand(), ilObjFolderGUI\executeCommand(), ilObjGroupGUI\executeCommand(), and ilObjRootFolderGUI\executeCommand().

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

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

Definition at line 657 of file class.ilContainerGUI.php.

657 : void
658 {
661
662 $cnt = [];
663
665 "tpl.container_link_help.html",
666 true,
667 true,
668 "components/ILIAS/Container"
669 );
670
671 $type_ordering = [
672 "cat",
673 "fold",
674 "crs",
675 "grp",
676 "chat",
677 "frm",
678 "lres",
679 "glo",
680 "webr",
681 "file",
682 "exc",
683 "tst",
684 "svy",
685 "mep",
686 "qpl",
687 "spl"
688 ];
689
690 $childs = $tree->getChilds($this->requested_ref_id);
691 foreach ($childs as $child) {
692 if (in_array($child["type"], ["lm", "sahs", "htlm"])) {
693 $cnt["lres"]++;
694 } else {
695 $cnt[$child["type"]]++;
696 }
697 }
698
699 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
700 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
701 foreach ($type_ordering as $type) {
702 $tpl->setCurrentBlock("row");
703 if ($type !== "lres") {
705 "TYPE",
706 $lng->txt("objs_" . $type) .
707 " (" . ((int) $cnt[$type]) . ")"
708 );
709 } else {
711 "TYPE",
712 $lng->txt("obj_lrss") .
713 " (" . ((int) $cnt["lres"]) . ")"
714 );
715 }
716 $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
718 }
720 exit;
721 }
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)

References $lng, exit, and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

ilContainerGUI::showPasswordInstructionObject ( bool  $a_init = true)
protected

Definition at line 2094 of file class.ilContainerGUI.php.

2096 : void {
2097 global $DIC;
2098 $tpl = $this->tpl;
2099 $ilToolbar = $this->toolbar;
2100
2101 if ($a_init) {
2102 $this->tpl->setOnScreenMessage('info', $this->lng->txt('webdav_pwd_instruction'));
2104 }
2105
2106 $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
2107 $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
2108
2109 $this->gui->button(
2110 $this->lng->txt("mount_webfolder"),
2111 "#"
2112 )->onClick("triggerWebDAVModal('$href'); return false;")->toToolbar();
2113
2114 $tpl->setContent($this->form->getHTML());
2115 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

Definition at line 1542 of file class.ilContainerGUI.php.

1542 : void
1543 {
1544 $ilTabs = $this->tabs;
1546
1547 $ilTabs->setTabActive('view_content');
1548
1549 if (!in_array($this->clipboard->getCmd(), ['link', 'copy', 'cut'])) {
1550 $message = __METHOD__ . ": Unknown action.";
1551 $ilErr->raiseError($message, $ilErr->WARNING);
1552 }
1553 $cmd = $this->clipboard->getCmd();
1554
1555 //
1556 $exp = $this->getTreeSelectorGUI($cmd);
1557 if ($exp->handleCommand()) {
1558 return;
1559 }
1560 $output = $exp->getHTML();
1561
1562 $txt_var = ($cmd === "copy")
1563 ? "copy"
1564 : "paste";
1565
1566 // toolbars
1567 $t = new ilToolbarGUI();
1568 $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
1569
1570 $this->gui->button(
1571 $this->lng->txt($txt_var),
1572 "performPasteIntoMultipleObjects"
1573 )->submit()->toToolbar(true, $t);
1574
1575 $t->addSeparator();
1576 $this->lng->loadLanguageModule('obj');
1577 $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
1578
1579 $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
1580 $t->setCloseFormTag(false);
1581 $t->setLeadingImage(ilUtil::getImagePath("nav/arrow_upright.svg"), " ");
1582 $output = $t->getHTML() . $output;
1583 $t->setLeadingImage(ilUtil::getImagePath("nav/arrow_downright.svg"), " ");
1584 $t->setCloseFormTag(true);
1585 $t->setOpenFormTag(false);
1586 $output .= "<br />" . $t->getHTML();
1587
1588 $this->tpl->setContent($output);
1589 }
getTreeSelectorGUI(string $cmd)

References $ilErr, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( )

Definition at line 633 of file class.ilContainerGUI.php.

633 : void
634 {
635 global $DIC;
636
637 $tpl = $DIC->ui()->mainTemplate();
638
640 $this->object->getType(),
641 $this->object->getRefId(),
642 "",
643 "_top"
644 );
645 }
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.

References $DIC, and ILIAS\Repository\object().

Referenced by ilObjCourseGUI\executeCommand(), ilObjGroupGUI\executeCommand(), and ilObjOrgUnitGUI\view().

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

◆ showPossibleSubObjects()

ilContainerGUI::showPossibleSubObjects ( )
protected

show possible sub objects (pull down menu)

Reimplemented from ilObjectGUI.

Reimplemented in ilObjRecoveryFolderGUI, ilObjCourseGUI, ilObjTalkTemplateAdministrationGUI, ilObjFolderGUI, ilObjLearningSequenceGUI, and ilObjOrgUnitGUI.

Definition at line 342 of file class.ilContainerGUI.php.

342 : void
343 {
344 if ($this->isActiveOrdering()) {
345 return;
346 }
349 );
350 $gui->render();
351 }
Render add new item selector.
ILIAS Container InternalGUIService $gui
buildAddNewItemElements(array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)

◆ supportsPageEditor()

ilContainerGUI::supportsPageEditor ( )
protected

Reimplemented in ilObjTalkTemplateAdministrationGUI, and ilObjStudyProgrammeGUI.

Definition at line 469 of file class.ilContainerGUI.php.

469 : bool
470 {
471 return true;
472 }

◆ trashApplyFilterObject()

ilContainerGUI::trashApplyFilterObject ( )

Definition at line 2550 of file class.ilContainerGUI.php.

2550 : void
2551 {
2552 $this->trashHandleFilter(true, false);
2553 }
trashHandleFilter(bool $action_apply, bool $action_reset)

◆ trashHandleFilter()

ilContainerGUI::trashHandleFilter ( bool  $action_apply,
bool  $action_reset 
)
protected

Definition at line 2560 of file class.ilContainerGUI.php.

2560 : void
2561 {
2562 $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2563 $trash_table->init();
2564 $trash_table->resetOffset();
2565 if ($action_reset) {
2566 $trash_table->resetFilter();
2567 }
2568 if ($action_apply) {
2569 $trash_table->writeFilterToSession();
2570 }
2571 $this->trashObject();
2572 }
trashObject()
Show trash content of object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

Definition at line 2530 of file class.ilContainerGUI.php.

2530 : void
2531 {
2532 $this->checkPermission("write");
2533 $tpl = $this->tpl;
2534
2535 $this->tabs_gui->activateTab('trash');
2536
2537 $this->lng->loadLanguageModule('cont');
2538 $tpl->setOnScreenMessage('info', $this->lng->txt('cont_trash_general_usage'));
2539
2540 $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2541 $trash_table->init();
2542 $trash_table->parse();
2543
2544 $trash_table->setFilterCommand('trashApplyFilter');
2545 $trash_table->setResetCommand('trashResetFilter');
2546
2547 $tpl->setContent($trash_table->getHTML());
2548 }

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

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ trashResetFilterObject()

ilContainerGUI::trashResetFilterObject ( )

Definition at line 2555 of file class.ilContainerGUI.php.

2555 : void
2556 {
2557 $this->trashHandleFilter(false, true);
2558 }

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

Definition at line 2593 of file class.ilContainerGUI.php.

2593 : void
2594 {
2595 $ru = new ilRepositoryTrashGUI($this);
2596 $ru->restoreObjects(
2597 $this->requested_ref_id,
2598 $this->std_request->getTrashIds()
2599 );
2600 $this->ctrl->redirect($this, "trash");
2601 }

References ILIAS\Repository\ctrl().

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

Field Documentation

◆ $adminCommands

bool ilContainerGUI::$adminCommands = false
protected

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

◆ $app_event_handler

ilAppEventHandler ilContainerGUI::$app_event_handler
protected

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

◆ $bl_cnt

int ilContainerGUI::$bl_cnt = 1

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

◆ $clipboard

ClipboardManager ilContainerGUI::$clipboard
protected

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

◆ $component_factory

ilComponentFactory ilContainerGUI::$component_factory
protected

Definition at line 64 of file class.ilContainerGUI.php.

◆ $container_filter_service

ilContainerFilterService ilContainerGUI::$container_filter_service
protected

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

◆ $container_user_filter

ilContainerUserFilter ilContainerGUI::$container_user_filter = null
protected

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

◆ $content_style_domain

ILIAS Style Content DomainService ilContainerGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilContainerGUI::$content_style_gui
protected

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

◆ $current_position

int ilContainerGUI::$current_position = 0
protected

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

◆ $domain

ILIAS Container InternalDomainService ilContainerGUI::$domain
protected

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

◆ $edit_order

bool ilContainerGUI::$edit_order = false
protected

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

◆ $error

◆ $form

◆ $global_screen

Services ilContainerGUI::$global_screen
protected

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

◆ $gui

◆ $item_presentation

ILIAS Container Content ItemPresentationManager ilContainerGUI::$item_presentation = null
protected

Definition at line 40 of file class.ilContainerGUI.php.

◆ $log

ilLogger ilContainerGUI::$log
protected

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

◆ $mode_manager

ModeManager ilContainerGUI::$mode_manager = null
protected

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

Referenced by getModeManager().

◆ $multi_download_enabled

bool ilContainerGUI::$multi_download_enabled = false

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

◆ $obj_data_cache

ilObjectDataCache ilContainerGUI::$obj_data_cache
protected

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

◆ $obj_definition

ilObjectDefinition ilContainerGUI::$obj_definition
protected

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

◆ $rbacadmin

ilRbacAdmin ilContainerGUI::$rbacadmin
protected

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

◆ $rbacreview

ilRbacReview ilContainerGUI::$rbacreview
protected

Definition at line 39 of file class.ilContainerGUI.php.

◆ $rbacsystem

ilRbacSystem ilContainerGUI::$rbacsystem
protected

Definition at line 38 of file class.ilContainerGUI.php.

Referenced by ilObjFolderGUI\getTabs(), and ilObjRootFolderGUI\getTabs().

◆ $requested_redirectSource

string ilContainerGUI::$requested_redirectSource = ""
protected

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

◆ $std_request

StandardGUIRequest ilContainerGUI::$std_request
protected

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

◆ $tabs

◆ $ui

UIServices ilContainerGUI::$ui
protected

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

◆ $ui_filter

Standard ilContainerGUI::$ui_filter = null
protected

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


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