ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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...
 
 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 2044 of file class.ilContainerGUI.php.

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

723 : void {
724 $icon = ilUtil::getImagePath("standard/icon_" . $a_type . ".svg");
725 $title = $this->lng->txt("objs_" . $a_type);
726
727 if ($a_show_image) {
728 $a_tpl->setCurrentBlock("container_header_row_image");
729 $a_tpl->setVariable("HEADER_IMG", $icon);
730 $a_tpl->setVariable("HEADER_ALT", $title);
731 } else {
732 $a_tpl->setCurrentBlock("container_header_row");
733 }
734
735 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
736 $a_tpl->parseCurrentBlock();
737 //$a_tpl->touchBlock("container_row");
738 }
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 795 of file class.ilContainerGUI.php.

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

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

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

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

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs ( bool  $a_include_view = true)

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

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

848 : void {
849 $ilTabs = $this->tabs;
851 $ilCtrl = $this->ctrl;
852 $ilUser = $this->user;
853
854 if (!is_object($this->object)) {
855 return;
856 }
857
858 if ($a_include_view && $this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
859 if (!$this->isActiveAdministrationPanel()) {
860 $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass(static::class, "view"));
861 } else {
862 $ilTabs->addSubTab(
863 "view_content",
864 $lng->txt("view"),
865 $ilCtrl->getLinkTarget($this, "disableAdministrationPanel")
866 );
867 }
868 }
869
871 if ($item_presentation->canManageItems()) {
872 if ($this->isActiveAdministrationPanel()) {
873 $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
874 } else {
875 $ilTabs->addSubTab(
876 "manage",
877 $lng->txt("cntr_manage"),
878 $ilCtrl->getLinkTarget($this, "enableAdministrationPanel")
879 );
880 }
881 }
882 if ($item_presentation->canOrderItems()) {
883 $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
884 }
885 }
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 1912 of file class.ilContainerGUI.php.

1912 : bool
1913 {
1914 return true;
1915 }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

1904 : bool
1905 {
1906 return true;
1907 }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

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

648 : void
649 {
650 $this->ctrl->redirect($this, "");
651 }

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

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

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

+ Here is the call graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

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

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

References $data, $ilErr, $lng, $log, $message, $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 1922 of file class.ilContainerGUI.php.

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

References $_COOKIE, $ilErr, $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 1983 of file class.ilContainerGUI.php.

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

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

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

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

2590 : void
2591 {
2592 $lng = $this->lng;
2593 $this->checkPermission("write");
2594 if (count($this->std_request->getTrashIds()) == 0) {
2595 $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
2596 $this->ctrl->redirect($this, "trash");
2597 }
2598
2599 $ru = new ilRepositoryTrashGUI($this);
2600 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2601 }
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 1035 of file class.ilContainerGUI.php.

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

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

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

928 : void
929 {
930 $this->getModeManager()->setContentMode();
931 $this->ctrl->redirect($this, "render");
932 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

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

1116 : void
1117 {
1118 if (in_array($this->user->getId(), [ANONYMOUS_USER_ID, 0], true)) {
1119 return;
1120 }
1121
1123 // This variable determines whether the task has been initiated by a folder's action drop-down to prevent a folder
1124 // duplicate inside the zip.
1125 $initiated_by_folder_action = false;
1126
1127 $ids = $this->std_request->getSelectedIds();
1128
1129 if (count($ids) === 0) {
1130 $object = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
1131 $object_type = $object->getType();
1132 if ($object_type === "fold") {
1133 $ids = [$this->requested_ref_id];
1134 $initiated_by_folder_action = true;
1135 } else {
1136 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1137 $this->ctrl->redirect($this, "");
1138 }
1139 }
1140
1141 $download_job = new ilDownloadContainerFilesBackgroundTask(
1142 $GLOBALS['DIC']->user()->getId(),
1143 $ids,
1144 $initiated_by_folder_action
1145 );
1146
1147 $download_job->setBucketTitle($this->getBucketTitle());
1148 if ($download_job->run()) {
1149 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_bt_download_started'), true);
1150 }
1151 $GLOBALS['DIC']->ctrl()->redirect($this);
1152 }
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 934 of file class.ilContainerGUI.php.

934 : void
935 {
936 $ilTabs = $this->tabs;
937 $this->edit_order = true;
938 $this->getModeManager()->setOrderingMode();
939 $this->renderObject();
940
941 $ilTabs->activateSubTab("ordering");
942 }

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

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

643 : void
644 {
645 $this->ctrl->redirectByClass([static::class, "ilcontainerpagegui"], "edit");
646 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

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

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

Referenced by ilObjStudyProgrammeGUI\executeCommand().

+ Here is the caller graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

Reimplemented in ilObjGroupGUI.

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

922 : void
923 {
924 $this->getModeManager()->setAdminMode();
925 $this->ctrl->redirect($this, "render");
926 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

962 : void
963 {
964 $this->multi_download_enabled = true;
965 $this->renderObject();
966 }

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

210 : string
211 {
213 $ilTabs = $this->tabs;
214 $ilCtrl = $this->ctrl;
215 $cmd = $ilCtrl->getCmd();
216 if (in_array($cmd, ["displayMediaFullscreen", "downloadFile", "displayMedia"])) {
217 $this->checkPermission("read");
218 } else {
219 $this->checkPermission("write");
220 }
221
222 $ilTabs->clearTargets();
223
224 if ($this->requested_redirectSource === "ilinternallinkgui") {
225 exit;
226 }
227
228 $ilTabs->setBackTarget(
229 $lng->txt("back"),
230 $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "edit")
231 );
232
233 // page object
234
235 $lng->loadLanguageModule("content");
236 $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
237 // $this->tpl->setCurrentBlock("SyntaxStyle");
238 $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
239 // $this->tpl->parseCurrentBlock();
240
242 "cont",
243 $this->object->getId()
244 )) {
245 // doesn't exist -> create new one
246 $new_page_object = new ilContainerPage();
247 $new_page_object->setParentId($this->object->getId());
248 $new_page_object->setId($this->object->getId());
249 $new_page_object->createFromXML();
250 }
251
252 // get page object
253 $page_gui = new ilContainerPageGUI($this->object->getId());
254 $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
255 $page_gui->setStyleId(
256 $style->getEffectiveStyleId()
257 );
258 $page_gui->setItemPresentationManager($this->getItemPresentation(
259 false,
260 $page_gui->getLanguage()
261 ));
262 $page_gui->setTemplateTargetVar("ADM_CONTENT");
263 $page_gui->setFileDownloadLink("");
264 //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
265 $page_gui->setPresentationTitle("");
266 $page_gui->setTemplateOutput(false);
267
268 // style tab
269 $page_gui->setTabHook($this, "addPageTabs");
270
271 return $this->ctrl->forwardCommand($page_gui);
272 }
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 2689 of file class.ilContainerGUI.php.

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

1154 : string
1155 {
1156 return ilFileUtils::getASCIIFilename($this->object->getTitle());
1157 }
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 287 of file class.ilContainerGUI.php.

287 : string
288 {
290 $ilUser = $this->user;
291
292 if (!$ilSetting->get("enable_cat_page_edit") || $this->object->filteredSubtree()) {
293 return "";
294 }
295
296 // if page does not exist, return nothing
298 "cont",
299 $this->object->getId()
300 )) {
301 return "";
302 }
303 $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
304 $this->tpl->setCurrentBlock("SyntaxStyle");
305 $this->tpl->setVariable(
306 "LOCATION_SYNTAX_STYLESHEET",
308 );
309 $this->tpl->parseCurrentBlock();
310
311 // get page object
312 $ot = $this->object->getObjectTranslation();
313 $lang = $ot->getEffectiveCOPageLang($ilUser->getCurrentLanguage(), "cont");
314 $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
315 $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
316 $page_gui->setStyleId($style->getEffectiveStyleId());
317
318 $page_gui->setPresentationTitle("");
319 $page_gui->setTemplateOutput(false);
320 $page_gui->setHeader("");
321 $ret = $page_gui->showPage();
322
323 //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
324
325 //$ret =& $page_gui->executeCommand();
326 return $ret;
327 }
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
$lang
Definition: xapiexit.php:25

References $ilSetting, $lang, 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 349 of file class.ilContainerGUI.php.

350 {
351 $view_mode = $this->object->getViewMode();
352 if ($this->object->filteredSubtree()) {
353 $view_mode = ilContainer::VIEW_SIMPLE;
354 }
355 switch ($view_mode) {
356 // all items in one block
358 $container_view = new ilContainerSimpleContentGUI(
359 $this,
360 $this->getItemPresentation()
361 );
362 break;
363
365 $container_view = new ilContainerObjectiveGUI(
366 $this,
367 $this->getItemPresentation()
368 );
369 break;
370
371 // all items in one block
373 case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
374 $container_view = new ilContainerSessionsContentGUI(
375 $this,
376 $this->getItemPresentation()
377 );
378 break;
379
380 // all items in one block
382 default:
383 $container_view = new ilContainerByTypeContentGUI(
384 $this,
385 $this->getItemPresentation()
386 );
387 break;
388 }
389 return $container_view;
390 }
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:

◆ 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 $lang, and 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 887 of file class.ilContainerGUI.php.

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

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getTreeSelectorGUI()

ilContainerGUI::getTreeSelectorGUI ( string  $cmd)
protected

Reimplemented in ilObjOrgUnitGUI.

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

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

624 : bool
625 {
626 return $this->getItemPresentation()->hasItems();
627 }

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

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

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

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

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

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

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

Reimplemented from ilObjectGUI.

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

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

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

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

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

2332 {
2333 $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
2334
2335 $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
2336 $item_list->setInfo($this->lng->txt('cont_item_list_info'));
2337 $lpres->addOption($item_list);
2338
2339 $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
2340 $tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
2341 $lpres->addOption($tile_view);
2342
2343 // tile size
2344
2345 $si = new ilRadioGroupInputGUI($this->lng->txt("cont_tile_size"), "tile_size");
2346 foreach ($this->object->getTileSizes() as $key => $txt) {
2347 $op = new ilRadioOption($txt, $key);
2348 $si->addOption($op);
2349 }
2350 $tile_view->addSubItem($si);
2351 $si->setValue(
2352 (string) ((int) ilContainer::_lookupContainerSetting($this->object->getId(), "tile_size"))
2353 );
2354
2355 $lpres->setValue(
2356 ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
2357 );
2358
2359 $form->addItem($lpres);
2360
2361 return $form;
2362 }
This class represents a property in a property form.
This class represents an option in a radio group.
$txt
Definition: error.php:31

References $txt, 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 2417 of file class.ilContainerGUI.php.

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

2384 : ilRadioOption {
2385 if ($a_prefix === 'manual') {
2386 $txt = $this->lng->txt('sorting_new_items_direction');
2387 } else {
2388 $txt = $this->lng->txt('sorting_direction');
2389 }
2390
2391 $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
2392 $direction->setValue((string) $sorting_settings->getSortDirection());
2393 $direction->setRequired(true);
2394
2395 // asc
2396 $asc = new ilRadioOption(
2397 $this->lng->txt('sorting_asc'),
2399 );
2400 $direction->addOption($asc);
2401
2402 // desc
2403 $desc = new ilRadioOption(
2404 $this->lng->txt('sorting_desc'),
2406 );
2407 $direction->addOption($desc);
2408
2409 $element->addSubItem($direction);
2410
2411 return $element;
2412 }
const SORT_DIRECTION_DESC
const SORT_DIRECTION_ASC

References $txt, and 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 2261 of file class.ilContainerGUI.php.

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

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

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

950 : bool
951 {
952 if ($this->isActiveOrdering()) {
954 }
955 return false;
956 }

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

+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

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

945 : bool
946 {
947 return $this->edit_order;
948 }

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

968 : bool
969 {
971 }

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

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

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

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

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

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

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

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

1613 : void
1614 {
1617 $ilLog = $this->log;
1619 $ilUser = $this->user;
1620 $ilCtrl = $this->ctrl;
1622
1623 $exists = [];
1624 $no_paste = [];
1625 $is_child = [];
1626 $not_allowed_subobject = [];
1627
1628
1629 if (!in_array($this->clipboard->getCmd(), ["cut", "link", "copy"])) {
1630 $message = get_class(
1631 $this
1632 ) . "::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1633 $ilErr->raiseError($message, $ilErr->WARNING);
1634 }
1635
1636 // this loop does all checks
1637 foreach ($this->clipboard->getRefIds() as $ref_id) {
1639
1640 // CHECK ACCESS
1641 if (!$rbacsystem->checkAccess('create', $this->object->getRefId(), $obj_data->getType())) {
1642 $no_paste[] = $ref_id;
1643 $no_paste_titles[] = $obj_data->getTitle();
1644 }
1645
1646 // CHECK IF REFERENCE ALREADY EXISTS
1647 if ($this->object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1648 $exists[] = $ref_id;
1649 break;
1650 }
1651
1652 // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1653 if ($this->tree->isGrandChild($ref_id, $this->object->getRefId())) {
1655 }
1656
1657 if ($ref_id == $this->object->getRefId()) {
1659 }
1660
1661 // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1662 $obj_type = $obj_data->getType();
1663
1664 if (!array_key_exists($obj_type, $this->object->getPossibleSubObjects())) {
1665 $not_allowed_subobject[] = $obj_data->getType();
1666 }
1667 }
1668
1670 // process checking results
1671 // BEGIN WebDAV: Copying an object into the same container is allowed
1672 if (count($exists) > 0 && $this->clipboard->getCmd() !== "copy") {
1673 // END WebDAV: Copying an object into the same container is allowed
1674 $ilErr->raiseError($this->lng->txt("msg_obj_exists"), $ilErr->MESSAGE);
1675 }
1676
1677 if (count($is_child) > 0) {
1678 $ilErr->raiseError(
1679 $this->lng->txt("msg_not_in_itself") . " " . implode(',', $is_child),
1680 $ilErr->MESSAGE
1681 );
1682 }
1683
1684 if (count($not_allowed_subobject) > 0) {
1685 $ilErr->raiseError(
1686 $this->lng->txt("msg_may_not_contain") . " " . implode(',', $not_allowed_subobject),
1687 $ilErr->MESSAGE
1688 );
1689 }
1690
1691 if (count($no_paste) > 0) {
1692 $ilErr->raiseError(
1693 $this->lng->txt("msg_no_perm_paste") . " " .
1694 implode(',', $no_paste),
1695 $ilErr->MESSAGE
1696 );
1697 }
1698
1699 // log pasteObject call
1700 $ilLog->write("ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1701
1703 // everything ok: now paste the objects to new location
1704
1705 // to prevent multiple actions via back/reload button
1706 $ref_ids = $this->clipboard->getRefIds();
1707
1708 // save cmd for correct message output after clearing the clipboard
1709 $last_cmd = $this->clipboard->getCmd();
1710
1711 // BEGIN WebDAV: Support a copy command in the repository
1712 // process COPY command
1713 if ($this->clipboard->getCmd() === "copy") {
1714 $this->clipboard->clear();
1715
1716 // new implementation, redirects to ilObjectCopyGUI
1717 $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
1718 if (count($ref_ids) === 1) {
1719 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
1720 } else {
1721 $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $ref_ids));
1722 }
1723 $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
1724
1725 $ilLog->write("ilObjectGUI::pasteObject(), copy finished");
1726 }
1727 // END WebDAV: Support a Copy command in the repository
1728
1729 // process CUT command
1730 if ($this->clipboard->getCmd() === "cut") {
1731 foreach ($ref_ids as $ref_id) {
1732 // Store old parent
1733 $old_parent = $tree->getParentId($ref_id);
1734 $this->tree->moveTree($ref_id, $this->object->getRefId());
1735 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1736
1738
1739 // BEGIN ChangeEvent: Record cut event.
1740 $node_data = $tree->getNodeData($ref_id);
1741 $old_parent_data = $tree->getNodeData($old_parent);
1743 $node_data['obj_id'],
1744 $ilUser->getId(),
1745 'remove',
1746 $old_parent_data['obj_id']
1747 );
1749 $node_data['obj_id'],
1750 $ilUser->getId(),
1751 'add',
1752 $this->object->getId()
1753 );
1754 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
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 ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
1787 // END PATCH ChangeEvent: Record link event.
1788 }
1789
1790 $ilLog->write("ilObjectGUI::pasteObject(), link finished");
1791 } // END LINK
1792
1793
1794 // clear clipboard
1795 $this->clearObject();
1796
1797 if ($last_cmd === "cut") {
1798 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_cut_copied"), true);
1799 } // BEGIN WebDAV: Support a copy command in repository
1800 elseif ($last_cmd === "copy") {
1801 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_cloned"), true);
1802 } elseif ($last_cmd === 'link') {
1803 // END WebDAV: Support copy command in repository
1804 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_linked"), true);
1805 }
1806
1807 $this->ctrl->returnToParent($this);
1808 }
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
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, $message, $ref_id, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), 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 1238 of file class.ilContainerGUI.php.

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

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

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

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ renderBlockAsynchObject()

ilContainerGUI::renderBlockAsynchObject ( )

render the object

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

473 : void
474 {
475 $container_view = $this->getContentGUI();
476 echo $container_view->getSingleTypeBlockAsynch(
477 $this->std_request->getType()
478 );
479 exit;
480 }

References exit.

◆ renderObject()

ilContainerGUI::renderObject ( )

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

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

392 : void
393 {
394 $ilTabs = $this->tabs;
395 $ilCtrl = $this->ctrl;
400
401 $container_view = $this->getContentGUI();
402
403 $this->setContentSubTabs();
404 if ($this->isActiveAdministrationPanel()) {
405 if (!$this->item_presentation->canManageItems()) {
406 $this->ctrl->redirect($this, "disableAdministrationPanel");
407 }
408 $ilTabs->activateSubTab("manage");
409 } else {
410 $ilTabs->activateSubTab("view_content");
411 }
412
413 $container_view->setOutput();
414
415 //$this->adminCommands = $container_view->adminCommands;
416
417 $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
418 || ($this->std_request->getCmdClass() === "");
419
420 // it is important not to show the subobjects/admin panel here, since
421 // we will create nested forms in case, e.g. a news/calendar item is added
422 if ($is_container_cmd) {
424
425 if (!$this->edit_order) {
426 $this->showPossibleSubObjects();
427 }
428 if ($this->isActiveAdministrationPanel()) {
430 }
431
432 if (is_object($this->object) &&
434 $this->rbacsystem->checkAccess("write", $this->object->getRefId())
435 ) {
436 if ($ilSetting->get("enable_cat_page_edit")) {
437 if (!$this->isActiveAdministrationPanel() &&
438 !$this->isActiveOrdering() &&
439 $this->supportsPageEditor()
440 ) {
442 $lng->txt("cntr_text_media_editor"),
443 $ilCtrl->getLinkTarget($this, "editPageFrame")
444 );
445 }
446 }
447 }
448 if (!$this->edit_order) {
449 if (!$this->isActiveAdministrationPanel() && $this->getCreationMode() === false) {
451 }
452 }
453 }
454
455 $this->showContainerFilter();
456
457 $this->showPermanentLink();
458
459 // add tree updater javascript
460 if ($this->requested_ref_id > 1 && $ilSetting->get("rep_tree_synchronize")) {
461 $ilCtrl->setParameter($this, "active_node", $this->requested_ref_id);
462 }
463 }
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 2569 of file class.ilContainerGUI.php.

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

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

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

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

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

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

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

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

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

482 : void
483 {
485 }
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 814 of file class.ilContainerGUI.php.

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

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

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

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

329 : void
330 {
331 if (ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
332 $this->tpl->setTitle($this->object->getTitle(), true);
333 } else {
334 parent::setTitleAndDescription();
335 }
336 }

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

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

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

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

653 : void
654 {
657
658 $cnt = [];
659
661 "tpl.container_link_help.html",
662 true,
663 true,
664 "components/ILIAS/Container"
665 );
666
667 $type_ordering = [
668 "cat",
669 "fold",
670 "crs",
671 "grp",
672 "chat",
673 "frm",
674 "lres",
675 "glo",
676 "webr",
677 "file",
678 "exc",
679 "tst",
680 "svy",
681 "mep",
682 "qpl",
683 "spl"
684 ];
685
686 $childs = $tree->getChilds($this->requested_ref_id);
687 foreach ($childs as $child) {
688 if (in_array($child["type"], ["lm", "sahs", "htlm"])) {
689 $cnt["lres"]++;
690 } else {
691 $cnt[$child["type"]]++;
692 }
693 }
694
695 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
696 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
697 foreach ($type_ordering as $type) {
698 $tpl->setCurrentBlock("row");
699 if ($type !== "lres") {
701 "TYPE",
702 $lng->txt("objs_" . $type) .
703 " (" . ((int) $cnt[$type]) . ")"
704 );
705 } else {
707 "TYPE",
708 $lng->txt("obj_lrss") .
709 " (" . ((int) $cnt["lres"]) . ")"
710 );
711 }
712 $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
714 }
716 exit;
717 }
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 2081 of file class.ilContainerGUI.php.

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

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

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

References $ilErr, $message, 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 629 of file class.ilContainerGUI.php.

629 : void
630 {
631 global $DIC;
632
633 $tpl = $DIC->ui()->mainTemplate();
634
636 $this->object->getType(),
637 $this->object->getRefId(),
638 "",
639 "_top"
640 );
641 }
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 338 of file class.ilContainerGUI.php.

338 : void
339 {
340 if ($this->isActiveOrdering()) {
341 return;
342 }
345 );
346 $gui->render();
347 }
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 465 of file class.ilContainerGUI.php.

465 : bool
466 {
467 return true;
468 }

◆ trashApplyFilterObject()

ilContainerGUI::trashApplyFilterObject ( )

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

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

◆ trashHandleFilter()

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

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

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

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

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

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

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

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

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: