ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 public More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 
 competencesObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _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 ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (?ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

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

Member Function Documentation

◆ _buildPath()

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

build path

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

References ilObjectGUI\$data, $DIC, $path, ilObjectGUI\$tree, and ilTree\getPathFull().

2046  : string {
2047  global $DIC;
2048 
2049  $tree = $DIC->repositoryTree();
2050  $path = "";
2051 
2052  $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2053  $counter = 0;
2054  foreach ($path_arr as $data) {
2055  if ($counter++) {
2056  $path .= " > ";
2057  }
2058  $path .= $data['title'];
2059  }
2060 
2061  return $path;
2062  }
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
$path
Definition: ltiservices.php:29
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ addHeaderRow()

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

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

References $DIC, $ilSetting, ilObjectGUI\$settings, ilContainerSortingSettings\_lookupSortMode(), ilUtil\getImagePath(), isActiveAdministrationPanel(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), ilContainer\SORT_MANUAL, and ilTemplate\touchBlock().

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

◆ addMessageRow()

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

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

References ilObjectGUI\$type, ILIAS\Repository\lng(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilTemplate\touchBlock().

798  : void {
799  $type = $this->lng->txt("obj_" . $a_type);
800  $a_message = str_replace("[type]", $type, $a_message);
801 
802  $a_tpl->setVariable("ROW_NBSP", " ");
803 
804  $a_tpl->setCurrentBlock("container_standard_row");
805  $a_tpl->setVariable(
806  "BLOCK_ROW_CONTENT",
807  $a_message
808  );
809  $a_tpl->parseCurrentBlock();
810  $a_tpl->touchBlock("container_row");
811  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

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

References ilObjectGUI\$ctrl, and $tabs.

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

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs ( bool  $a_include_view = true)

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

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$user, getItemPresentation(), isActiveAdministrationPanel(), and ilLanguage\txt().

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

847  : void {
848  $ilTabs = $this->tabs;
849  $lng = $this->lng;
850  $ilCtrl = $this->ctrl;
851  $ilUser = $this->user;
852 
853  if (!is_object($this->object)) {
854  return;
855  }
856 
857  if ($a_include_view && $this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
858  if (!$this->isActiveAdministrationPanel()) {
859  $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass(static::class, "view"));
860  } else {
861  $ilTabs->addSubTab(
862  "view_content",
863  $lng->txt("view"),
864  $ilCtrl->getLinkTarget($this, "disableAdministrationPanel")
865  );
866  }
867  }
868 
870  if ($item_presentation->canManageItems()) {
871  if ($this->isActiveAdministrationPanel()) {
872  $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
873  } else {
874  $ilTabs->addSubTab(
875  "manage",
876  $lng->txt("cntr_manage"),
877  $ilCtrl->getLinkTarget($this, "enableAdministrationPanel")
878  );
879  }
880  }
881  if ($item_presentation->canOrderItems()) {
882  $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
883  }
884  }
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...
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
ilLanguage $lng
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

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

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

Referenced by ilObjCourseGUI\updateObject(), and ilObjCategoryGUI\updateObject().

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

◆ allowBlocksConfigure()

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

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

1911  : bool
1912  {
1913  return true;
1914  }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

1903  : bool
1904  {
1905  return true;
1906  }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

References ilObjectGUI\$ctrl, and ilCtrl\returnToParent().

Referenced by ilObjOrgUnitGUI\executeCommand().

1582  : void
1583  {
1584  $ilCtrl = $this->ctrl;
1585 
1586  $this->clipboard->clear();
1587  $ilCtrl->returnToParent($this);
1588  }
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

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

References ILIAS\Repository\ctrl().

647  : void
648  {
649  $this->ctrl->redirect($this, "");
650  }
+ Here is the call graph for this function:

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

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

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

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

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

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$data, $error, $ilErr, ilObjectGUI\$lng, $log, $message, ilObjectGUI\$ref_id, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

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

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

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

References $_COOKIE, ilObjectGUI\$access, ilObjectGUI\$ctrl, $error, $ilErr, $rbacsystem, ilObjectGUI\$ref_id, ilObjectGUI\$requested_ref_id, ilCopyWizardOptions\_isFinished(), ilRbacSystem\checkAccess(), ilObjectGUI\createObject(), ilObjectFactory\getInstanceByRefId(), and ILIAS\Repository\lng().

1921  : void
1922  {
1923  $ilCtrl = $this->ctrl;
1924 
1925  $ilAccess = $this->access;
1926  $ilErr = $this->error;
1928 
1929  $new_type = $this->std_request->getNewType();
1931  $clone_source = $this->std_request->getCloneSource();
1932 
1933  if (!$rbacsystem->checkAccess('create', $ref_id, $new_type)) {
1934  $ilErr->raiseError($this->lng->txt('permission_denied'));
1935  }
1936  if (!$clone_source) {
1937  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
1938  $this->createObject();
1939  return;
1940  }
1941  if (!$ilAccess->checkAccess('write', '', $clone_source, $new_type)) {
1942  $ilErr->raiseError($this->lng->txt('permission_denied'));
1943  }
1944 
1945  $options = $this->std_request->getCopyOptions();
1946  $orig = ilObjectFactory::getInstanceByRefId($clone_source);
1947  $result = $orig->cloneAllObject(
1948  $_COOKIE[session_name()],
1949  $_COOKIE['ilClientId'],
1950  $new_type,
1951  $ref_id,
1952  $clone_source,
1953  $options
1954  );
1955 
1956  if (ilCopyWizardOptions::_isFinished($result['copy_id'])) {
1957  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_duplicated"), true);
1958  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
1959  } else {
1960  $this->tpl->setOnScreenMessage('info', $this->lng->txt("object_copy_in_progress"), true);
1961  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
1962  }
1963  $ilCtrl->redirectByClass("ilrepositorygui", "");
1964  }
ilRbacSystem $rbacsystem
createObject()
create new object form
$ilErr
Definition: raiseError.php:33
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 ...
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static _isFinished(int $a_copy_id)
ilErrorHandling $error
ilAccessHandler $access
$_COOKIE[session_name()]
Definition: xapitoken.php:54
+ Here is the call graph for this function:

◆ cloneNodes()

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

Recursively clones all nodes of the RBAC tree.

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

References ilObjectGUI\$tree, ilTree\getChilds(), ilTree\getChildsByType(), and ilObjectFactory\getInstanceByRefId().

Referenced by performPasteIntoMultipleObjectsObject().

1987  : int {
1988  $tree = $this->tree;
1989 
1990  // clone the source node
1991  $srcObj = ilObjectFactory::getInstanceByRefId($srcRef);
1992  $newRef = $srcObj->cloneObject($dstRef)->getRefId();
1993 
1994  // We must immediately apply a new name to the object, to
1995  // prevent confusion of WebDAV clients about having two objects with identical
1996  // name in the repository.
1997  if (!is_null($newName)) {
1998  $newObj = ilObjectFactory::getInstanceByRefId($newRef);
1999  $newObj->setTitle($newName);
2000  $newObj->update();
2001  unset($newObj);
2002  }
2003  unset($srcObj);
2004  $mapping[$newRef] = $srcRef;
2005 
2006  // clone all children of the source node
2007  $children = $tree->getChilds($srcRef);
2008  foreach ($tree->getChilds($srcRef) as $child) {
2009  // Don't clone role folders, because it does not make sense to clone local roles
2010  // FIXME - Maybe it does make sense (?)
2011  if ($child["type"] !== 'rolf') {
2012  $this->cloneNodes($child["ref_id"], $newRef, $mapping);
2013  } elseif (count($rolf = $tree->getChildsByType($newRef, "rolf"))) {
2014  $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
2015  }
2016  }
2017  return $newRef;
2018  }
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
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
cloneNodes(int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
Recursively clones all nodes of the RBAC tree.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ competencesObject()

ilContainerGUI::competencesObject ( )

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

References ilObjectGUI\$ctrl, and ilCtrl\redirectByClass().

2720  : void
2721  {
2722  $ctrl = $this->ctrl;
2723 
2724  $ctrl->redirectByClass(["ilContainerSkillGUI", "ilContSkillPresentationGUI"]);
2725  }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

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

References ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), and ilLanguage\txt().

2589  : void
2590  {
2591  $lng = $this->lng;
2592  $this->checkPermission("write");
2593  if (count($this->std_request->getTrashIds()) == 0) {
2594  $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
2595  $this->ctrl->redirect($this, "trash");
2596  }
2597 
2598  $ru = new ilRepositoryTrashGUI($this);
2599  $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2600  }
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
Repository GUI Utilities.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ 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 1034 of file class.ilContainerGUI.php.

References ilObjectGUI\$ctrl, $error, $ilErr, $obj_definition, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilRbacSystem\checkAccess(), ILIAS\Repository\ctrl(), initAndDisplayCopyIntoMultipleObjectsObject(), and ILIAS\Repository\lng().

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

◆ cutObject()

ilContainerGUI::cutObject ( )

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

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

References ilObjectGUI\$ctrl, $error, $ilErr, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilRbacSystem\checkAccess(), ILIAS\Repository\ctrl(), initAndDisplayMoveIntoObjectObject(), and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand().

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

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

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

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

927  : void
928  {
929  $this->getModeManager()->setContentMode();
930  $this->ctrl->redirect($this, "render");
931  }
+ Here is the call graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

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

References $error, $GLOBALS, $ilErr, ilObjectGUI\$object, ilObjectGUI\$requested_ref_id, ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), getBucketTitle(), ILIAS\Survey\Mode\getId(), ilObjectFactory\getInstanceByRefId(), ilObject\getType(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

1115  : void
1116  {
1117  if (in_array($this->user->getId(), [ANONYMOUS_USER_ID, 0], true)) {
1118  return;
1119  }
1120 
1121  $ilErr = $this->error;
1122  // This variable determines whether the task has been initiated by a folder's action drop-down to prevent a folder
1123  // duplicate inside the zip.
1124  $initiated_by_folder_action = false;
1125 
1126  $ids = $this->std_request->getSelectedIds();
1127 
1128  if (count($ids) === 0) {
1129  $object = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
1130  $object_type = $object->getType();
1131  if ($object_type === "fold") {
1132  $ids = [$this->requested_ref_id];
1133  $initiated_by_folder_action = true;
1134  } else {
1135  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1136  $this->ctrl->redirect($this, "");
1137  }
1138  }
1139 
1140  $download_job = new ilDownloadContainerFilesBackgroundTask(
1141  $GLOBALS['DIC']->user()->getId(),
1142  $ids,
1143  $initiated_by_folder_action
1144  );
1145 
1146  $download_job->setBucketTitle($this->getBucketTitle());
1147  if ($download_job->run()) {
1148  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_bt_download_started'), true);
1149  }
1150  $GLOBALS['DIC']->ctrl()->redirect($this);
1151  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
$ilErr
Definition: raiseError.php:33
$GLOBALS["DIC"]
Definition: wac.php:53
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
ilErrorHandling $error
+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

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

References $tabs, getModeManager(), and renderObject().

933  : void
934  {
935  $ilTabs = $this->tabs;
936  $this->edit_order = true;
937  $this->getModeManager()->setOrderingMode();
938  $this->renderObject();
939 
940  $ilTabs->activateSubTab("ordering");
941  }
+ Here is the call graph for this function:

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

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

References ILIAS\Repository\ctrl().

642  : void
643  {
644  $this->ctrl->redirectByClass([static::class, "ilcontainerpagegui"], "edit");
645  }
+ Here is the call graph for this function:

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

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

Referenced by ilObjStudyProgrammeGUI\executeCommand().

2065  : void
2066  {
2067  $this->content_style_gui
2068  ->redirectToObjectSettings();
2069  }
+ Here is the caller graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

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

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

921  : void
922  {
923  $this->getModeManager()->setAdminMode();
924  $this->ctrl->redirect($this, "render");
925  }
+ Here is the call graph for this function:

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

References renderObject().

961  : void
962  {
963  $this->multi_download_enabled = true;
964  $this->renderObject();
965  }
+ Here is the call graph for this function:

◆ executeCommand()

ilContainerGUI::executeCommand ( )

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

References ilObjectGUI\$tpl, ILIAS\Repository\ctrl(), forwardToPageObject(), ilObjectGUI\prepareOutput(), and ILIAS\UICore\GlobalTemplate\setContent().

156  : void
157  {
158  $tpl = $this->tpl;
159 
160  $next_class = $this->ctrl->getNextClass();
161  $cmd = $this->ctrl->getCmd("render");
162 
163  switch ($next_class) {
164  // page editing
165  case "ilcontainerpagegui":
166  if ($this->requested_redirectSource !== "ilinternallinkgui") {
167  $ret = $this->forwardToPageObject();
168  $tpl->setContent($ret);
169  } else {
170  return;
171  }
172  break;
173 
174  default:
175  $this->prepareOutput();
176  $cmd .= "Object";
177  $this->$cmd();
178  break;
179  }
180  }
prepareOutput(bool $show_sub_objects=true)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ forwardToPageObject()

ilContainerGUI::forwardToPageObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilPageObject\_exists(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), exit, ilCtrl\getCmd(), getItemPresentation(), ilObjStyleSheet\getSyntaxStylePath(), ilLanguage\loadLanguageModule(), ILIAS\Repository\object(), ilPageObjectGUI\setStyleId(), and ilLanguage\txt().

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

209  : string
210  {
211  $lng = $this->lng;
212  $ilTabs = $this->tabs;
213  $ilCtrl = $this->ctrl;
214  $cmd = $ilCtrl->getCmd();
215  if (in_array($cmd, ["displayMediaFullscreen", "downloadFile", "displayMedia"])) {
216  $this->checkPermission("read");
217  } else {
218  $this->checkPermission("write");
219  }
220 
221  $ilTabs->clearTargets();
222 
223  if ($this->requested_redirectSource === "ilinternallinkgui") {
224  exit;
225  }
226 
227  $ilTabs->setBackTarget(
228  $lng->txt("back"),
229  $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "edit")
230  );
231 
232  // page object
233 
234  $lng->loadLanguageModule("content");
235  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
236  // $this->tpl->setCurrentBlock("SyntaxStyle");
237  $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
238  // $this->tpl->parseCurrentBlock();
239 
241  "cont",
242  $this->object->getId()
243  )) {
244  // doesn't exist -> create new one
245  $new_page_object = new ilContainerPage();
246  $new_page_object->setParentId($this->object->getId());
247  $new_page_object->setId($this->object->getId());
248  $new_page_object->createFromXML();
249  }
250 
251  // get page object
252  $page_gui = new ilContainerPageGUI($this->object->getId());
253  $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
254  $page_gui->setStyleId(
255  $style->getEffectiveStyleId()
256  );
257  $page_gui->setItemPresentationManager($this->getItemPresentation(
258  false,
259  $page_gui->getLanguage()
260  ));
261  $page_gui->setTemplateTargetVar("ADM_CONTENT");
262  $page_gui->setFileDownloadLink("");
263  //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
264  $page_gui->setPresentationTitle("");
265  $page_gui->setTemplateOutput(false);
266 
267  // style tab
268  $page_gui->setTabHook($this, "addPageTabs");
269 
270  return $this->ctrl->forwardCommand($page_gui);
271  }
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...
Container page GUI class.
getCmd(?string $fallback_command=null)
loadLanguageModule(string $a_module)
Load language module.
setStyleId(int $a_styleid)
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
ilLanguage $lng
Container page object.
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilContainerGUI::getAdminTabs ( )

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

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

2688  : void
2689  {
2690  if ($this->checkPermissionBool("visible,read")) {
2691  $this->tabs_gui->addTab(
2692  'view',
2693  $this->lng->txt('view'),
2694  $this->ctrl->getLinkTarget($this, 'view')
2695  );
2696  }
2697 
2698  // Always show container trash
2699  $this->tabs_gui->addTab(
2700  'trash',
2701  $this->lng->txt('trash'),
2702  $this->ctrl->getLinkTarget($this, 'trash')
2703  );
2704 
2705  if ($this->checkPermissionBool("edit_permission")) {
2706  $this->tabs_gui->addTab(
2707  'perm_settings',
2708  $this->lng->txt('perm_settings'),
2709  $this->ctrl->getLinkTargetByClass(
2710  [
2711  get_class($this),
2712  'ilpermissiongui'
2713  ],
2714  'perm'
2715  )
2716  );
2717  }
2718  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ getBucketTitle()

ilContainerGUI::getBucketTitle ( )

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

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

Referenced by downloadObject().

1153  : string
1154  {
1155  return ilFileUtils::getASCIIFilename($this->object->getTitle());
1156  }
static getASCIIFilename(string $a_filename)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

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

References $ilSetting, $lang, ilObjectGUI\$settings, ilObjectGUI\$user, ilPageUtil\_existsAndNotEmpty(), ilObjectTranslation\getInstance(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\Repository\object(), and ilPageObjectGUI\setStyleId().

286  : string
287  {
289  $ilUser = $this->user;
290 
291  if (!$ilSetting->get("enable_cat_page_edit") || $this->object->filteredSubtree()) {
292  return "";
293  }
294 
295  // if page does not exist, return nothing
297  "cont",
298  $this->object->getId()
299  )) {
300  return "";
301  }
302  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
303  $this->tpl->setCurrentBlock("SyntaxStyle");
304  $this->tpl->setVariable(
305  "LOCATION_SYNTAX_STYLESHEET",
307  );
308  $this->tpl->parseCurrentBlock();
309 
310  // get page object
311  $ot = ilObjectTranslation::getInstance($this->object->getId());
312  $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
313  $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
314  $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
315  $page_gui->setStyleId($style->getEffectiveStyleId());
316 
317  $page_gui->setPresentationTitle("");
318  $page_gui->setTemplateOutput(false);
319  $page_gui->setHeader("");
320  $ret = $page_gui->showPage();
321 
322  //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
323 
324  //$ret =& $page_gui->executeCommand();
325  return $ret;
326  }
Container page GUI class.
setStyleId(int $a_styleid)
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) ...
static getInstance(int $obj_id)
$lang
Definition: xapiexit.php:25
global $ilSetting
Definition: privfeed.php:31
ilSetting $settings
+ Here is the call graph for this function:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

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

References getItemPresentation(), 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 redrawListItemObject(), renderBlockAsynchObject(), renderObject(), and ilObjOrgUnitGUI\view().

349  {
350  $view_mode = $this->object->getViewMode();
351  if ($this->object->filteredSubtree()) {
352  $view_mode = ilContainer::VIEW_SIMPLE;
353  }
354  switch ($view_mode) {
355  // all items in one block
357  $container_view = new ilContainerSimpleContentGUI(
358  $this,
359  $this->getItemPresentation()
360  );
361  break;
362 
364  $container_view = new ilContainerObjectiveGUI(
365  $this,
366  $this->getItemPresentation()
367  );
368  break;
369 
370  // all items in one block
372  case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
373  $container_view = new ilContainerSessionsContentGUI(
374  $this,
375  $this->getItemPresentation()
376  );
377  break;
378 
379  // all items in one block
381  default:
382  $container_view = new ilContainerByTypeContentGUI(
383  $this,
384  $this->getItemPresentation()
385  );
386  break;
387  }
388  return $container_view;
389  }
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.
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
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...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

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

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

Referenced by ilObjFolderGUI\editObject().

182  : array
183  {
184  $values = parent::getEditFormValues();
185 
186  $values['didactic_type'] =
187  'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
188 
189  return $values;
190  }
+ 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 139 of file class.ilContainerGUI.php.

References $item_presentation, $lang, and ilObjectGUI\getObject().

Referenced by addStandardContainerSubTabs(), forwardToPageObject(), ilObjTalkTemplateAdministrationGUI\getContentGUI(), getContentGUI(), gotItems(), and showAdministrationPanel().

142  : \ILIAS\Container\Content\ItemPresentationManager {
143  if (is_null($this->item_presentation)) {
144  $this->item_presentation = $this->domain
145  ->content()
146  ->itemPresentation(
147  $this->getObject(),
148  $this->container_user_filter,
149  $include_empty_blocks,
150  $lang
151  );
152  }
154  }
ILIAS Container Content ItemPresentationManager $item_presentation
$lang
Definition: xapiexit.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getModeManager()

ilContainerGUI::getModeManager ( )
protected

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

References $mode_manager, and ilObjectGUI\getObject().

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

129  : ModeManager
130  {
131  if (is_null($this->mode_manager)) {
132  $this->mode_manager = $this->domain
133  ->content()
134  ->mode($this->getObject());
135  }
136  return $this->mode_manager;
137  }
ModeManager $mode_manager
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilContainerGUI::getTabs ( )
protected

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

References ilObjectGUI\$ctrl, $rbacsystem, ilRbacSystem\checkAccess(), and ILIAS\Repository\ctrl().

886  : void
887  {
889  $ilCtrl = $this->ctrl;
890 
891  // edit permissions
892  if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
893  $this->tabs_gui->addTarget(
894  "perm_settings",
895  $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], "perm"),
896  ["perm", "info", "owner"],
897  'ilpermissiongui'
898  );
899  if ($ilCtrl->getNextClass() === "ilpermissiongui") {
900  $this->tabs_gui->activateTab("perm_settings");
901  }
902  }
903 
904  // show clipboard
905  if (strtolower($this->std_request->getBaseClass()) === "ilrepositorygui" &&
906  $this->clipboard->hasEntries()) {
907  $this->tabs_gui->addTarget(
908  "clipboard",
909  $this->ctrl->getLinkTarget($this, "clipboard"),
910  "clipboard",
911  get_class($this)
912  );
913  }
914  }
ilRbacSystem $rbacsystem
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 ...
+ Here is the call graph for this function:

◆ getTreeSelectorGUI()

ilContainerGUI::getTreeSelectorGUI ( string  $cmd)
protected

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

References ilObjectGUI\$type, and ilObject\_lookupType().

Referenced by showPasteTreeObject().

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

◆ gotItems()

ilContainerGUI::gotItems ( )
protected

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

References getItemPresentation().

Referenced by showAdministrationPanel().

623  : bool
624  {
625  return $this->getItemPresentation()->hasItems();
626  }
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

References showPasteTreeObject().

Referenced by copyObject().

1598  : void
1599  {
1600  $this->showPasteTreeObject();
1601  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

References showPasteTreeObject().

Referenced by linkObject().

1524  : void
1525  {
1526  $this->showPasteTreeObject();
1527  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

References showPasteTreeObject().

Referenced by cutObject().

1603  : void
1604  {
1605  $this->showPasteTreeObject();
1606  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

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

References $form, ilObjectGUI\$lng, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilObjectGUI\getCreationMode(), ilObjectGUI\initEditCustomForm(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ilObject\LONG_DESC_LENGTH, null, ILIAS\Repository\object(), ilFormGUI\setFormAction(), ilTextAreaInputGUI\setRows(), ilPropertyFormGUI\setTitle(), and ilObject\TITLE_LENGTH.

2202  {
2203  $lng = $this->lng;
2204  $lng->loadLanguageModule($this->object->getType());
2205 
2206  $form = new ilPropertyFormGUI();
2207  $form->setFormAction($this->ctrl->getFormAction($this, "update"));
2208  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
2209 
2210  $this->initFormTitleDescription($form);
2211 
2212  $this->initEditCustomForm($form);
2213 
2214  $form->addCommandButton("update", $this->lng->txt("save"));
2215 
2216  return $form;
2217  }
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilPropertyFormGUI $form
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
+ Here is the call graph for this function:

◆ initFilter()

ilContainerGUI::initFilter ( )
protected

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

References $container_filter_service, $DIC, ilObjectGUI\$request, ilContainer\_lookupContainerSetting(), ILIAS\Repository\ctrl(), isActiveAdministrationPanel(), isActiveOrdering(), and ILIAS\Repository\object().

2643  : void
2644  {
2645  global $DIC;
2646 
2647  if (!$this->object || !ilContainer::_lookupContainerSetting($this->object->getId(), "filter", '0')) {
2648  return;
2649  }
2650 
2651  if ($this->isActiveOrdering() || $this->ctrl->getCmd() === "editOrder") {
2652  return;
2653  }
2654 
2655  $filter_service = $this->container_filter_service;
2656  $request = $DIC->http()->request();
2657 
2658  $filter = $filter_service->util()->getFilterForRefId(
2659  $this->ref_id,
2660  $DIC->ctrl()->getLinkTarget($this, "render", "", true),
2662  );
2663 
2664  $filter_data = $DIC->uiService()->filter()->getData($filter);
2665 
2666  $this->container_user_filter = $filter_service->userFilter($filter_data);
2667  $this->ui_filter = $filter;
2668  }
ilContainerFilterService $container_filter_service
ServerRequestInterface $request
global $DIC
Definition: shib_login.php:22
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
+ Here is the call graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

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

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

Referenced by savePasswordObject(), and showPasswordInstructionObject().

2107  {
2108  $this->form = new ilPropertyFormGUI();
2109  $this->form->setFormAction($this->ctrl->getFormAction($this));
2110 
2111  // new password
2112  $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
2113  $ipass->setRequired(true);
2114 
2115  $this->form->addItem($ipass);
2116  $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
2117  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
2118 
2119  $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
2120  $this->form->setFormAction($this->ctrl->getFormAction($this));
2121 
2122  return $this->form;
2123  }
This class represents a password property in a property form.
setRequired(bool $a_required)
ilPropertyFormGUI $form
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initListPresentationForm()

ilContainerGUI::initListPresentationForm ( ilPropertyFormGUI  $form)
protected

Add list presentation settings to form.

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

References $form, $txt, ilContainer\_lookupContainerSetting(), ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilRadioOption\setInfo(), and ilFormPropertyGUI\setInfo().

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

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

◆ initManualSortingOptionForm()

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

Add manual sorting options.

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

References ilRadioOption\addSubItem(), ilContainerSortingSettings\getSortNewItemsOrder(), ilContainerSortingSettings\getSortNewItemsPosition(), initSortingDirectionForm(), ILIAS\Repository\lng(), ilRadioGroupInputGUI\setValue(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_NEW_ITEMS_ORDER_ACTIVATION, ilContainer\SORT_NEW_ITEMS_ORDER_CREATION, ilContainer\SORT_NEW_ITEMS_ORDER_TITLE, ilContainer\SORT_NEW_ITEMS_POSITION_BOTTOM, ilContainer\SORT_NEW_ITEMS_POSITION_TOP, and ilContainer\SORT_TITLE.

Referenced by initSortingForm().

2421  : ilRadioOption {
2422  $position = new ilRadioGroupInputGUI(
2423  $this->lng->txt('sorting_new_items_position'),
2424  $a_prefix . '_new_items_position'
2425  );
2426  $position->setValue((string) $settings->getSortNewItemsPosition());
2427  $position->setRequired(true);
2428 
2429  //new items insert on top
2430  $new_top = new ilRadioOption(
2431  $this->lng->txt('sorting_new_items_at_top'),
2433  );
2434 
2435  $position->addOption($new_top);
2436 
2437  //new items insert at bottom
2438  $new_bottom = new ilRadioOption(
2439  $this->lng->txt('sorting_new_items_at_bottom'),
2441  );
2442 
2443  $position->addOption($new_bottom);
2444 
2445  $element->addSubItem($position);
2446 
2447  $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
2448  $order->setValue((string) $settings->getSortNewItemsOrder());
2449  $order->setRequired(true);
2450 
2451  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2452  //new items sort in alphabetical order
2453  $new_title = new ilRadioOption(
2454  $this->lng->txt('sorting_title_header'),
2456  );
2457 
2458  $order->addOption($new_title);
2459  }
2460 
2461  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2462  //new items sort by creation date
2463  $new_creation = new ilRadioOption(
2464  $this->lng->txt('sorting_creation_header'),
2466  );
2467 
2468  $order->addOption($new_creation);
2469  }
2470 
2471  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2472  //new items by activation
2473  $new_activation = new ilRadioOption(
2474  $this->lng->txt('crs_sort_activation'),
2476  );
2477 
2478  $order->addOption($new_activation);
2479  }
2480 
2481  $element->addSubItem($order);
2482 
2483  $this->initSortingDirectionForm($settings, $element, 'manual');
2484 
2485  return $element;
2486  }
This class represents an option in a radio group.
const SORT_NEW_ITEMS_POSITION_TOP
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
Add sorting direction.
const SORT_NEW_ITEMS_POSITION_BOTTOM
This class represents a property in a property form.
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_ORDER_ACTIVATION
const SORT_NEW_ITEMS_ORDER_TITLE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSortingDirectionForm()

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

Add sorting direction.

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

References $txt, ilRadioOption\addSubItem(), ilContainerSortingSettings\getSortDirection(), ILIAS\Repository\lng(), ilContainer\SORT_DIRECTION_ASC, and ilContainer\SORT_DIRECTION_DESC.

Referenced by initManualSortingOptionForm(), and initSortingForm().

2383  : ilRadioOption {
2384  if ($a_prefix === 'manual') {
2385  $txt = $this->lng->txt('sorting_new_items_direction');
2386  } else {
2387  $txt = $this->lng->txt('sorting_direction');
2388  }
2389 
2390  $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
2391  $direction->setValue((string) $sorting_settings->getSortDirection());
2392  $direction->setRequired(true);
2393 
2394  // asc
2395  $asc = new ilRadioOption(
2396  $this->lng->txt('sorting_asc'),
2398  );
2399  $direction->addOption($asc);
2400 
2401  // desc
2402  $desc = new ilRadioOption(
2403  $this->lng->txt('sorting_desc'),
2405  );
2406  $direction->addOption($desc);
2407 
2408  $element->addSubItem($direction);
2409 
2410  return $element;
2411  }
This class represents an option in a radio group.
This class represents a property in a property form.
$txt
Definition: error.php:31
const SORT_DIRECTION_DESC
const SORT_DIRECTION_ASC
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSortingForm()

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

Append sorting settings to property form.

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

References $form, ilObjectGUI\$settings, ilPropertyFormGUI\addItem(), initManualSortingOptionForm(), initSortingDirectionForm(), ILIAS\Repository\lng(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ILIAS\Repository\object(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ilContainerSortingSettings\sortModeToString().

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

2263  : ilPropertyFormGUI {
2264  $settings = new ilContainerSortingSettings($this->object->getId());
2265  $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
2266 
2267  if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
2268  $sort_inherit = new ilRadioOption();
2269  $sort_inherit->setTitle(
2270  $this->lng->txt('sort_inherit_prefix') .
2273  $this->object->getId()
2274  )
2275  ) . ') '
2276  );
2277  $sort_inherit->setValue((string) ilContainer::SORT_INHERIT);
2278  $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
2279  $sort->addOption($sort_inherit);
2280  }
2281  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2282  $sort_title = new ilRadioOption(
2283  $this->lng->txt('sorting_title_header'),
2284  (string) ilContainer::SORT_TITLE
2285  );
2286  $sort_title->setInfo($this->lng->txt('sorting_info_title'));
2287 
2288  $this->initSortingDirectionForm($settings, $sort_title, 'title');
2289  $sort->addOption($sort_title);
2290  }
2291  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2292  $sort_activation = new ilRadioOption(
2293  $this->lng->txt('sorting_creation_header'),
2295  );
2296  $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
2297  $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
2298  $sort->addOption($sort_activation);
2299  }
2300  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2301  $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), (string) ilContainer::SORT_ACTIVATION);
2302  $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
2303  $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
2304  $sort->addOption($sort_activation);
2305  }
2306  if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
2307  $sort_manual = new ilRadioOption(
2308  $this->lng->txt('sorting_manual_header'),
2309  (string) ilContainer::SORT_MANUAL
2310  );
2311  $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
2312  $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
2313  $sort->addOption($sort_manual);
2314  }
2315 
2316  // Handle moved containers and there possibly invalid values
2317  if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2318  $sort->setValue((string) $settings->getSortMode());
2319  } else {
2320  $sort->setValue((string) ilContainer::SORT_TITLE);
2321  }
2322  $form->addItem($sort);
2323 
2324  return $form;
2325  }
This class represents an option in a radio group.
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
Add sorting direction.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
initManualSortingOptionForm(ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
Add manual sorting options.
ilPropertyFormGUI $form
static lookupSortModeFromParentContainer(int $a_obj_id)
static sortModeToString(int $a_sort_mode)
Get string representation of sort mode.
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilContainerGUI::isActiveAdministrationPanel ( )

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

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

Referenced by addHeaderRow(), addStandardContainerSubTabs(), initFilter(), ilObjCourseGUI\renderObject(), renderObject(), setColumnSettings(), ilObjCourseGUI\setContentSubTabs(), setPageEditorTabs(), showAdministrationPanel(), ilObjCourseGUI\showPossibleSubObjects(), ilObjOrgUnitGUI\view(), and ilObjGroupGUI\viewObject().

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

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

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

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

949  : bool
950  {
951  if ($this->isActiveOrdering()) {
953  }
954  return false;
955  }
+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

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

References $edit_order.

Referenced by initFilter(), isActiveItemOrdering(), renderObject(), showAdministrationPanel(), and showPossibleSubObjects().

944  : bool
945  {
946  return $this->edit_order;
947  }
+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

References $multi_download_enabled.

Referenced by showAdministrationPanel().

967  : bool
968  {
970  }
+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

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

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

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

1590  : void
1591  {
1592  $ilCtrl = $this->ctrl;
1593 
1594  $this->tpl->setOnScreenMessage('success', $this->lng->txt("obj_inserted_clipboard"), true);
1595  $ilCtrl->returnToParent($this);
1596  }
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
+ 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 1162 of file class.ilContainerGUI.php.

References ilObjectGUI\$ctrl, $error, $ilErr, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, ilRbacSystem\checkAccess(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByRefId(), ilObject\getType(), initAndDisplayLinkIntoMultipleObjectsObject(), and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand().

1162  : void
1163  {
1165  $ilCtrl = $this->ctrl;
1166  $ilErr = $this->error;
1167 
1168  $no_cut = [];
1169  $no_link = [];
1170 
1171  $ids = $this->std_request->getSelectedIds();
1172 
1173  if (count($ids) === 0) {
1174  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1175  $this->ctrl->redirect($this, "");
1176  }
1177 
1178  // CHECK ACCESS
1179  foreach ($ids as $ref_id) {
1180  if (!$rbacsystem->checkAccess('delete', $ref_id)) {
1181  $no_cut[] = $ref_id;
1182  }
1183 
1185 
1186  if (!$this->obj_definition->allowLink($object->getType())) {
1187  $no_link[] = $object->getType();
1188  }
1189  }
1190 
1191  // NO ACCESS
1192  if ($no_cut !== []) {
1193  $this->tpl->setOnScreenMessage(
1194  'failure',
1195  $this->lng->txt("msg_no_perm_link") . " " . implode(',', $no_cut),
1196  true
1197  );
1198  $this->ctrl->redirect($this, "");
1199  }
1200 
1201  if ($no_link !== []) {
1202  //#12203
1203  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_obj_no_link'), true);
1204  $this->ctrl->redirect($this, "");
1205  }
1206 
1207  $this->clipboard->setParent($this->requested_ref_id);
1208  $this->clipboard->setCmd($ilCtrl->getCmd());
1209  $this->clipboard->setRefIds($ids);
1210 
1211  $suffix = 'p';
1212  if (count($this->clipboard->getRefIds()) === 1) {
1213  $suffix = 's';
1214  }
1215  $this->tpl->setOnScreenMessage('info', $this->lng->txt("msg_link_clipboard_" . $suffix), true);
1216 
1218  }
ilRbacSystem $rbacsystem
$ilErr
Definition: raiseError.php:33
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 ...
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
ilErrorHandling $error
+ 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 
)

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

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

◆ pasteObject()

ilContainerGUI::pasteObject ( )

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

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

References ilObjectGUI\$ctrl, $error, $ilErr, $log, $message, $rbacadmin, $rbacsystem, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilObjectGUI\$user, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), ilRbacAdmin\adjustMovedObjectPermissions(), ilRbacSystem\checkAccess(), clearObject(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByRefId(), ilTree\getNodeData(), ilTree\getParentId(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by ilObjOrgUnitGUI\performPaste().

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

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

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

References $error, $ilErr, ilObjectGUI\$lng, $log, $message, $obj_data_cache, $rbacadmin, $rbacreview, $rbacsystem, ilObjectGUI\$ref_id, ilObjectGUI\$tree, $ui, ilObjectGUI\$user, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), ilRbacAdmin\adjustMovedObjectPermissions(), ilRbacSystem\checkAccess(), clearObject(), cloneNodes(), ILIAS\Repository\ctrl(), ILIAS\DI\UIServices\factory(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilTree\getNodeData(), ilTree\getParentId(), ilTree\getParentNodeData(), ilRbacReview\getParentRoleIds(), ilTree\getSubTree(), ilRbacLog\isActive(), ilTree\isGrandChild(), ilRbacLog\LINK_OBJECT, ILIAS\Repository\lng(), ilTree\moveTree(), null, ILIAS\DI\UIServices\renderer(), showPasteTreeObject(), and ilLanguage\txt().

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

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

◆ redrawListItemObject()

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

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

References ilObjectGUI\$html, ilObjectGUI\$id, ilObjectGUI\$tpl, ilEventItems\_getItemsOfContainer(), ilObject\_lookupObjectId(), ilObject\_lookupType(), exit, getContentGUI(), ilObjectActivation\getItemsByEvent(), ILIAS\UICore\GlobalTemplate\getOnLoadCodeForAsynch(), null, and ILIAS\Repository\object().

2143  : void
2144  {
2145  $tpl = $this->tpl;
2146 
2147  $html = null;
2148 
2149  $child_ref_id = $this->std_request->getChildRefId();
2150  $parent_ref_id = $this->std_request->getParentRefId();
2151 
2152  $item_data = $this->object->getSubItems(false, false, $child_ref_id);
2153  $container_view = $this->getContentGUI();
2154 
2155  // see #41377 (material not redrawn, when not a direct child)
2156  $sess_data = [];
2157  if (isset($this->object->items["sess"])) {
2158  $sess_data = $this->object->items["sess"]; // before #41377
2159  } elseif (ilObject::_lookupType($parent_ref_id, true) === "sess") {
2160  $sess_data[] = [
2161  "obj_id" => ilObject::_lookupObjectId($parent_ref_id)
2162  ]; // added with #41377
2163  }
2164 
2165  // list item is session material (not part of "_all"-items - see below)
2166  $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
2167  if (in_array($child_ref_id, $event_items)) {
2168  foreach (($sess_data) as $id) {
2169  $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
2170  foreach ($items as $event_item) {
2171  if ($event_item["child"] == $child_ref_id) {
2172  // sessions
2173  if ($parent_ref_id > 0) {
2174  $event_item["parent"] = $parent_ref_id;
2175  }
2176  $html = $container_view->renderItem($event_item);
2177  }
2178  }
2179  }
2180  }
2181 
2182  // "normal" list item
2183  if (!$html) {
2184  foreach (($this->object->items["_all"] ?? []) as $id) {
2185  if ($id["child"] == $child_ref_id) {
2186  $html = $container_view->renderItem($id);
2187  }
2188  }
2189  }
2190 
2191  if ($html) {
2192  echo $html;
2193 
2194  // we need to add onload code manually (rating, comments, etc.)
2195  echo $tpl->getOnLoadCodeForAsynch();
2196  }
2197 
2198  exit;
2199  }
static getItemsByEvent(int $event_id)
Get session material / event items.
static _getItemsOfContainer(int $a_ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilGlobalTemplateInterface $tpl
static _lookupObjectId(int $ref_id)
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
static _lookupType(int $id, bool $reference=false)
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ removeFromSystemObject()

ilContainerGUI::removeFromSystemObject ( )

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

References ilObjectGUI\checkPermission(), and ILIAS\Repository\ctrl().

2560  : void
2561  {
2562  $this->checkPermission("write");
2563  $ru = new ilRepositoryTrashGUI($this);
2564  $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2565  $this->ctrl->redirect($this, "trash");
2566  }
Repository GUI Utilities.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ renderBlockAsynchObject()

ilContainerGUI::renderBlockAsynchObject ( )

render the object

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

References exit, and getContentGUI().

472  : void
473  {
474  $container_view = $this->getContentGUI();
475  echo $container_view->getSingleTypeBlockAsynch(
476  $this->std_request->getType()
477  );
478  exit;
479  }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ renderObject()

ilContainerGUI::renderObject ( )

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

References ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$user, ilToolbarGUI\addButton(), ilObjectGUI\addImportButtonToToolbar(), ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), getContentGUI(), ilObjectGUI\getCreationMode(), ilObject\getId(), isActiveAdministrationPanel(), isActiveOrdering(), ILIAS\Repository\object(), setContentSubTabs(), showAdministrationPanel(), showContainerFilter(), ilMemberViewGUI\showMemberViewSwitch(), showPermanentLink(), showPossibleSubObjects(), supportsPageEditor(), and ilLanguage\txt().

Referenced by editOrderObject(), and enableMultiDownloadObject().

391  : void
392  {
393  $ilTabs = $this->tabs;
394  $ilCtrl = $this->ctrl;
396  $user = $this->user;
398  $lng = $this->lng;
399 
400  $container_view = $this->getContentGUI();
401 
402  $this->setContentSubTabs();
403  if ($this->isActiveAdministrationPanel()) {
404  if (!$this->item_presentation->canManageItems()) {
405  $this->ctrl->redirect($this, "disableAdministrationPanel");
406  }
407  $ilTabs->activateSubTab("manage");
408  } else {
409  $ilTabs->activateSubTab("view_content");
410  }
411 
412  $container_view->setOutput();
413 
414  //$this->adminCommands = $container_view->adminCommands;
415 
416  $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
417  || ($this->std_request->getCmdClass() === "");
418 
419  // it is important not to show the subobjects/admin panel here, since
420  // we will create nested forms in case, e.g. a news/calendar item is added
421  if ($is_container_cmd) {
422  $this->showAdministrationPanel();
423 
424  if (!$this->edit_order) {
425  $this->showPossibleSubObjects();
426  }
427  if ($this->isActiveAdministrationPanel()) {
428  $this->addImportButtonToToolbar();
429  }
430 
431  if (is_object($this->object) &&
432  $user->getId() !== ANONYMOUS_USER_ID &&
433  $this->rbacsystem->checkAccess("write", $this->object->getRefId())
434  ) {
435  if ($ilSetting->get("enable_cat_page_edit")) {
436  if (!$this->isActiveAdministrationPanel() &&
437  !$this->isActiveOrdering() &&
438  $this->supportsPageEditor()
439  ) {
441  $lng->txt("cntr_text_media_editor"),
442  $ilCtrl->getLinkTarget($this, "editPageFrame")
443  );
444  }
445  }
446  }
447  if (!$this->edit_order) {
448  if (!$this->isActiveAdministrationPanel() && $this->getCreationMode() === false) {
449  ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
450  }
451  }
452  }
453 
454  $this->showContainerFilter();
455 
456  $this->showPermanentLink();
457 
458  // add tree updater javascript
459  if ($this->requested_ref_id > 1 && $ilSetting->get("rep_tree_synchronize")) {
460  $ilCtrl->setParameter($this, "active_node", $this->requested_ref_id);
461  }
462  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
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
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')
ilToolbarGUI $toolbar
static showMemberViewSwitch(int $a_ref_id)
global $ilSetting
Definition: privfeed.php:31
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ restoreToNewLocationObject()

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

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

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

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

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

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

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

2363  : void
2364  {
2365  $val = ($form->getInput('list_presentation') === "tile")
2366  ? "tile"
2367  : "";
2368  ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
2370  $this->object->getId(),
2371  "tile_size",
2372  (string) ((int) $form->getInput('tile_size'))
2373  );
2374  }
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-...
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ savePasswordObject()

ilContainerGUI::savePasswordObject ( )
protected

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

References ilObjectGUI\$user, ilPropertyFormGUI\checkInput(), ILIAS\Repository\form(), initFormPasswordInstruction(), ILIAS\Repository\lng(), ilPropertyFormGUI\setValuesByPost(), and showPasswordInstructionObject().

2125  : void
2126  {
2127  $ilUser = $this->user;
2128 
2130  if ($form->checkInput()) {
2131  $ilUser->resetPassword($this->form->getInput('new_password'), $this->form->getInput('new_password'));
2132  $this->tpl->setOnScreenMessage('success', $this->lng->txt('webdav_pwd_instruction_success'), true);
2133  $this->showPasswordInstructionObject(false);
2134  return;
2135  }
2138  }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject(bool $a_init=true)
ilPropertyFormGUI $form
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

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

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

1966  : void
1967  {
1968  $sorting = ilContainerSorting::_getInstance($this->object->getId());
1969 
1970  // Allow comma
1971  $positions = $this->std_request->getPositions();
1972  $sorting->savePost($positions);
1973  $this->tpl->setOnScreenMessage('success', $this->lng->txt('cntr_saved_sorting'), true);
1974  $this->ctrl->redirect($this, "editOrder");
1975  }
static _getInstance(int $a_obj_id)
+ Here is the call graph for this function:

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

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

References ilObjectGUI\$settings, ilPropertyFormGUI\getInput(), ILIAS\Repository\object(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

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

2488  : void
2489  {
2490  $settings = new ilContainerSortingSettings($this->object->getId());
2491  $settings->setSortMode((int) $form->getInput("sorting"));
2492 
2493  switch ($form->getInput('sorting')) {
2495  $settings->setSortDirection((int) $form->getInput('title_sorting_direction'));
2496  break;
2498  $settings->setSortDirection((int) $form->getInput('activation_sorting_direction'));
2499  break;
2501  $settings->setSortDirection((int) $form->getInput('creation_sorting_direction'));
2502  break;
2504  $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
2505  $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
2506  $settings->setSortDirection((int) $form->getInput('manual_sorting_direction'));
2507  break;
2508  }
2509 
2510  $settings->update();
2511  }
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-...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setColumnSettings()

ilContainerGUI::setColumnSettings ( ilColumnGUI  $column_gui)

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

References ilObjectGUI\$access, isActiveAdministrationPanel(), ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), and ilColumnGUI\setItemPresentationManager().

1877  : void
1878  {
1879  $ilAccess = $this->access;
1880  parent::setColumnSettings($column_gui);
1881 
1882  $column_gui->setItemPresentationManager(
1883  $this->item_presentation
1884  );
1885 
1886  //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
1887  // && $this->allowBlocksConfigure())
1888  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1889  $column_gui->setBlockProperty("news", "settings", '1');
1890  //$column_gui->setBlockProperty("news", "public_notifications_option", true);
1891  $column_gui->setBlockProperty("news", "default_visibility_option", '1');
1892  $column_gui->setBlockProperty("news", "hide_news_block_option", '1');
1893  }
1894 
1895  if ($this->isActiveAdministrationPanel()) {
1896  $column_gui->setAdminCommands(true);
1897  }
1898  }
setAdminCommands(bool $a_admincommands)
setItemPresentationManager(ItemPresentationManager $item_presentation)
setBlockProperty(string $a_block_type, string $a_property, string $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...
ilAccessHandler $access
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

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

References addStandardContainerSubTabs().

Referenced by renderObject().

481  : void
482  {
484  }
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPageEditorTabs()

ilContainerGUI::setPageEditorTabs ( )

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

References ilObjectGUI\$lng, ILIAS\Repository\ctrl(), isActiveAdministrationPanel(), ILIAS\Repository\lng(), and ilLanguage\loadLanguageModule().

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

◆ setSideColumnReturn()

ilContainerGUI::setSideColumnReturn ( )

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

References ILIAS\Repository\ctrl().

2638  : void
2639  {
2640  $this->ctrl->setReturn($this, "");
2641  }
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )
protected

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

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

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

328  : void
329  {
330  if (ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
331  $this->tpl->setTitle($this->object->getTitle(), true);
332  } else {
333  parent::setTitleAndDescription();
334  }
335  }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( )

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

References ilObjectGUI\$access, $DIC, $edit_order, $GLOBALS, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\$requested_ref_id, ilObjectGUI\$toolbar, ilObjectGUI\addAvailabilityPeriodButtonToToolbar(), ilToolbarGUI\addComponent(), ilToolbarGUI\addFormButton(), ilToolbarGUI\addSeparator(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), getItemPresentation(), gotItems(), isActiveAdministrationPanel(), isActiveOrdering(), isMultiDownloadEnabled(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ilToolbarGUI\setId(), ilToolbarGUI\setLeadingImage(), ilLanguage\txt(), and ILIAS\Repository\ui().

Referenced by renderObject().

486  : void
487  {
488  global $DIC;
489 
490  $ilAccess = $this->access;
491  $lng = $this->lng;
492 
493  $main_tpl = $DIC->ui()->mainTemplate();
494 
495  $lng->loadLanguageModule('cntr');
496 
497  if ($this->clipboard->hasEntries() && !$this->edit_order) {
498  // #11545
499  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
500 
501  $toolbar = new ilToolbarGUI();
502  $toolbar->setId("admclip");
503  $this->ctrl->setParameter($this, "type", "");
504  $this->ctrl->setParameter($this, "item_ref_id", "");
505 
507  $this->ui->factory()->button()->standard(
508  $this->lng->txt('paste_clipboard_items'),
509  $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class], 'paste')
510  )
511  );
512 
514  $this->ui->factory()->button()->standard(
515  $this->lng->txt('clear_clipboard'),
516  $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class], 'clear')
517  )
518  );
519 
520  $main_tpl->addAdminPanelToolbar($toolbar, true, false);
521  } elseif ($this->isActiveAdministrationPanel()) {
522  // #11545
523  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
524  $toolbar = new ilToolbarGUI();
525  $toolbar->setId("adm");
526  $this->ctrl->setParameter($this, "type", "");
527  $this->ctrl->setParameter($this, "item_ref_id", "");
528 
529  if ($this->gotItems()) {
531  ilUtil::getImagePath("nav/arrow_upright.svg"),
532  $lng->txt("actions")
533  );
535  $this->lng->txt('delete_selected_items'),
536  'delete'
537  );
539  $this->lng->txt('move_selected_items'),
540  'cut'
541  );
543  $this->lng->txt('copy_selected_items'),
544  'copy'
545  );
547  $this->lng->txt('link_selected_items'),
548  'link'
549  );
550 
552  // add download button if multi download enabled
553  $folder_set = new ilSetting('fold');
554  if ((bool) $folder_set->get('enable_multi_download') === true) {
557  $this->lng->txt('download_selected_items'),
558  'download'
559  );
560  }
561  }
562  $main_tpl->addAdminPanelToolbar(
563  $toolbar,
564  $this->gotItems() && !$this->clipboard->hasEntries(),
565  $this->gotItems() && !$this->clipboard->hasEntries()
566  );
567 
568  // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
569  if ($this->gotItems()) {
570  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
571  }
572  } elseif ($this->edit_order) {
573  if ($this->getItemPresentation()->hasItems() && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
574  if ($this->isActiveOrdering()) {
575  // #11843
576  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
577 
578  $toolbar = new ilToolbarGUI();
579  $this->ctrl->setParameter($this, "type", "");
580  $this->ctrl->setParameter($this, "item_ref_id", "");
581 
583  $this->lng->txt('sorting_save'),
584  'saveSorting'
585  );
586 
587  $main_tpl->addAdminPanelToolbar($toolbar, true, false);
588  }
589  }
590  }
591  // bugfix mantis 24559
592  // undoing an erroneous change inside mantis 23516 by adding "Download Multiple Objects"-functionality for non-admins
593  // as they don't have the possibility to use the multi-download-capability of the manage-tab
594  elseif ($this->isMultiDownloadEnabled()) {
595  // bugfix mantis 0021272
597  $num_files = $this->tree->getChildsByType($ref_id, "file");
598  $num_folders = $this->tree->getChildsByType($ref_id, "fold");
599  if (count($num_files) > 0 || count($num_folders) > 0) {
600  // #11843
601  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
602 
603  $toolbar = new ilToolbarGUI();
604  $this->ctrl->setParameter($this, "type", "");
605  $this->ctrl->setParameter($this, "item_ref_id", "");
606 
608  $this->lng->txt('download_selected_items'),
609  'download'
610  );
611 
612  $GLOBALS['tpl']->addAdminPanelToolbar(
613  $toolbar,
614  $this->gotItems(),
615  $this->gotItems()
616  );
617  } else {
618  $this->tpl->setOnScreenMessage('info', $this->lng->txt('msg_no_downloadable_objects'), true);
619  }
620  }
621  }
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...
addComponent(\ILIAS\UI\Component\Component $a_comp)
setLeadingImage(string $a_img, string $a_alt)
loadLanguageModule(string $a_module)
Load language module.
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
setId(string $a_val)
ilLanguage $lng
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:22
ilToolbarGUI $toolbar
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
addAvailabilityPeriodButtonToToolbar(ilToolbarGUI $toolbar)
ilAccessHandler $access
addFormButton(string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showContainerFilter()

ilContainerGUI::showContainerFilter ( )
protected

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

References $DIC, $renderer, ilObjectGUI\$tpl, ilContainer\_lookupContainerSetting(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setOnScreenMessage().

Referenced by renderObject().

2670  : void
2671  {
2672  global $DIC;
2673  if (!is_null($this->ui_filter)) {
2674  $renderer = $DIC->ui()->renderer();
2675 
2676  $main_tpl = $this->tpl;
2677  $main_tpl->setFilter($renderer->render($this->ui_filter));
2678  if ($this->container_user_filter->isEmpty() && !ilContainer::_lookupContainerSetting(
2679  $this->object->getId(),
2680  "filter_show_empty",
2681  '0'
2682  )) {
2683  $this->tpl->setOnScreenMessage('info', $this->lng->txt("cont_filter_empty"));
2684  }
2685  }
2686  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
$renderer
ilGlobalTemplateInterface $tpl
global $DIC
Definition: shib_login.php:22
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showContainerPageTabs()

ilContainerGUI::showContainerPageTabs ( )
protected

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

References ilObjectGUI\$ctrl, $tabs, ilTabsGUI\clearTargets(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilTabsGUI\setBackTarget().

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

2071  : void
2072  {
2073  $ctrl = $this->ctrl;
2074  $tabs = $this->tabs;
2075  $tabs->clearTargets();
2076  $page_gui = new ilContainerPageGUI($this->object->getId());
2077  $tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($page_gui, "edit"));
2078  }
Container page GUI class.
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

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

References ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObjectGUI\$type, exit, ilTree\getChilds(), ilUtil\getStyleSheetLocation(), ILIAS\Repository\int(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\printToStdout(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ilLanguage\txt().

652  : void
653  {
654  $lng = $this->lng;
655  $tree = $this->tree;
656 
657  $cnt = [];
658 
659  $tpl = new ilGlobalTemplate(
660  "tpl.container_link_help.html",
661  true,
662  true,
663  "components/ILIAS/Container"
664  );
665 
666  $type_ordering = [
667  "cat",
668  "fold",
669  "crs",
670  "grp",
671  "chat",
672  "frm",
673  "lres",
674  "glo",
675  "webr",
676  "file",
677  "exc",
678  "tst",
679  "svy",
680  "mep",
681  "qpl",
682  "spl"
683  ];
684 
685  $childs = $tree->getChilds($this->requested_ref_id);
686  foreach ($childs as $child) {
687  if (in_array($child["type"], ["lm", "sahs", "htlm"])) {
688  $cnt["lres"]++;
689  } else {
690  $cnt[$child["type"]]++;
691  }
692  }
693 
694  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
695  $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
696  foreach ($type_ordering as $type) {
697  $tpl->setCurrentBlock("row");
698  if ($type !== "lres") {
699  $tpl->setVariable(
700  "TYPE",
701  $lng->txt("objs_" . $type) .
702  " (" . ((int) $cnt[$type]) . ")"
703  );
704  } else {
705  $tpl->setVariable(
706  "TYPE",
707  $lng->txt("obj_lrss") .
708  " (" . ((int) $cnt["lres"]) . ")"
709  );
710  }
711  $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
713  }
714  $tpl->printToStdout();
715  exit;
716  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
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...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
special template class to simplify handling of ITX/PEAR
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

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

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

References $DIC, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ILIAS\Repository\form(), ilWebDAVUriBuilder\getUriToMountInstructionModalByRef(), initFormPasswordInstruction(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

Referenced by savePasswordObject().

2082  : void {
2083  global $DIC;
2084  $tpl = $this->tpl;
2085  $ilToolbar = $this->toolbar;
2086 
2087  if ($a_init) {
2088  $this->tpl->setOnScreenMessage('info', $this->lng->txt('webdav_pwd_instruction'));
2089  $this->initFormPasswordInstruction();
2090  }
2091 
2092  $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
2093  $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
2094 
2095  $this->gui->button(
2096  $this->lng->txt("mount_webfolder"),
2097  "#"
2098  )->onClick("triggerWebDAVModal('$href'); return false;")->toToolbar();
2099 
2100  $tpl->setContent($this->form->getHTML());
2101  }
setContent(string $a_html)
Sets content for standard template.
initFormPasswordInstruction()
Init password form.
ilGlobalTemplateInterface $tpl
global $DIC
Definition: shib_login.php:22
ilToolbarGUI $toolbar
form( $class_path, string $cmd, string $submit_caption="")
getUriToMountInstructionModalByRef(int $a_ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

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

References $error, $ilErr, $message, $tabs, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), getTreeSelectorGUI(), and ILIAS\Repository\lng().

Referenced by ilObjLearningSequenceGUI\executeCommand(), initAndDisplayCopyIntoMultipleObjectsObject(), initAndDisplayLinkIntoMultipleObjectsObject(), initAndDisplayMoveIntoObjectObject(), and performPasteIntoMultipleObjectsObject().

1529  : void
1530  {
1531  $ilTabs = $this->tabs;
1532  $ilErr = $this->error;
1533 
1534  $ilTabs->setTabActive('view_content');
1535 
1536  if (!in_array($this->clipboard->getCmd(), ['link', 'copy', 'cut'])) {
1537  $message = __METHOD__ . ": Unknown action.";
1538  $ilErr->raiseError($message, $ilErr->WARNING);
1539  }
1540  $cmd = $this->clipboard->getCmd();
1541 
1542  //
1543  $exp = $this->getTreeSelectorGUI($cmd);
1544  if ($exp->handleCommand()) {
1545  return;
1546  }
1547  $output = $exp->getHTML();
1548 
1549  $txt_var = ($cmd === "copy")
1550  ? "copy"
1551  : "paste";
1552 
1553  // toolbars
1554  $t = new ilToolbarGUI();
1555  $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
1556 
1557  $this->gui->button(
1558  $this->lng->txt($txt_var),
1559  "performPasteIntoMultipleObjects"
1560  )->submit()->toToolbar(true, $t);
1561 
1562  $t->addSeparator();
1563  $this->lng->loadLanguageModule('obj');
1564  $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
1565 
1566  $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
1567  $t->setCloseFormTag(false);
1568  $t->setLeadingImage(ilUtil::getImagePath("nav/arrow_upright.svg"), " ");
1569  $output = $t->getHTML() . $output;
1570  $t->setLeadingImage(ilUtil::getImagePath("nav/arrow_downright.svg"), " ");
1571  $t->setCloseFormTag(true);
1572  $t->setOpenFormTag(false);
1573  $output .= "<br />" . $t->getHTML();
1574 
1575  $this->tpl->setContent($output);
1576  }
getTreeSelectorGUI(string $cmd)
$ilErr
Definition: raiseError.php:33
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ilErrorHandling $error
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( )

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

References $DIC, ilObjectGUI\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setPermanentLink().

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

628  : void
629  {
630  global $DIC;
631 
632  $tpl = $DIC->ui()->mainTemplate();
633 
635  $this->object->getType(),
636  $this->object->getRefId(),
637  "",
638  "_top"
639  );
640  }
ilGlobalTemplateInterface $tpl
global $DIC
Definition: shib_login.php:22
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilContainerGUI::showPossibleSubObjects ( )
protected

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

References ilObjectGUI\buildAddNewItemElements(), ilObjectGUI\getCreatableObjectTypes(), and isActiveOrdering().

Referenced by renderObject().

337  : void
338  {
339  if ($this->isActiveOrdering()) {
340  return;
341  }
344  );
345  $gui->render();
346  }
buildAddNewItemElements(array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
Render add new item selector.
ILIAS Container InternalGUIService $gui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsPageEditor()

ilContainerGUI::supportsPageEditor ( )
protected

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

Referenced by renderObject().

464  : bool
465  {
466  return true;
467  }
+ Here is the caller graph for this function:

◆ trashApplyFilterObject()

ilContainerGUI::trashApplyFilterObject ( )

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

References trashHandleFilter().

2536  : void
2537  {
2538  $this->trashHandleFilter(true, false);
2539  }
trashHandleFilter(bool $action_apply, bool $action_reset)
+ Here is the call graph for this function:

◆ trashHandleFilter()

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

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

References ilTrashTableGUI\init(), ILIAS\Repository\object(), and trashObject().

Referenced by trashApplyFilterObject(), and trashResetFilterObject().

2546  : void
2547  {
2548  $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2549  $trash_table->init();
2550  $trash_table->resetOffset();
2551  if ($action_reset) {
2552  $trash_table->resetFilter();
2553  }
2554  if ($action_apply) {
2555  $trash_table->writeFilterToSession();
2556  }
2557  $this->trashObject();
2558  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trashObject()
Show trash content of object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

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

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilTrashTableGUI\init(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\setContent(), and ILIAS\UICore\GlobalTemplate\setOnScreenMessage().

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

2516  : void
2517  {
2518  $this->checkPermission("write");
2519  $tpl = $this->tpl;
2520 
2521  $this->tabs_gui->activateTab('trash');
2522 
2523  $this->lng->loadLanguageModule('cont');
2524  $tpl->setOnScreenMessage('info', $this->lng->txt('cont_trash_general_usage'));
2525 
2526  $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2527  $trash_table->init();
2528  $trash_table->parse();
2529 
2530  $trash_table->setFilterCommand('trashApplyFilter');
2531  $trash_table->setResetCommand('trashResetFilter');
2532 
2533  $tpl->setContent($trash_table->getHTML());
2534  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trashResetFilterObject()

ilContainerGUI::trashResetFilterObject ( )

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

References trashHandleFilter().

2541  : void
2542  {
2543  $this->trashHandleFilter(false, true);
2544  }
trashHandleFilter(bool $action_apply, bool $action_reset)
+ Here is the call graph for this function:

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

References ILIAS\Repository\ctrl().

Referenced by ilObjLearningSequenceGUI\executeCommand().

2579  : void
2580  {
2581  $ru = new ilRepositoryTrashGUI($this);
2582  $ru->restoreObjects(
2583  $this->requested_ref_id,
2584  $this->std_request->getTrashIds()
2585  );
2586  $this->ctrl->redirect($this, "trash");
2587  }
Repository GUI Utilities.
+ 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 57 of file class.ilContainerGUI.php.

◆ $app_event_handler

ilAppEventHandler ilContainerGUI::$app_event_handler
protected

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

Referenced by ilObjLearningSequenceGUI\afterSave().

◆ $bl_cnt

int ilContainerGUI::$bl_cnt = 1

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

◆ $clipboard

ClipboardManager ilContainerGUI::$clipboard
protected

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

◆ $component_factory

ilComponentFactory ilContainerGUI::$component_factory
protected

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

◆ $container_filter_service

ilContainerFilterService ilContainerGUI::$container_filter_service
protected

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

Referenced by initFilter().

◆ $container_user_filter

ilContainerUserFilter ilContainerGUI::$container_user_filter = null
protected

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

◆ $content_style_domain

ILIAS Style Content DomainService ilContainerGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilContainerGUI::$content_style_gui
protected

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

◆ $current_position

int ilContainerGUI::$current_position = 0
protected

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

◆ $domain

ILIAS Container InternalDomainService ilContainerGUI::$domain
protected

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

◆ $edit_order

bool ilContainerGUI::$edit_order = false
protected

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

Referenced by isActiveOrdering(), and showAdministrationPanel().

◆ $error

◆ $form

◆ $global_screen

Services ilContainerGUI::$global_screen
protected

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

◆ $gui

◆ $item_presentation

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

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

Referenced by getItemPresentation().

◆ $log

◆ $mode_manager

ModeManager ilContainerGUI::$mode_manager = null
protected

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

Referenced by getModeManager().

◆ $multi_download_enabled

bool ilContainerGUI::$multi_download_enabled = false

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

Referenced by isMultiDownloadEnabled().

◆ $obj_data_cache

ilObjectDataCache ilContainerGUI::$obj_data_cache
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $obj_definition

ilObjectDefinition ilContainerGUI::$obj_definition
protected

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

Referenced by copyObject().

◆ $rbacadmin

ilRbacAdmin ilContainerGUI::$rbacadmin
protected

◆ $rbacreview

◆ $rbacsystem

◆ $requested_redirectSource

string ilContainerGUI::$requested_redirectSource = ""
protected

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

◆ $std_request

StandardGUIRequest ilContainerGUI::$std_request
protected

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

◆ $tabs

◆ $ui

UIServices ilContainerGUI::$ui
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $ui_filter

Standard ilContainerGUI::$ui_filter = null
protected

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


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