ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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 2043 of file class.ilContainerGUI.php.

2046 : string {
2047 global $DIC;
2048
2049 $tree = $DIC->repositoryTree();
2050 $path = "";
2051
2052 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2053 $counter = 0;
2054 foreach ($path_arr as $data) {
2055 if ($counter++) {
2056 $path .= " > ";
2057 }
2058 $path .= $data['title'];
2059 }
2060
2061 return $path;
2062 }
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 1911 of file class.ilContainerGUI.php.

1911 : bool
1912 {
1913 return true;
1914 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

1903 : bool
1904 {
1905 return true;
1906 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

1584 : void
1585 {
1586 $ilCtrl = $this->ctrl;
1587
1588 $this->clipboard->clear();
1589 $ilCtrl->returnToParent($this);
1590 }
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 1228 of file class.ilContainerGUI.php.

1228 : void
1229 {
1230 $this->clipboard->clear();
1231
1232 //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1233
1234 // only redirect if clipboard was cleared
1235 if ($this->ctrl->getCmd() === "clear") {
1236 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_clear_clipboard"), true);
1237 // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1238 $this->ctrl->redirect($this, 'render');
1239 }
1240 }

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

+ Here is the call graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

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

1810 : void
1811 {
1813 $ilLog = $this->log;
1814 $ilTabs = $this->tabs;
1815 $tpl = $this->tpl;
1816 $ilToolbar = $this->toolbar;
1817 $ilCtrl = $this->ctrl;
1818 $lng = $this->lng;
1819
1820 $ilTabs->activateTab("clipboard");
1821
1822 // function should not be called if clipboard is empty
1823 if (!$this->clipboard->hasEntries()) {
1824 $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1825 $ilLog->write($message, $ilLog->FATAL);
1826 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->WARNING);
1827 }
1828
1829 $data = [];
1830 foreach ($this->clipboard->getRefIds() as $ref_id) {
1831 if (!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
1832 continue;
1833 }
1834
1835 $data[] = [
1836 "type" => $tmp_obj->getType(),
1837 "type_txt" => $this->lng->txt("obj_" . $tmp_obj->getType()),
1838 "title" => $tmp_obj->getTitle(),
1839 "cmd" => ($this->clipboard->getCmd() === "cut") ? $this->lng->txt("move") : $this->lng->txt(
1840 $this->clipboard->getCmd()
1841 ),
1842 "ref_id" => $ref_id,
1843 "obj_id" => $tmp_obj->getId()
1844 ];
1845
1846 unset($tmp_obj);
1847 }
1848
1849 $tab = new ilObjClipboardTableGUI($this, "clipboard");
1850 $tab->setData($data);
1851 $tpl->setContent($tab->getHTML());
1852
1853 if (count($data) > 0) {
1854 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1855 $ilToolbar->addFormButton(
1856 $lng->txt("insert_object_here"),
1857 "paste"
1858 );
1859 $ilToolbar->addFormButton(
1860 $lng->txt("clear_clipboard"),
1861 "clear"
1862 );
1863 }
1864 }
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 1921 of file class.ilContainerGUI.php.

1921 : void
1922 {
1923 $ilCtrl = $this->ctrl;
1924
1925 $ilAccess = $this->access;
1928
1929 $new_type = $this->std_request->getNewType();
1931 $clone_source = $this->std_request->getCloneSource();
1932
1933 if (!$rbacsystem->checkAccess('create', $ref_id, $new_type)) {
1934 $ilErr->raiseError($this->lng->txt('permission_denied'));
1935 }
1936 if (!$clone_source) {
1937 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
1938 $this->createObject();
1939 return;
1940 }
1941 if (!$ilAccess->checkAccess('write', '', $clone_source, $new_type)) {
1942 $ilErr->raiseError($this->lng->txt('permission_denied'));
1943 }
1944
1945 $options = $this->std_request->getCopyOptions();
1946 $orig = ilObjectFactory::getInstanceByRefId($clone_source);
1947 $result = $orig->cloneAllObject(
1948 $_COOKIE[session_name()],
1949 $_COOKIE['ilClientId'],
1950 $new_type,
1951 $ref_id,
1952 $clone_source,
1953 $options
1954 );
1955
1956 if (ilCopyWizardOptions::_isFinished($result['copy_id'])) {
1957 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_duplicated"), true);
1958 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
1959 } else {
1960 $this->tpl->setOnScreenMessage('info', $this->lng->txt("object_copy_in_progress"), true);
1961 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
1962 }
1963 $ilCtrl->redirectByClass("ilrepositorygui", "");
1964 }
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 1982 of file class.ilContainerGUI.php.

1987 : int {
1989
1990 // clone the source node
1991 $srcObj = ilObjectFactory::getInstanceByRefId($srcRef);
1992 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
1993
1994 // We must immediately apply a new name to the object, to
1995 // prevent confusion of WebDAV clients about having two objects with identical
1996 // name in the repository.
1997 if (!is_null($newName)) {
1998 $newObj = ilObjectFactory::getInstanceByRefId($newRef);
1999 $newObj->setTitle($newName);
2000 $newObj->update();
2001 unset($newObj);
2002 }
2003 unset($srcObj);
2004 $mapping[$newRef] = $srcRef;
2005
2006 // clone all children of the source node
2007 $children = $tree->getChilds($srcRef);
2008 foreach ($tree->getChilds($srcRef) as $child) {
2009 // Don't clone role folders, because it does not make sense to clone local roles
2010 // FIXME - Maybe it does make sense (?)
2011 if ($child["type"] !== 'rolf') {
2012 $this->cloneNodes($child["ref_id"], $newRef, $mapping);
2013 } elseif (count($rolf = $tree->getChildsByType($newRef, "rolf"))) {
2014 $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
2015 }
2016 }
2017 return $newRef;
2018 }
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 2720 of file class.ilContainerGUI.php.

2720 : void
2721 {
2723
2724 $ctrl->redirectByClass(["ilContainerSkillGUI", "ilContSkillPresentationGUI"]);
2725 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

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

2589 : void
2590 {
2591 $lng = $this->lng;
2592 $this->checkPermission("write");
2593 if (count($this->std_request->getTrashIds()) == 0) {
2594 $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
2595 $this->ctrl->redirect($this, "trash");
2596 }
2597
2598 $ru = new ilRepositoryTrashGUI($this);
2599 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2600 }
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 $download_job = new ilDownloadContainerFilesBackgroundTask(
1146 $GLOBALS['DIC']->user()->getId(),
1147 $ids,
1148 $initiated_by_folder_action
1149 );
1150
1151 $download_job->setBucketTitle($this->getBucketTitle());
1152 if ($download_job->run()) {
1153 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_bt_download_started'), true);
1154 }
1155 $GLOBALS['DIC']->ctrl()->redirect($this);
1156 }
const ANONYMOUS_USER_ID
Definition: constants.php:27
$GLOBALS["DIC"]
Definition: wac.php:54

References $GLOBALS, $ilErr, $requested_ref_id, 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 2065 of file class.ilContainerGUI.php.

2065 : void
2066 {
2067 $this->content_style_gui
2068 ->redirectToObjectSettings();
2069 }

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 2688 of file class.ilContainerGUI.php.

2688 : void
2689 {
2690 if ($this->checkPermissionBool("visible,read")) {
2691 $this->tabs_gui->addTab(
2692 'view',
2693 $this->lng->txt('view'),
2694 $this->ctrl->getLinkTarget($this, 'view')
2695 );
2696 }
2697
2698 // Always show container trash
2699 $this->tabs_gui->addTab(
2700 'trash',
2701 $this->lng->txt('trash'),
2702 $this->ctrl->getLinkTarget($this, 'trash')
2703 );
2704
2705 if ($this->checkPermissionBool("edit_permission")) {
2706 $this->tabs_gui->addTab(
2707 'perm_settings',
2708 $this->lng->txt('perm_settings'),
2709 $this->ctrl->getLinkTargetByClass(
2710 [
2711 get_class($this),
2712 'ilpermissiongui'
2713 ],
2714 'perm'
2715 )
2716 );
2717 }
2718 }
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 1158 of file class.ilContainerGUI.php.

1158 : string
1159 {
1160 return ilFileUtils::getASCIIFilename($this->object->getTitle());
1161 }
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 2602 of file class.ilContainerGUI.php.

2603 {
2604 $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
2605 // TODO: The study programme 'prg' is not included here, as the
2606 // ilRepositorySelectorExplorerGUI only handles static rules for
2607 // parent-child-relations and not the dynamic relationsships
2608 // required for the SP (see #16909).
2609 $exp->setTypeWhiteList(["root", "cat", "grp", "crs", "fold"]);
2610
2611 // Not all types are allowed in the LearningSequence
2612 // Extend whitelist, if all selected types are possible subojects of LSO
2613 if (in_array($this->clipboard->getCmd(), ["link", "cut"])) {
2614 $lso_types = array_keys($this->obj_definition->getSubObjects('lso'));
2615 $refs = $this->clipboard->getRefIds();
2616 $allow_lso = true;
2617 foreach ($refs as $item_ref_id) {
2618 $type = ilObject::_lookupType($item_ref_id, true);
2619 if (!in_array($type, $lso_types)) {
2620 $allow_lso = false;
2621 }
2622 }
2623 if ($allow_lso) {
2624 $whitelist = $exp->getTypeWhiteList();
2625 $whitelist[] = 'lso';
2626 $exp->setTypeWhiteList($whitelist);
2627 }
2628 }
2629
2630 if ($cmd === "link") {
2631 $exp->setSelectMode("nodes", true);
2632 } else {
2633 $exp->setSelectMode("nodes[]", false);
2634 }
2635 return $exp;
2636 }
static _lookupType(int $id, bool $reference=false)
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 1600 of file class.ilContainerGUI.php.

1600 : void
1601 {
1602 $this->showPasteTreeObject();
1603 }

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

1526 : void
1527 {
1528 $this->showPasteTreeObject();
1529 }

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

1605 : void
1606 {
1607 $this->showPasteTreeObject();
1608 }

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

Reimplemented from ilObjectGUI.

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

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

2202 {
2203 $lng = $this->lng;
2204 $lng->loadLanguageModule($this->object->getType());
2205
2206 $form = new ilPropertyFormGUI();
2207 $form->setFormAction($this->ctrl->getFormAction($this, "update"));
2208 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
2209
2210 $this->initFormTitleDescription($form);
2211
2212 $this->initEditCustomForm($form);
2213
2214 $form->addCommandButton("update", $this->lng->txt("save"));
2215
2216 return $form;
2217 }
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 2643 of file class.ilContainerGUI.php.

2643 : void
2644 {
2645 global $DIC;
2646
2647 if (!$this->object || !ilContainer::_lookupContainerSetting($this->object->getId(), "filter", '0')) {
2648 return;
2649 }
2650
2651 if ($this->isActiveOrdering() || $this->ctrl->getCmd() === "editOrder") {
2652 return;
2653 }
2654
2655 $filter_service = $this->container_filter_service;
2656 $request = $DIC->http()->request();
2657
2658 $filter = $filter_service->util()->getFilterForRefId(
2659 $this->ref_id,
2660 $DIC->ctrl()->getLinkTarget($this, "render", "", true),
2661 $this->isActiveAdministrationPanel()
2662 );
2663
2664 $filter_data = $DIC->uiService()->filter()->getData($filter);
2665
2666 $this->container_user_filter = $filter_service->userFilter($filter_data);
2667 $this->ui_filter = $filter;
2668 }
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 2106 of file class.ilContainerGUI.php.

2107 {
2108 $this->form = new ilPropertyFormGUI();
2109 $this->form->setFormAction($this->ctrl->getFormAction($this));
2110
2111 // new password
2112 $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
2113 $ipass->setRequired(true);
2114
2115 $this->form->addItem($ipass);
2116 $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
2117 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
2118
2119 $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
2120 $this->form->setFormAction($this->ctrl->getFormAction($this));
2121
2122 return $this->form;
2123 }
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 2330 of file class.ilContainerGUI.php.

2331 {
2332 $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
2333
2334 $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
2335 $item_list->setInfo($this->lng->txt('cont_item_list_info'));
2336 $lpres->addOption($item_list);
2337
2338 $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
2339 $tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
2340 $lpres->addOption($tile_view);
2341
2342 // tile size
2343
2344 $si = new ilRadioGroupInputGUI($this->lng->txt("cont_tile_size"), "tile_size");
2345 foreach ($this->object->getTileSizes() as $key => $txt) {
2346 $op = new ilRadioOption($txt, $key);
2347 $si->addOption($op);
2348 }
2349 $tile_view->addSubItem($si);
2350 $si->setValue(
2351 (string) ((int) ilContainer::_lookupContainerSetting($this->object->getId(), "tile_size"))
2352 );
2353
2354 $lpres->setValue(
2355 ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
2356 );
2357
2358 $form->addItem($lpres);
2359
2360 return $form;
2361 }
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 2416 of file class.ilContainerGUI.php.

2421 : ilRadioOption {
2422 $position = new ilRadioGroupInputGUI(
2423 $this->lng->txt('sorting_new_items_position'),
2424 $a_prefix . '_new_items_position'
2425 );
2426 $position->setValue((string) $settings->getSortNewItemsPosition());
2427 $position->setRequired(true);
2428
2429 //new items insert on top
2430 $new_top = new ilRadioOption(
2431 $this->lng->txt('sorting_new_items_at_top'),
2433 );
2434
2435 $position->addOption($new_top);
2436
2437 //new items insert at bottom
2438 $new_bottom = new ilRadioOption(
2439 $this->lng->txt('sorting_new_items_at_bottom'),
2441 );
2442
2443 $position->addOption($new_bottom);
2444
2445 $element->addSubItem($position);
2446
2447 $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
2448 $order->setValue((string) $settings->getSortNewItemsOrder());
2449 $order->setRequired(true);
2450
2451 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2452 //new items sort in alphabetical order
2453 $new_title = new ilRadioOption(
2454 $this->lng->txt('sorting_title_header'),
2456 );
2457
2458 $order->addOption($new_title);
2459 }
2460
2461 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2462 //new items sort by creation date
2463 $new_creation = new ilRadioOption(
2464 $this->lng->txt('sorting_creation_header'),
2466 );
2467
2468 $order->addOption($new_creation);
2469 }
2470
2471 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2472 //new items by activation
2473 $new_activation = new ilRadioOption(
2474 $this->lng->txt('crs_sort_activation'),
2476 );
2477
2478 $order->addOption($new_activation);
2479 }
2480
2481 $element->addSubItem($order);
2482
2483 $this->initSortingDirectionForm($settings, $element, 'manual');
2484
2485 return $element;
2486 }
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 2379 of file class.ilContainerGUI.php.

2383 : ilRadioOption {
2384 if ($a_prefix === 'manual') {
2385 $txt = $this->lng->txt('sorting_new_items_direction');
2386 } else {
2387 $txt = $this->lng->txt('sorting_direction');
2388 }
2389
2390 $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
2391 $direction->setValue((string) $sorting_settings->getSortDirection());
2392 $direction->setRequired(true);
2393
2394 // asc
2395 $asc = new ilRadioOption(
2396 $this->lng->txt('sorting_asc'),
2398 );
2399 $direction->addOption($asc);
2400
2401 // desc
2402 $desc = new ilRadioOption(
2403 $this->lng->txt('sorting_desc'),
2405 );
2406 $direction->addOption($desc);
2407
2408 $element->addSubItem($direction);
2409
2410 return $element;
2411 }
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 2260 of file class.ilContainerGUI.php.

2264 $settings = new ilContainerSortingSettings($this->object->getId());
2265 $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
2266
2267 if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
2268 $sort_inherit = new ilRadioOption();
2269 $sort_inherit->setTitle(
2270 $this->lng->txt('sort_inherit_prefix') .
2273 $this->object->getId()
2274 )
2275 ) . ') '
2276 );
2277 $sort_inherit->setValue((string) ilContainer::SORT_INHERIT);
2278 $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
2279 $sort->addOption($sort_inherit);
2280 }
2281 if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2282 $sort_title = new ilRadioOption(
2283 $this->lng->txt('sorting_title_header'),
2285 );
2286 $sort_title->setInfo($this->lng->txt('sorting_info_title'));
2287
2288 $this->initSortingDirectionForm($settings, $sort_title, 'title');
2289 $sort->addOption($sort_title);
2290 }
2291 if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2292 $sort_activation = new ilRadioOption(
2293 $this->lng->txt('sorting_creation_header'),
2295 );
2296 $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
2297 $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
2298 $sort->addOption($sort_activation);
2299 }
2300 if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2301 $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), (string) ilContainer::SORT_ACTIVATION);
2302 $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
2303 $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
2304 $sort->addOption($sort_activation);
2305 }
2306 if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
2307 $sort_manual = new ilRadioOption(
2308 $this->lng->txt('sorting_manual_header'),
2310 );
2311 $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
2312 $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
2313 $sort->addOption($sort_manual);
2314 }
2315
2316 // Handle moved containers and there possibly invalid values
2317 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2318 $sort->setValue((string) $settings->getSortMode());
2319 } else {
2320 $sort->setValue((string) ilContainer::SORT_TITLE);
2321 }
2322 $form->addItem($sort);
2323
2324 return $form;
2325 }
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 1866 of file class.ilContainerGUI.php.

1866 : bool
1867 {
1868 // #10081
1869 if ($this->object->getRefId() &&
1870 !$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
1871 return false;
1872 }
1873
1874 return $this->getModeManager()->isAdminMode();
1875 }

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 1592 of file class.ilContainerGUI.php.

1592 : void
1593 {
1594 $ilCtrl = $this->ctrl;
1595
1596 $this->tpl->setOnScreenMessage('success', $this->lng->txt("obj_inserted_clipboard"), true);
1597 $ilCtrl->returnToParent($this);
1598 }

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 1167 of file class.ilContainerGUI.php.

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

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 2022 of file class.ilContainerGUI.php.

2025 : void {
2026 /* not really implemented buildPath does not exist
2027 $lng = $this->lng;
2028
2029 if ($a_show_path) {
2030 $a_item_list_gui->addCustomProperty(
2031 $lng->txt('path'),
2032 ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2033 false,
2034 true
2035 );
2036 }
2037 */
2038 }

◆ 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 1614 of file class.ilContainerGUI.php.

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

1242 : void
1243 {
1247 $ilLog = $this->log;
1249 $ilObjDataCache = $this->obj_data_cache;
1250 $ilUser = $this->user;
1252 $lng = $this->lng;
1253 $ui = $this->ui;
1254
1255 $exists = [];
1256 $is_child = [];
1257 $not_allowed_subobject = [];
1258 $no_paste = [];
1259
1260 $command = $this->clipboard->getCmd();
1261 if (!in_array($command, ['cut', 'link', 'copy'])) {
1262 $message = __METHOD__ . ": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1263 $ilErr->raiseError($message, $ilErr->WARNING);
1264 }
1265
1266 $nodes = $this->std_request->getNodes();
1267
1268 if (count($nodes) === 0) {
1269 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_at_least_one_object'));
1270 switch ($command) {
1271 case 'link':
1272 case 'copy':
1273 case 'cut':
1274 $this->showPasteTreeObject();
1275 break;
1276 }
1277 return;
1278 }
1279
1280 // this loop does all checks
1281 $folder_objects_cache = [];
1282 foreach ($this->clipboard->getRefIds() as $ref_id) {
1284 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1285
1286 foreach ($nodes as $folder_ref_id) {
1287 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1288 $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
1289 }
1290
1291 // CHECK ACCESS
1292 if (!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType())) {
1293 $no_paste[] = sprintf(
1294 $this->lng->txt('msg_no_perm_paste_object_in_folder'),
1295 $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']',
1296 $folder_objects_cache[$folder_ref_id]->getTitle(
1297 ) . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']'
1298 );
1299 }
1300
1301 // CHECK IF REFERENCE ALREADY EXISTS
1302 if ($folder_ref_id == $current_parent_id) {
1303 $exists[] = sprintf(
1304 $this->lng->txt('msg_obj_exists_in_folder'),
1305 $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']',
1306 $folder_objects_cache[$folder_ref_id]->getTitle(
1307 ) . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']'
1308 );
1309 }
1310
1311 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1312 if ($ref_id == $folder_ref_id || $tree->isGrandChild($ref_id, $folder_ref_id)) {
1313 $is_child[] = sprintf(
1314 $this->lng->txt('msg_paste_object_not_in_itself'),
1315 $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']'
1316 );
1317 }
1318
1319 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1320 if (!array_key_exists(
1321 $obj_data->getType(),
1322 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1323 )) {
1324 $not_allowed_subobject[] = sprintf(
1325 $this->lng->txt('msg_obj_may_not_contain_objects_of_type'),
1326 $folder_objects_cache[$folder_ref_id]->getTitle(
1327 ) . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']',
1328 $lng->txt('obj_' . $obj_data->getType())
1329 );
1330 }
1331 }
1332 }
1333
1335 // process checking results
1336 $error = "";
1337 if ($command !== "copy" && count($exists)) {
1338 $error .= implode('<br />', $exists);
1339 }
1340
1341 if (count($is_child)) {
1342 $error .= $error !== '' ? '<br />' : '';
1343 $error .= implode('<br />', $is_child);
1344 }
1345
1346 if (count($not_allowed_subobject)) {
1347 $error .= $error !== '' ? '<br />' : '';
1348 $error .= implode('<br />', $not_allowed_subobject);
1349 }
1350
1351 if (count($no_paste)) {
1352 $error .= $error !== '' ? '<br />' : '';
1353 $error .= implode('<br />', $no_paste);
1354 }
1355
1356 if ($error !== '') {
1357 $this->tpl->setOnScreenMessage('failure', $error);
1358 switch ($command) {
1359 case 'link':
1360 case 'copy':
1361 case 'cut':
1362 $this->showPasteTreeObject();
1363 break;
1364 }
1365 return;
1366 }
1367
1368 // log pasteObject call
1369 $ilLog->write(__METHOD__ . ", cmd: " . $command);
1370
1372 // everything ok: now paste the objects to new location
1373
1374 // to prevent multiple actions via back/reload button
1375 $ref_ids = $this->clipboard->getRefIds();
1376 $this->clipboard->clear();
1377
1378
1379 // process COPY command
1380 if ($command === 'copy') {
1381 foreach ($nodes as $folder_ref_id) {
1382 foreach ($ref_ids as $ref_id) {
1383 $revIdMapping = [];
1384
1385 $oldNode_data = $tree->getNodeData($ref_id);
1386 if ($oldNode_data['parent'] == $folder_ref_id) {
1387 $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'], null);
1388 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1389 } else {
1390 $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
1391 }
1392
1393 // BEGIN ChangeEvent: Record copy event.
1394 $old_parent_data = $tree->getParentNodeData($ref_id);
1395 $newNode_data = $tree->getNodeData($newRef);
1397 $oldNode_data['type'],
1398 $ref_id,
1399 $oldNode_data['obj_id'],
1400 $ilUser->getId()
1401 );
1403 $newNode_data['obj_id'],
1404 $ilUser->getId(),
1405 'add',
1406 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1407 );
1408 // END PATCH ChangeEvent: Record cut event.
1409 }
1410 }
1411
1412 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_cloned'), true);
1413 } // END COPY
1414
1415 // process CUT command
1416 if ($command === 'cut') {
1417 foreach ($nodes as $folder_ref_id) {
1418 foreach ($ref_ids as $ref_id) {
1419 // Store old parent
1420 $old_parent = $tree->getParentId($ref_id);
1421 $tree->moveTree($ref_id, $folder_ref_id);
1423
1425
1426 // BEGIN ChangeEvent: Record cut event.
1427 $node_data = $tree->getNodeData($ref_id);
1428 $old_parent_data = $tree->getNodeData($old_parent);
1430 $node_data['obj_id'],
1431 $ilUser->getId(),
1432 'remove',
1433 $old_parent_data['obj_id']
1434 );
1436 $node_data['obj_id'],
1437 $ilUser->getId(),
1438 'add',
1439 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1440 );
1441 // END PATCH ChangeEvent: Record cut event.
1442 }
1443
1444 // prevent multiple iterations for cut cmommand
1445 break;
1446 }
1447
1448 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_cut_copied'), true);
1449 } // END CUT
1450
1451 // process LINK command
1452 if ($command === 'link') {
1453 $subnodes = [];
1454 $linked_to_folders = [];
1455
1456 $rbac_log_active = ilRbacLog::isActive();
1457
1458 foreach ($nodes as $folder_ref_id) {
1459 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1460 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1461 );
1462
1463 foreach ($ref_ids as $ref_id) {
1464 // get node data
1465 $top_node = $tree->getNodeData($ref_id);
1466
1467 // get subnodes of top nodes
1468 $subnodes[$ref_id] = $tree->getSubTree($top_node);
1469 }
1470
1471 // now move all subtrees to new location
1472 foreach ($subnodes as $key => $subnode) {
1473 // first paste top_node....
1474 $obj_data = ilObjectFactory::getInstanceByRefId($key);
1475 $new_ref_id = $obj_data->createReference();
1476 $obj_data->putInTree($folder_ref_id);
1477 $obj_data->setPermissions($folder_ref_id);
1478
1479 // rbac log
1480 if ($rbac_log_active) {
1481 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
1482 $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
1483 ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
1484 }
1485
1486 // BEGIN ChangeEvent: Record link event.
1487 $node_data = $tree->getNodeData($new_ref_id);
1489 $node_data['obj_id'],
1490 $ilUser->getId(),
1491 'add',
1492 $ilObjDataCache->lookupObjId((int) $folder_ref_id)
1493 );
1494 // END PATCH ChangeEvent: Record link event.
1495 }
1496
1497 $ilLog->write(__METHOD__ . ', link finished');
1498 }
1499
1500 $links = [];
1501 if (count($linked_to_folders)) {
1502 foreach ($linked_to_folders as $ref_id => $title) {
1503 $links[] = $ui->factory()->link()->standard($title, ilLink::_getLink($ref_id));
1504 }
1505 }
1506
1507 $suffix = 'p';
1508 if (count($ref_ids) === 1) {
1509 $suffix = 's';
1510 }
1511
1512 $mbox = $ui->factory()->messageBox()->success(
1513 $this->lng->txt('mgs_objects_linked_to_the_following_folders_' . $suffix)
1514 )
1515 ->withLinks($links);
1516
1517 $this->tpl->setOnScreenMessage('success', $ui->renderer()->render($mbox), true);
1518 } // END LINK
1519
1520 // clear clipboard
1521 $this->clearObject();
1522
1523 $this->ctrl->returnToParent($this);
1524 }
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 2143 of file class.ilContainerGUI.php.

2143 : void
2144 {
2145 $tpl = $this->tpl;
2146
2147 $html = null;
2148
2149 $child_ref_id = $this->std_request->getChildRefId();
2150 $parent_ref_id = $this->std_request->getParentRefId();
2151
2152 $item_data = $this->object->getSubItems(false, false, $child_ref_id);
2153 $container_view = $this->getContentGUI();
2154
2155 // see #41377 (material not redrawn, when not a direct child)
2156 $sess_data = [];
2157 if (isset($this->object->items["sess"])) {
2158 $sess_data = $this->object->items["sess"]; // before #41377
2159 } elseif (ilObject::_lookupType($parent_ref_id, true) === "sess") {
2160 $sess_data[] = [
2161 "obj_id" => ilObject::_lookupObjectId($parent_ref_id)
2162 ]; // added with #41377
2163 }
2164
2165 // list item is session material (not part of "_all"-items - see below)
2166 $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
2167 if (in_array($child_ref_id, $event_items)) {
2168 foreach (($sess_data) as $id) {
2169 $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
2170 foreach ($items as $event_item) {
2171 if ($event_item["child"] == $child_ref_id) {
2172 // sessions
2173 if ($parent_ref_id > 0) {
2174 $event_item["parent"] = $parent_ref_id;
2175 }
2176 $html = $container_view->renderItem($event_item);
2177 }
2178 }
2179 }
2180 }
2181
2182 // "normal" list item
2183 if (!$html) {
2184 foreach (($this->object->items["_all"] ?? []) as $id) {
2185 if ($id["child"] == $child_ref_id) {
2186 $html = $container_view->renderItem($id);
2187 }
2188 }
2189 }
2190
2191 if ($html) {
2192 echo $html;
2193
2194 // we need to add onload code manually (rating, comments, etc.)
2196 }
2197
2198 exit;
2199 }
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 2560 of file class.ilContainerGUI.php.

2560 : void
2561 {
2562 $this->checkPermission("write");
2563 $ru = new ilRepositoryTrashGUI($this);
2564 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2565 $this->ctrl->redirect($this, "trash");
2566 }

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 2568 of file class.ilContainerGUI.php.

2568 : void
2569 {
2570 $this->tabs_gui->activateTab('trash');
2571
2572 $ru = new ilRepositoryTrashGUI($this);
2573 $ru->restoreToNewLocation();
2574 }

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

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

2363 : void
2364 {
2365 $val = ($form->getInput('list_presentation') === "tile")
2366 ? "tile"
2367 : "";
2368 ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
2370 $this->object->getId(),
2371 "tile_size",
2372 (string) ((int) $form->getInput('tile_size'))
2373 );
2374 }
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 2125 of file class.ilContainerGUI.php.

2125 : void
2126 {
2127 $ilUser = $this->user;
2128
2130 if ($form->checkInput()) {
2131 $ilUser->resetPassword($this->form->getInput('new_password'));
2132 $this->tpl->setOnScreenMessage('success', $this->lng->txt('webdav_pwd_instruction_success'), true);
2133 $this->showPasswordInstructionObject(false);
2134 return;
2135 }
2138 }
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 1966 of file class.ilContainerGUI.php.

1966 : void
1967 {
1968 $sorting = ilContainerSorting::_getInstance($this->object->getId());
1969
1970 // Allow comma
1971 $positions = $this->std_request->getPositions();
1972 $sorting->savePost($positions);
1973 $this->tpl->setOnScreenMessage('success', $this->lng->txt('cntr_saved_sorting'), true);
1974 $this->ctrl->redirect($this, "editOrder");
1975 }
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 2488 of file class.ilContainerGUI.php.

2488 : void
2489 {
2490 $settings = new ilContainerSortingSettings($this->object->getId());
2491 $settings->setSortMode((int) $form->getInput("sorting"));
2492
2493 switch ($form->getInput('sorting')) {
2495 $settings->setSortDirection((int) $form->getInput('title_sorting_direction'));
2496 break;
2498 $settings->setSortDirection((int) $form->getInput('activation_sorting_direction'));
2499 break;
2501 $settings->setSortDirection((int) $form->getInput('creation_sorting_direction'));
2502 break;
2504 $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
2505 $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
2506 $settings->setSortDirection((int) $form->getInput('manual_sorting_direction'));
2507 break;
2508 }
2509
2510 $settings->update();
2511 }

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 1877 of file class.ilContainerGUI.php.

1877 : void
1878 {
1879 $ilAccess = $this->access;
1880 parent::setColumnSettings($column_gui);
1881
1882 $column_gui->setItemPresentationManager(
1883 $this->item_presentation
1884 );
1885
1886 //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
1887 // && $this->allowBlocksConfigure())
1888 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1889 $column_gui->setBlockProperty("news", "settings", '1');
1890 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
1891 $column_gui->setBlockProperty("news", "default_visibility_option", '1');
1892 $column_gui->setBlockProperty("news", "hide_news_block_option", '1');
1893 }
1894
1895 if ($this->isActiveAdministrationPanel()) {
1896 $column_gui->setAdminCommands(true);
1897 }
1898 }
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 2638 of file class.ilContainerGUI.php.

2638 : void
2639 {
2640 $this->ctrl->setReturn($this, "");
2641 }

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 2670 of file class.ilContainerGUI.php.

2670 : void
2671 {
2672 global $DIC;
2673 if (!is_null($this->ui_filter)) {
2674 $renderer = $DIC->ui()->renderer();
2675
2676 $main_tpl = $this->tpl;
2677 $main_tpl->setFilter($renderer->render($this->ui_filter));
2678 if ($this->container_user_filter->isEmpty() && !ilContainer::_lookupContainerSetting(
2679 $this->object->getId(),
2680 "filter_show_empty",
2681 '0'
2682 )) {
2683 $this->tpl->setOnScreenMessage('info', $this->lng->txt("cont_filter_empty"));
2684 }
2685 }
2686 }
$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 2071 of file class.ilContainerGUI.php.

2071 : void
2072 {
2076 $page_gui = new ilContainerPageGUI($this->object->getId());
2077 $tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($page_gui, "edit"));
2078 }
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 2080 of file class.ilContainerGUI.php.

2082 : void {
2083 global $DIC;
2084 $tpl = $this->tpl;
2085 $ilToolbar = $this->toolbar;
2086
2087 if ($a_init) {
2088 $this->tpl->setOnScreenMessage('info', $this->lng->txt('webdav_pwd_instruction'));
2090 }
2091
2092 $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
2093 $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
2094
2095 $this->gui->button(
2096 $this->lng->txt("mount_webfolder"),
2097 "#"
2098 )->onClick("triggerWebDAVModal('$href'); return false;")->toToolbar();
2099
2100 $tpl->setContent($this->form->getHTML());
2101 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

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

1531 : void
1532 {
1533 $ilTabs = $this->tabs;
1535
1536 $ilTabs->setTabActive('view_content');
1537
1538 if (!in_array($this->clipboard->getCmd(), ['link', 'copy', 'cut'])) {
1539 $message = __METHOD__ . ": Unknown action.";
1540 $ilErr->raiseError($message, $ilErr->WARNING);
1541 }
1542 $cmd = $this->clipboard->getCmd();
1543
1544 //
1545 $exp = $this->getTreeSelectorGUI($cmd);
1546 if ($exp->handleCommand()) {
1547 return;
1548 }
1549 $output = $exp->getHTML();
1550
1551 $txt_var = ($cmd === "copy")
1552 ? "copy"
1553 : "paste";
1554
1555 // toolbars
1556 $t = new ilToolbarGUI();
1557 $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
1558
1559 $this->gui->button(
1560 $this->lng->txt($txt_var),
1561 "performPasteIntoMultipleObjects"
1562 )->submit()->toToolbar(true, $t);
1563
1564 $t->addSeparator();
1565 $this->lng->loadLanguageModule('obj');
1566 $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
1567
1568 $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
1569 $t->setCloseFormTag(false);
1570 $t->setLeadingImage(ilUtil::getImagePath("nav/arrow_upright.svg"), " ");
1571 $output = $t->getHTML() . $output;
1572 $t->setLeadingImage(ilUtil::getImagePath("nav/arrow_downright.svg"), " ");
1573 $t->setCloseFormTag(true);
1574 $t->setOpenFormTag(false);
1575 $output .= "<br />" . $t->getHTML();
1576
1577 $this->tpl->setContent($output);
1578 }
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 2536 of file class.ilContainerGUI.php.

2536 : void
2537 {
2538 $this->trashHandleFilter(true, false);
2539 }
trashHandleFilter(bool $action_apply, bool $action_reset)

◆ trashHandleFilter()

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

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

2546 : void
2547 {
2548 $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2549 $trash_table->init();
2550 $trash_table->resetOffset();
2551 if ($action_reset) {
2552 $trash_table->resetFilter();
2553 }
2554 if ($action_apply) {
2555 $trash_table->writeFilterToSession();
2556 }
2557 $this->trashObject();
2558 }
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 2516 of file class.ilContainerGUI.php.

2516 : void
2517 {
2518 $this->checkPermission("write");
2519 $tpl = $this->tpl;
2520
2521 $this->tabs_gui->activateTab('trash');
2522
2523 $this->lng->loadLanguageModule('cont');
2524 $tpl->setOnScreenMessage('info', $this->lng->txt('cont_trash_general_usage'));
2525
2526 $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2527 $trash_table->init();
2528 $trash_table->parse();
2529
2530 $trash_table->setFilterCommand('trashApplyFilter');
2531 $trash_table->setResetCommand('trashResetFilter');
2532
2533 $tpl->setContent($trash_table->getHTML());
2534 }

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 2541 of file class.ilContainerGUI.php.

2541 : void
2542 {
2543 $this->trashHandleFilter(false, true);
2544 }

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

2579 : void
2580 {
2581 $ru = new ilRepositoryTrashGUI($this);
2582 $ru->restoreObjects(
2583 $this->requested_ref_id,
2584 $this->std_request->getTrashIds()
2585 );
2586 $this->ctrl->redirect($this, "trash");
2587 }

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: