ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables 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 ()
 
 prepareOutput (bool $show_subobjects=true)
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 
 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 ()
 
 getAsynchItemListObject ()
 
 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
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 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 ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 

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

Protected Member Functions

 getEditFormValues ()
 
 afterUpdate ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 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 ()
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
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
 
ViewManager $view_manager
 
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
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
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 2038 of file class.ilContainerGUI.php.

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

2041  : string {
2042  global $DIC;
2043 
2044  $tree = $DIC->repositoryTree();
2045  $path = "";
2046 
2047  $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2048  $counter = 0;
2049  foreach ($path_arr as $data) {
2050  if ($counter++) {
2051  $path .= " > ";
2052  }
2053  $path .= $data['title'];
2054  }
2055 
2056  return $path;
2057  }
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:32
global $DIC
Definition: feed.php:28
+ 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 695 of file class.ilContainerGUI.php.

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

699  : void {
700  $icon = ilUtil::getImagePath("icon_" . $a_type . ".svg");
701  $title = $this->lng->txt("objs_" . $a_type);
702 
703  if ($a_show_image) {
704  $a_tpl->setCurrentBlock("container_header_row_image");
705  $a_tpl->setVariable("HEADER_IMG", $icon);
706  $a_tpl->setVariable("HEADER_ALT", $title);
707  } else {
708  $a_tpl->setCurrentBlock("container_header_row");
709  }
710 
711  $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
712  $a_tpl->parseCurrentBlock();
713  //$a_tpl->touchBlock("container_row");
714  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
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 771 of file class.ilContainerGUI.php.

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

775  : void {
776  $type = $this->lng->txt("obj_" . $a_type);
777  $a_message = str_replace("[type]", $type, $a_message);
778 
779  $a_tpl->setVariable("ROW_NBSP", " ");
780 
781  $a_tpl->setCurrentBlock("container_standard_row");
782  $a_tpl->setVariable(
783  "BLOCK_ROW_CONTENT",
784  $a_message
785  );
786  $a_tpl->parseCurrentBlock();
787  $a_tpl->touchBlock("container_row");
788  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

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

References ilObjectGUI\$ctrl, and $tabs.

246  : void
247  {
248  $ilTabs = $this->tabs;
249  $ilCtrl = $this->ctrl;
250 
251  $ilTabs->addTarget(
252  "obj_sty",
253  $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", ''),
254  "editStyleProperties",
255  "ilobjectcontentstylesettingsgui"
256  );
257  }

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs ( bool  $a_include_view = true)

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

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

References ilObjectGUI\$ctrl, $ilUser, ilObjectGUI\$lng, $tabs, ilObjectGUI\$user, ANONYMOUS_USER_ID, isActiveAdministrationPanel(), ILIAS\Repository\object(), and ilLanguage\txt().

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

825  : void {
826  $ilTabs = $this->tabs;
827  $lng = $this->lng;
828  $ilCtrl = $this->ctrl;
830 
831  if (!is_object($this->object)) {
832  return;
833  }
834 
835  if ($a_include_view && $this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
836  if (!$this->isActiveAdministrationPanel()) {
837  $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass(static::class, "view"));
838  } else {
839  $ilTabs->addSubTab(
840  "view_content",
841  $lng->txt("view"),
842  $ilCtrl->getLinkTarget($this, "disableAdministrationPanel")
843  );
844  }
845  }
846 
847  if ($ilUser->getId() !== ANONYMOUS_USER_ID &&
848  (
849  $this->adminCommands ||
850  (is_object($this->object) &&
851  ($this->rbacsystem->checkAccess("write", $this->object->getRefId())))
852  ||
853  (is_object($this->object) &&
854  ($this->object->getHiddenFilesFound())) ||
855  $this->clipboard->hasEntries()
856  )
857  ) {
858  if ($this->isActiveAdministrationPanel()) {
859  $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
860  } else {
861  $ilTabs->addSubTab(
862  "manage",
863  $lng->txt("cntr_manage"),
864  $ilCtrl->getLinkTarget($this, "enableAdministrationPanel")
865  );
866  }
867  }
868  if (is_object($this->object) &&
869  $ilUser->getId() !== ANONYMOUS_USER_ID &&
870  $this->rbacsystem->checkAccess("write", $this->object->getRefId()) /* &&
871  $this->object->getOrderType() == ilContainer::SORT_MANUAL */ // always on because of custom block order
872  ) {
873  $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
874  }
875  }
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
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

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

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

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

164  : void
165  {
166  // check if template is changed
168  $this->object->getRefId()
169  );
170  $new_tpl_id = $this->getDidacticTemplateVar('dtpl');
171 
172  if ($new_tpl_id !== $current_tpl_id) {
173  // redirect to didactic template confirmation
174  $this->ctrl->setReturn($this, 'edit');
175  $this->ctrl->setCmdClass('ildidactictemplategui');
176  $this->ctrl->setCmd('confirmTemplateSwitch');
177  $dtpl_gui = new ilDidacticTemplateGUI($this, $new_tpl_id);
178  $this->ctrl->forwardCommand($dtpl_gui);
179  return;
180  }
181  parent::afterUpdate();
182  }
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
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:

◆ allowBlocksConfigure()

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

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

1905  : bool
1906  {
1907  return true;
1908  }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

1897  : bool
1898  {
1899  return true;
1900  }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

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

Referenced by ilObjOrgUnitGUI\executeCommand().

1575  : void
1576  {
1577  $ilCtrl = $this->ctrl;
1578 
1579  $this->clipboard->clear();
1580  $ilCtrl->returnToParent($this);
1581  }
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 619 of file class.ilContainerGUI.php.

References ILIAS\Repository\ctrl().

619  : void
620  {
621  $this->ctrl->redirect($this, "");
622  }
+ Here is the call graph for this function:

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

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

690  : void
691  {
692  $this->adminCommands = false;
693  }

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

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

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

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

1214  : void
1215  {
1216  $this->clipboard->clear();
1217 
1218  //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1219 
1220  // only redirect if clipboard was cleared
1221  if ($this->ctrl->getCmd() === "clear") {
1222  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_clear_clipboard"), true);
1223  // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1224  $this->ctrl->redirect($this, 'render');
1225  }
1226  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

Definition at line 1803 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(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

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

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

Definition at line 1915 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().

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

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

Referenced by performPasteIntoMultipleObjectsObject().

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

◆ competencesObject()

ilContainerGUI::competencesObject ( )

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

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

2755  : void
2756  {
2757  $ctrl = $this->ctrl;
2758 
2759  $ctrl->redirectByClass(["ilContainerSkillGUI", "ilContSkillPresentationGUI"]);
2760  }
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 2624 of file class.ilContainerGUI.php.

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

2624  : void
2625  {
2626  $lng = $this->lng;
2627  $this->checkPermission("write");
2628  if (count($this->std_request->getTrashIds()) == 0) {
2629  $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
2630  $this->ctrl->redirect($this, "trash");
2631  }
2632 
2633  $ru = new ilRepositoryTrashGUI($this);
2634  $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2635  }
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 1025 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().

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

967  : void
968  {
970  $ilCtrl = $this->ctrl;
972 
973  $ids = $this->std_request->getSelectedIds();
974  $no_cut = [];
975 
976  if (count($ids) === 0) {
977  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
978  $this->ctrl->redirect($this, "");
979  }
980 
981  // FOR ALL OBJECTS THAT SHOULD BE COPIED
982  foreach ($ids as $ref_id) {
983  // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
984  $node_data = $this->tree->getNodeData($ref_id);
985  $subtree_nodes = $this->tree->getSubTree($node_data);
986 
987  $all_node_data[] = $node_data;
988  $all_subtree_nodes[] = $subtree_nodes;
989 
990  // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
991  foreach ($subtree_nodes as $node) {
992  if ($node['type'] === 'rolf') {
993  continue;
994  }
995 
996  if (!$rbacsystem->checkAccess('delete', $node["ref_id"])) {
997  $no_cut[] = $node["ref_id"];
998  }
999  }
1000  }
1001  // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1002  if (count($no_cut)) {
1003  $titles = [];
1004  foreach ($no_cut as $cut_id) {
1005  $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($cut_id));
1006  }
1007  $ilErr->raiseError(
1008  $this->lng->txt("msg_no_perm_cut") . " " . implode(',', $titles),
1009  $ilErr->MESSAGE
1010  );
1011  }
1012  $this->clipboard->setParent($this->requested_ref_id);
1013  $this->clipboard->setCmd($ilCtrl->getCmd());
1014  $this->clipboard->setRefIds($this->std_request->getSelectedIds());
1015 
1016  $this->tpl->setOnScreenMessage('info', $this->lng->txt("msg_cut_clipboard"), true);
1017 
1019  }
ilRbacSystem $rbacsystem
$ilErr
Definition: raiseError.php:17
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 918 of file class.ilContainerGUI.php.

References ILIAS\Repository\ctrl().

918  : void
919  {
920  $this->view_manager->setContentView();
921  $this->ctrl->redirect($this, "render");
922  }
+ Here is the call graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

Definition at line 1106 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().

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

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

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

References $tabs, and renderObject().

924  : void
925  {
926  $ilTabs = $this->tabs;
927  $this->edit_order = true;
928  $this->view_manager->setContentView();
929  $this->renderObject();
930 
931  $ilTabs->activateSubTab("ordering");
932  }
+ Here is the call graph for this function:

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

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

References ILIAS\Repository\ctrl().

614  : void
615  {
616  $this->ctrl->redirectByClass([static::class, "ilcontainerpagegui"], "edit");
617  }
+ Here is the call graph for this function:

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

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

2060  : void
2061  {
2062  $this->content_style_gui
2063  ->redirectToObjectSettings();
2064  }

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

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

References ILIAS\Repository\ctrl().

912  : void
913  {
914  $this->view_manager->setAdminView();
915  $this->ctrl->redirect($this, "render");
916  }
+ Here is the call graph for this function:

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

References renderObject().

952  : void
953  {
954  $this->multi_download_enabled = true;
955  $this->renderObject();
956  }
+ Here is the call graph for this function:

◆ executeCommand()

ilContainerGUI::executeCommand ( )

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

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

128  : void
129  {
130  $tpl = $this->tpl;
131 
132  $next_class = $this->ctrl->getNextClass();
133  $cmd = $this->ctrl->getCmd("render");
134 
135  switch ($next_class) {
136  // page editing
137  case "ilcontainerpagegui":
138  if ($this->requested_redirectSource !== "ilinternallinkgui") {
139  $ret = $this->forwardToPageObject();
140  $tpl->setContent($ret);
141  } else {
142  return;
143  }
144  break;
145 
146  default:
147  $this->prepareOutput();
148  $cmd .= "Object";
149  $this->$cmd();
150  break;
151  }
152  }
prepareOutput(bool $show_subobjects=true)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ forwardToPageObject()

ilContainerGUI::forwardToPageObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilPageObject\_exists(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), exit, ilCtrl\getCmd(), 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().

185  : string
186  {
187  $lng = $this->lng;
188  $ilTabs = $this->tabs;
189  $ilCtrl = $this->ctrl;
190  $cmd = $ilCtrl->getCmd();
191  if (in_array($cmd, ["displayMediaFullscreen", "downloadFile", "displayMedia"])) {
192  $this->checkPermission("read");
193  } else {
194  $this->checkPermission("write");
195  }
196 
197  $ilTabs->clearTargets();
198 
199  if ($this->requested_redirectSource === "ilinternallinkgui") {
200  exit;
201  }
202 
203  $ilTabs->setBackTarget(
204  $lng->txt("back"),
205  $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "edit")
206  );
207 
208  // page object
209 
210  $lng->loadLanguageModule("content");
211  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
212  // $this->tpl->setCurrentBlock("SyntaxStyle");
213  $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath());
214  // $this->tpl->parseCurrentBlock();
215 
217  "cont",
218  $this->object->getId()
219  )) {
220  // doesn't exist -> create new one
221  $new_page_object = new ilContainerPage();
222  $new_page_object->setParentId($this->object->getId());
223  $new_page_object->setId($this->object->getId());
224  $new_page_object->createFromXML();
225  }
226 
227  // get page object
228  $page_gui = new ilContainerPageGUI($this->object->getId());
229  $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
230  $page_gui->setStyleId(
231  $style->getEffectiveStyleId()
232  );
233 
234  $page_gui->setTemplateTargetVar("ADM_CONTENT");
235  $page_gui->setFileDownloadLink("");
236  //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
237  $page_gui->setPresentationTitle("");
238  $page_gui->setTemplateOutput(false);
239 
240  // style tab
241  $page_gui->setTabHook($this, "addPageTabs");
242 
243  return $this->ctrl->forwardCommand($page_gui);
244  }
exit
Definition: login.php:28
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCmd(string $fallback_command=null)
loadLanguageModule(string $a_module)
Load language module.
setStyleId(int $a_styleid)
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
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 2723 of file class.ilContainerGUI.php.

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

2723  : void
2724  {
2725  if ($this->checkPermissionBool("visible,read")) {
2726  $this->tabs_gui->addTab(
2727  'view',
2728  $this->lng->txt('view'),
2729  $this->ctrl->getLinkTarget($this, 'view')
2730  );
2731  }
2732 
2733  // Always show container trash
2734  $this->tabs_gui->addTab(
2735  'trash',
2736  $this->lng->txt('trash'),
2737  $this->ctrl->getLinkTarget($this, 'trash')
2738  );
2739 
2740  if ($this->checkPermissionBool("edit_permission")) {
2741  $this->tabs_gui->addTab(
2742  'perm_settings',
2743  $this->lng->txt('perm_settings'),
2744  $this->ctrl->getLinkTargetByClass(
2745  [
2746  get_class($this),
2747  'ilpermissiongui'
2748  ],
2749  'perm'
2750  )
2751  );
2752  }
2753  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ getAsynchItemListObject()

ilContainerGUI::getAsynchItemListObject ( )

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

References ilObjectGUI\$data, ilObjectGUI\$html, ilObjectGUI\$obj_id, XapiProxy\$plugin, ilObjectGUI\$ref_id, XapiProxy\$resp, ilObjectGUI\$type, ilObjectListGUIFactory\_getListGUIByType(), ilObject\_lookupObjId(), ilObject\_lookupType(), exit, ilUIHookPluginGUI\KEEP, and modifyItemGUI().

2075  : void
2076  {
2077  $ref_id = $this->std_request->getCmdRefId();
2080 
2081  // this should be done via container-object->getSubItem in the future
2082  $data = [
2083  "child" => $ref_id,
2084  "ref_id" => $ref_id,
2085  "obj_id" => $obj_id,
2086  "type" => $type
2087  ];
2089  $item_list_gui->setContainerObject($this);
2090 
2091  $item_list_gui->enableComments(true);
2092  $item_list_gui->enableNotes(true);
2093  $item_list_gui->enableTags(true);
2094 
2095  $this->modifyItemGUI($item_list_gui, $data);
2096  $html = $item_list_gui->getListItemHTML(
2097  $ref_id,
2098  $obj_id,
2099  "",
2100  "",
2101  true,
2102  true
2103  );
2104 
2105  // include plugin slot for async item list
2106  foreach ($this->component_factory->getActivePluginsInSlot("uihk") as $plugin) {
2107  $gui_class = $plugin->getUIClassInstance();
2108  $resp = $gui_class->getHTML("Services/Container", "async_item_list", ["html" => $html]);
2109  if ((string) $resp["mode"] !== ilUIHookPluginGUI::KEEP) {
2110  $html = $gui_class->modifyHTML($html, $resp);
2111  }
2112  }
2113 
2114  echo $html;
2115  exit;
2116  }
exit
Definition: login.php:28
static _lookupObjId(int $ref_id)
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
static _lookupType(int $id, bool $reference=false)
modifyItemGUI(ilObjectListGUI $a_item_list_gui, array $a_item_data)
+ Here is the call graph for this function:

◆ getBucketTitle()

ilContainerGUI::getBucketTitle ( )

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

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

Referenced by downloadObject().

1144  : string
1145  {
1146  return ilFileUtils::getASCIIFilename($this->object->getTitle());
1147  }
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 259 of file class.ilContainerGUI.php.

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

259  : string
260  {
263 
264  if (!$ilSetting->get("enable_cat_page_edit") || $this->object->filteredSubtree()) {
265  return "";
266  }
267 
268  // if page does not exist, return nothing
270  "cont",
271  $this->object->getId()
272  )) {
273  return "";
274  }
275  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
276  $this->tpl->setCurrentBlock("SyntaxStyle");
277  $this->tpl->setVariable(
278  "LOCATION_SYNTAX_STYLESHEET",
280  );
281  $this->tpl->parseCurrentBlock();
282 
283  // get page object
284  $ot = ilObjectTranslation::getInstance($this->object->getId());
285  $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
286  $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
287  $style = $this->content_style_domain->styleForRefId($this->object->getRefId());
288  $page_gui->setStyleId($style->getEffectiveStyleId());
289 
290  $page_gui->setPresentationTitle("");
291  $page_gui->setTemplateOutput(false);
292  $page_gui->setHeader("");
293  $ret = $page_gui->showPage();
294 
295  //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
296 
297  //$ret =& $page_gui->executeCommand();
298  return $ret;
299  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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:26
global $ilSetting
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:34
ilSetting $settings
+ Here is the call graph for this function:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

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

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

Referenced by redrawListItemObject(), renderBlockAsynchObject(), renderObject(), and ilObjOrgUnitGUI\view().

339  {
340  $view_mode = $this->object->getViewMode();
341  if ($this->object->filteredSubtree()) {
342  $view_mode = ilContainer::VIEW_SIMPLE;
343  }
344  switch ($view_mode) {
345  // all items in one block
347  $container_view = new ilContainerSimpleContentGUI($this);
348  break;
349 
351  $container_view = new ilContainerObjectiveGUI($this);
352  break;
353 
354  // all items in one block
356  case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
357  $container_view = new ilContainerSessionsContentGUI($this);
358  break;
359 
360  // all items in one block
362  default:
363  $container_view = new ilContainerByTypeContentGUI($this, $this->container_user_filter);
364  break;
365  }
366  return $container_view;
367  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Parent class of all container content GUIs.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

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

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

Referenced by ilObjFolderGUI\editObject().

154  : array
155  {
156  $values = parent::getEditFormValues();
157 
158  $values['didactic_type'] =
159  'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
160 
161  return $values;
162  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilContainerGUI::getTabs ( )
protected

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

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

877  : void
878  {
880  $ilCtrl = $this->ctrl;
881 
882  // edit permissions
883  if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
884  $this->tabs_gui->addTarget(
885  "perm_settings",
886  $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], "perm"),
887  ["perm", "info", "owner"],
888  'ilpermissiongui'
889  );
890  if ($ilCtrl->getNextClass() === "ilpermissiongui") {
891  $this->tabs_gui->activateTab("perm_settings");
892  }
893  }
894 
895  // show clipboard
896  if (strtolower($this->std_request->getBaseClass()) === "ilrepositorygui" &&
897  $this->clipboard->hasEntries()) {
898  $this->tabs_gui->addTarget(
899  "clipboard",
900  $this->ctrl->getLinkTarget($this, "clipboard"),
901  "clipboard",
902  get_class($this)
903  );
904  }
905  }
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 2637 of file class.ilContainerGUI.php.

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

Referenced by showPasteTreeObject().

2638  {
2639  $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
2640  // TODO: The study programme 'prg' is not included here, as the
2641  // ilRepositorySelectorExplorerGUI only handles static rules for
2642  // parent-child-relations and not the dynamic relationsships
2643  // required for the SP (see #16909).
2644  $exp->setTypeWhiteList(["root", "cat", "grp", "crs", "fold"]);
2645 
2646  // Not all types are allowed in the LearningSequence
2647  // Extend whitelist, if all selected types are possible subojects of LSO
2648  if (in_array($this->clipboard->getCmd(), ["link", "cut"])) {
2649  $lso_types = array_keys($this->obj_definition->getSubObjects('lso'));
2650  $refs = $this->clipboard->getRefIds();
2651  $allow_lso = true;
2652  foreach ($refs as $item_ref_id) {
2653  $type = ilObject::_lookupType($item_ref_id, true);
2654  if (!in_array($type, $lso_types)) {
2655  $allow_lso = false;
2656  }
2657  }
2658  if ($allow_lso) {
2659  $whitelist = $exp->getTypeWhiteList();
2660  $whitelist[] = 'lso';
2661  $exp->setTypeWhiteList($whitelist);
2662  }
2663  }
2664 
2665  if ($cmd === "link") {
2666  $exp->setSelectMode("nodes", true);
2667  } else {
2668  $exp->setSelectMode("nodes[]", false);
2669  }
2670  return $exp;
2671  }
Explorer for selecting repository items.
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:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

References showPasteTreeObject().

Referenced by copyObject().

1591  : void
1592  {
1593  $this->showPasteTreeObject();
1594  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

References showPasteTreeObject().

Referenced by linkObject().

1515  : void
1516  {
1517  $this->showPasteTreeObject();
1518  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

References showPasteTreeObject().

Referenced by cutObject().

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

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

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

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

2240  {
2241  $lng = $this->lng;
2242  $lng->loadLanguageModule($this->object->getType());
2243 
2244  $form = new ilPropertyFormGUI();
2245  $form->setFormAction($this->ctrl->getFormAction($this, "update"));
2246  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
2247 
2248  $this->initFormTitleDescription($form);
2249 
2250  $this->initEditCustomForm($form);
2251 
2252  $form->addCommandButton("update", $this->lng->txt("save"));
2253 
2254  return $form;
2255  }
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 2678 of file class.ilContainerGUI.php.

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

2678  : void
2679  {
2680  global $DIC;
2681 
2682  if (!$this->object || !ilContainer::_lookupContainerSetting($this->object->getId(), "filter", '0')) {
2683  return;
2684  }
2685 
2686  if ($this->isActiveOrdering() || $this->ctrl->getCmd() === "editOrder") {
2687  return;
2688  }
2689 
2690  $filter_service = $this->container_filter_service;
2691  $request = $DIC->http()->request();
2692 
2693  $filter = $filter_service->util()->getFilterForRefId(
2694  $this->ref_id,
2695  $DIC->ctrl()->getLinkTarget($this, "render", "", true),
2697  );
2698 
2699  $filter_data = $DIC->uiService()->filter()->getData($filter);
2700 
2701  $this->container_user_filter = $filter_service->userFilter($filter_data);
2702  $this->ui_filter = $filter;
2703  }
ilContainerFilterService $container_filter_service
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
global $DIC
Definition: feed.php:28
ServerRequestInterface $request
+ Here is the call graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

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

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

Referenced by savePasswordObject(), and showPasswordInstructionObject().

2145  {
2146  $this->form = new ilPropertyFormGUI();
2147  $this->form->setFormAction($this->ctrl->getFormAction($this));
2148 
2149  // new password
2150  $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
2151  $ipass->setRequired(true);
2152 
2153  $this->form->addItem($ipass);
2154  $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
2155  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
2156 
2157  $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
2158  $this->form->setFormAction($this->ctrl->getFormAction($this));
2159 
2160  return $this->form;
2161  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRequired(bool $a_required)
form( $class_path, string $cmd)
ilPropertyFormGUI $form
+ 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 2368 of file class.ilContainerGUI.php.

References $form, ILIAS\LTI\ToolProvider\$key, $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().

2369  {
2370  $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
2371 
2372  $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
2373  $item_list->setInfo($this->lng->txt('cont_item_list_info'));
2374  $lpres->addOption($item_list);
2375 
2376  $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
2377  $tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
2378  $lpres->addOption($tile_view);
2379 
2380  // tile size
2381 
2382  $si = new ilRadioGroupInputGUI($this->lng->txt("cont_tile_size"), "tile_size");
2383  foreach ($this->object->getTileSizes() as $key => $txt) {
2384  $op = new ilRadioOption($txt, $key);
2385  $si->addOption($op);
2386  }
2387  $tile_view->addSubItem($si);
2388  $si->setValue(
2389  (string) ((int) ilContainer::_lookupContainerSetting($this->object->getId(), "tile_size"))
2390  );
2391 
2392  $lpres->setValue(
2393  ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
2394  );
2395 
2396  $form->addItem($lpres);
2397 
2398  return $form;
2399  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInfo(string $a_info)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
This class represents a property in a property form.
string $key
Consumer key/client ID value.
Definition: System.php:193
$txt
Definition: error.php:13
ilPropertyFormGUI $form
+ 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 2454 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().

2459  : ilRadioOption {
2460  $position = new ilRadioGroupInputGUI(
2461  $this->lng->txt('sorting_new_items_position'),
2462  $a_prefix . '_new_items_position'
2463  );
2464  $position->setValue((string) $settings->getSortNewItemsPosition());
2465  $position->setRequired(true);
2466 
2467  //new items insert on top
2468  $new_top = new ilRadioOption(
2469  $this->lng->txt('sorting_new_items_at_top'),
2471  );
2472 
2473  $position->addOption($new_top);
2474 
2475  //new items insert at bottom
2476  $new_bottom = new ilRadioOption(
2477  $this->lng->txt('sorting_new_items_at_bottom'),
2479  );
2480 
2481  $position->addOption($new_bottom);
2482 
2483  $element->addSubItem($position);
2484 
2485  $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
2486  $order->setValue((string) $settings->getSortNewItemsOrder());
2487  $order->setRequired(true);
2488 
2489  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2490  //new items sort in alphabetical order
2491  $new_title = new ilRadioOption(
2492  $this->lng->txt('sorting_title_header'),
2494  );
2495 
2496  $order->addOption($new_title);
2497  }
2498 
2499  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2500  //new items sort by creation date
2501  $new_creation = new ilRadioOption(
2502  $this->lng->txt('sorting_creation_header'),
2504  );
2505 
2506  $order->addOption($new_creation);
2507  }
2508 
2509  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2510  //new items by activation
2511  $new_activation = new ilRadioOption(
2512  $this->lng->txt('crs_sort_activation'),
2514  );
2515 
2516  $order->addOption($new_activation);
2517  }
2518 
2519  $element->addSubItem($order);
2520 
2521  $this->initSortingDirectionForm($settings, $element, 'manual');
2522 
2523  return $element;
2524  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 2417 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().

2421  : ilRadioOption {
2422  if ($a_prefix === 'manual') {
2423  $txt = $this->lng->txt('sorting_new_items_direction');
2424  } else {
2425  $txt = $this->lng->txt('sorting_direction');
2426  }
2427 
2428  $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
2429  $direction->setValue((string) $sorting_settings->getSortDirection());
2430  $direction->setRequired(true);
2431 
2432  // asc
2433  $asc = new ilRadioOption(
2434  $this->lng->txt('sorting_asc'),
2436  );
2437  $direction->addOption($asc);
2438 
2439  // desc
2440  $desc = new ilRadioOption(
2441  $this->lng->txt('sorting_desc'),
2443  );
2444  $direction->addOption($desc);
2445 
2446  $element->addSubItem($direction);
2447 
2448  return $element;
2449  }
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.
$txt
Definition: error.php:13
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 2298 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().

2301  : ilPropertyFormGUI {
2302  $settings = new ilContainerSortingSettings($this->object->getId());
2303  $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
2304 
2305  if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
2306  $sort_inherit = new ilRadioOption();
2307  $sort_inherit->setTitle(
2308  $this->lng->txt('sort_inherit_prefix') .
2311  $this->object->getId()
2312  )
2313  ) . ') '
2314  );
2315  $sort_inherit->setValue((string) ilContainer::SORT_INHERIT);
2316  $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
2317  $sort->addOption($sort_inherit);
2318  }
2319  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2320  $sort_title = new ilRadioOption(
2321  $this->lng->txt('sorting_title_header'),
2322  (string) ilContainer::SORT_TITLE
2323  );
2324  $sort_title->setInfo($this->lng->txt('sorting_info_title'));
2325 
2326  $this->initSortingDirectionForm($settings, $sort_title, 'title');
2327  $sort->addOption($sort_title);
2328  }
2329  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2330  $sort_activation = new ilRadioOption(
2331  $this->lng->txt('sorting_creation_header'),
2333  );
2334  $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
2335  $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
2336  $sort->addOption($sort_activation);
2337  }
2338  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2339  $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), (string) ilContainer::SORT_ACTIVATION);
2340  $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
2341  $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
2342  $sort->addOption($sort_activation);
2343  }
2344  if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
2345  $sort_manual = new ilRadioOption(
2346  $this->lng->txt('sorting_manual_header'),
2347  (string) ilContainer::SORT_MANUAL
2348  );
2349  $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
2350  $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
2351  $sort->addOption($sort_manual);
2352  }
2353 
2354  // Handle moved containers and there possibly invalid values
2355  if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2356  $sort->setValue((string) $settings->getSortMode());
2357  } else {
2358  $sort->setValue((string) ilContainer::SORT_TITLE);
2359  }
2360  $form->addItem($sort);
2361 
2362  return $form;
2363  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 1859 of file class.ilContainerGUI.php.

References ILIAS\Repository\object().

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

1859  : bool
1860  {
1861  // #10081
1862  if ($this->view_manager->isAdminView() &&
1863  $this->object->getRefId() &&
1864  !$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
1865  return false;
1866  }
1867 
1868  return $this->view_manager->isAdminView();
1869  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

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

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

940  : bool
941  {
942  if ($this->isActiveOrdering()) {
944  }
945  return false;
946  }
+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

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

References $edit_order.

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

935  : bool
936  {
937  return $this->edit_order;
938  }
+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

References $multi_download_enabled.

Referenced by showAdministrationPanel().

958  : bool
959  {
961  }
+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

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

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

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

1583  : void
1584  {
1585  $ilCtrl = $this->ctrl;
1586 
1587  $this->tpl->setOnScreenMessage('success', $this->lng->txt("obj_inserted_clipboard"), true);
1588  $ilCtrl->returnToParent($this);
1589  }
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 1153 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().

1153  : void
1154  {
1156  $ilCtrl = $this->ctrl;
1157  $ilErr = $this->error;
1158 
1159  $no_cut = [];
1160  $no_link = [];
1161 
1162  $ids = $this->std_request->getSelectedIds();
1163 
1164  if (count($ids) === 0) {
1165  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1166  $this->ctrl->redirect($this, "");
1167  }
1168 
1169  // CHECK ACCESS
1170  foreach ($ids as $ref_id) {
1171  if (!$rbacsystem->checkAccess('delete', $ref_id)) {
1172  $no_cut[] = $ref_id;
1173  }
1174 
1176 
1177  if (!$this->obj_definition->allowLink($object->getType())) {
1178  $no_link[] = $object->getType();
1179  }
1180  }
1181 
1182  // NO ACCESS
1183  if ($no_cut !== []) {
1184  $this->tpl->setOnScreenMessage(
1185  'failure',
1186  $this->lng->txt("msg_no_perm_link") . " " . implode(',', $no_cut),
1187  true
1188  );
1189  $this->ctrl->redirect($this, "");
1190  }
1191 
1192  if ($no_link !== []) {
1193  //#12203
1194  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_obj_no_link'), true);
1195  $this->ctrl->redirect($this, "");
1196  }
1197 
1198  $this->clipboard->setParent($this->requested_ref_id);
1199  $this->clipboard->setCmd($ilCtrl->getCmd());
1200  $this->clipboard->setRefIds($ids);
1201 
1202  $suffix = 'p';
1203  if (count($this->clipboard->getRefIds()) === 1) {
1204  $suffix = 's';
1205  }
1206  $this->tpl->setOnScreenMessage('info', $this->lng->txt("msg_link_clipboard_" . $suffix), true);
1207 
1209  }
ilRbacSystem $rbacsystem
$ilErr
Definition: raiseError.php:17
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 2017 of file class.ilContainerGUI.php.

Referenced by getAsynchItemListObject().

2020  : void {
2021  /* not really implemented buildPath does not exist
2022  $lng = $this->lng;
2023 
2024  if ($a_show_path) {
2025  $a_item_list_gui->addCustomProperty(
2026  $lng->txt('path'),
2027  ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2028  false,
2029  true
2030  );
2031  }
2032  */
2033  }
+ Here is the caller graph for this function:

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

References ilObjectGUI\$ctrl, $error, $ilErr, $ilUser, ILIAS\LTI\ToolProvider\$key, $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().

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

References $error, $ilErr, $ilUser, ILIAS\LTI\ToolProvider\$key, ilObjectGUI\$lng, $log, $message, $obj_data_cache, $rbacadmin, $rbacreview, $rbacsystem, ilObjectGUI\$ref_id, ilObjectGUI\$tree, $ui, ilObjectGUI\$user, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilLink\_getLink(), 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(), ILIAS\DI\UIServices\renderer(), showPasteTreeObject(), and ilLanguage\txt().

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

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

◆ prepareOutput()

ilContainerGUI::prepareOutput ( bool  $show_subobjects = true)

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

References ilObjectGUI\getCreationMode(), ILIAS\Repository\object(), and ilMemberViewGUI\showMemberViewSwitch().

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

301  : bool
302  {
303  if (parent::prepareOutput($show_subobjects)) { // return false in admin mode
304  if ($show_subobjects === true && $this->getCreationMode() === false) {
305  ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
306  }
307  }
308  return true;
309  }
static showMemberViewSwitch(int $a_ref_id)
+ 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 2181 of file class.ilContainerGUI.php.

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

2181  : void
2182  {
2183  $tpl = $this->tpl;
2184 
2185  $html = null;
2186 
2187  $child_ref_id = $this->std_request->getChildRefId();
2188  $parent_ref_id = $this->std_request->getParentRefId();
2189 
2190  $item_data = $this->object->getSubItems(false, false, $child_ref_id);
2191  $container_view = $this->getContentGUI();
2192 
2193  // see #41377 (material not redrawn, when not a direct child)
2194  $sess_data = [];
2195  if (isset($this->object->items["sess"])) {
2196  $sess_data = $this->object->items["sess"]; // before #41377
2197  } elseif (ilObject::_lookupType($parent_ref_id, true) === "sess") {
2198  $sess_data[] = [
2199  "obj_id" => ilObject::_lookupObjectId($parent_ref_id)
2200  ]; // added with #41377
2201  }
2202 
2203  // list item is session material (not part of "_all"-items - see below)
2204  $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
2205  if (in_array($child_ref_id, $event_items)) {
2206  foreach (($sess_data) as $id) {
2207  $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
2208  foreach ($items as $event_item) {
2209  if ($event_item["child"] == $child_ref_id) {
2210  // sessions
2211  if ($parent_ref_id > 0) {
2212  $event_item["parent"] = $parent_ref_id;
2213  }
2214  $html = $container_view->renderItem($event_item);
2215  }
2216  }
2217  }
2218  }
2219 
2220  // "normal" list item
2221  if (!$html) {
2222  foreach (($this->object->items["_all"] ?? []) as $id) {
2223  if ($id["child"] == $child_ref_id) {
2224  $html = $container_view->renderItem($id);
2225  }
2226  }
2227  }
2228 
2229  if ($html) {
2230  echo $html;
2231 
2232  // we need to add onload code manually (rating, comments, etc.)
2233  echo $tpl->getOnLoadCodeForAsynch();
2234  }
2235 
2236  exit;
2237  }
exit
Definition: login.php:28
static getItemsByEvent(int $event_id)
Get session material / event items.
static _getItemsOfContainer(int $a_ref_id)
ilGlobalTemplateInterface $tpl
static _lookupObjectId(int $ref_id)
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ removeFromSystemObject()

ilContainerGUI::removeFromSystemObject ( )

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

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

2595  : void
2596  {
2597  $this->checkPermission("write");
2598  $ru = new ilRepositoryTrashGUI($this);
2599  $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2600  $this->ctrl->redirect($this, "trash");
2601  }
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 436 of file class.ilContainerGUI.php.

References exit, and getContentGUI().

436  : void
437  {
438  $container_view = $this->getContentGUI();
439  echo $container_view->getSingleTypeBlockAsynch(
440  $this->std_request->getType()
441  );
442  exit;
443  }
exit
Definition: login.php:28
+ Here is the call graph for this function:

◆ renderObject()

ilContainerGUI::renderObject ( )

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

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

Referenced by editOrderObject(), and enableMultiDownloadObject().

369  : void
370  {
371  $ilTabs = $this->tabs;
372  $ilCtrl = $this->ctrl;
374  $user = $this->user;
376  $lng = $this->lng;
377 
378  $container_view = $this->getContentGUI();
379 
380  $this->setContentSubTabs();
381  if ($this->isActiveAdministrationPanel()) {
382  $ilTabs->activateSubTab("manage");
383  } else {
384  $ilTabs->activateSubTab("view_content");
385  }
386 
387  $container_view->setOutput();
388 
389  $this->adminCommands = $container_view->adminCommands;
390 
391  $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
392  || ($this->std_request->getCmdClass() === "");
393 
394  // it is important not to show the subobjects/admin panel here, since
395  // we will create nested forms in case, e.g. a news/calendar item is added
396  if ($is_container_cmd) {
397  $this->showAdministrationPanel();
398  $this->showPossibleSubObjects();
399 
400  if (is_object($this->object) &&
401  $user->getId() !== ANONYMOUS_USER_ID &&
402  $this->rbacsystem->checkAccess("write", $this->object->getRefId())
403  ) {
404  if ($ilSetting->get("enable_cat_page_edit")) {
405  if (!$this->isActiveAdministrationPanel() &&
406  !$this->isActiveOrdering() &&
407  $this->supportsPageEditor()
408  ) {
410  $lng->txt("cntr_text_media_editor"),
411  $ilCtrl->getLinkTarget($this, "editPageFrame")
412  );
413  }
414  }
415  }
416  }
417 
418  $this->showContainerFilter();
419 
420  $this->showPermanentLink();
421 
422  // add tree updater javascript
423  if ($this->requested_ref_id > 1 && $ilSetting->get("rep_tree_synchronize")) {
424  $ilCtrl->setParameter($this, "active_node", $this->requested_ref_id);
425  }
426  }
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
global $ilSetting
Definition: privfeed.php:17
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 2603 of file class.ilContainerGUI.php.

2603  : void
2604  {
2605  $this->tabs_gui->activateTab('trash');
2606 
2607  $ru = new ilRepositoryTrashGUI($this);
2608  $ru->restoreToNewLocation();
2609  }
Repository GUI Utilities.

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

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

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

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

2401  : void
2402  {
2403  $val = ($form->getInput('list_presentation') === "tile")
2404  ? "tile"
2405  : "";
2406  ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
2408  $this->object->getId(),
2409  "tile_size",
2410  (string) ((int) $form->getInput('tile_size'))
2411  );
2412  }
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 2163 of file class.ilContainerGUI.php.

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

2163  : void
2164  {
2165  $ilUser = $this->user;
2166 
2168  if ($form->checkInput()) {
2169  $ilUser->resetPassword($this->form->getInput('new_password'), $this->form->getInput('new_password'));
2170  $this->tpl->setOnScreenMessage('success', $this->lng->txt('webdav_pwd_instruction_success'), true);
2171  $this->showPasswordInstructionObject(false);
2172  return;
2173  }
2176  }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject(bool $a_init=true)
form( $class_path, string $cmd)
ilPropertyFormGUI $form
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

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

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

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

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

Definition at line 2526 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 ilObjRootFolderGUI\getEditFormValues(), ilObjFolderGUI\updateCustom(), ilObjGroupGUI\updateObject(), ilObjCourseGUI\updateObject(), and ilObjCategoryGUI\updateObject().

2526  : void
2527  {
2528  $settings = new ilContainerSortingSettings($this->object->getId());
2529  $settings->setSortMode((int) $form->getInput("sorting"));
2530 
2531  switch ($form->getInput('sorting')) {
2533  $settings->setSortDirection((int) $form->getInput('title_sorting_direction'));
2534  break;
2536  $settings->setSortDirection((int) $form->getInput('activation_sorting_direction'));
2537  break;
2539  $settings->setSortDirection((int) $form->getInput('creation_sorting_direction'));
2540  break;
2542  $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
2543  $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
2544  $settings->setSortDirection((int) $form->getInput('manual_sorting_direction'));
2545  break;
2546  }
2547 
2548  $settings->update();
2549  }
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 1871 of file class.ilContainerGUI.php.

References ilObjectGUI\$access, isActiveAdministrationPanel(), ILIAS\Repository\object(), ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), and ilColumnGUI\setRepositoryItems().

1871  : void
1872  {
1873  $ilAccess = $this->access;
1874  parent::setColumnSettings($column_gui);
1875 
1876  $column_gui->setRepositoryItems(
1877  $this->object->getSubItems($this->isActiveAdministrationPanel(), true)
1878  );
1879 
1880  //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
1881  // && $this->allowBlocksConfigure())
1882  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1883  $column_gui->setBlockProperty("news", "settings", '1');
1884  //$column_gui->setBlockProperty("news", "public_notifications_option", true);
1885  $column_gui->setBlockProperty("news", "default_visibility_option", '1');
1886  $column_gui->setBlockProperty("news", "hide_news_block_option", '1');
1887  }
1888 
1889  if ($this->isActiveAdministrationPanel()) {
1890  $column_gui->setAdminCommands(true);
1891  }
1892  }
setAdminCommands(bool $a_admincommands)
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
setRepositoryItems(array $a_repositoryitems)
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

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

References addStandardContainerSubTabs().

Referenced by renderObject().

445  : void
446  {
448  }
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 790 of file class.ilContainerGUI.php.

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

790  : void
791  {
792  $lng = $this->lng;
793 
794  if (!$this->isActiveAdministrationPanel()
795  || strtolower($this->ctrl->getCmdClass()) !== "ilcontainerpagegui") {
796  return;
797  }
798 
799  $lng->loadLanguageModule("content");
800  //$tabs_gui = new ilTabsGUI();
801  //$tabs_gui->setSubTabs();
802 
803  // back to upper context
804  $this->tabs_gui->setBackTarget(
805  $this->lng->txt("obj_cat"),
806  $this->ctrl->getLinkTarget($this, ""),
807  ilFrameTargetInfo::_getFrame("MainContent")
808  );
809 
810  $this->tabs_gui->addTarget(
811  "edit",
812  $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view"),
813  ["", "view"],
814  "ilcontainerpagegui"
815  );
816 
817  //$this->tpl->setTabs($tabs_gui->getHTML());
818  }
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
static _getFrame(string $a_class)
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilContainerGUI::setSideColumnReturn ( )

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

References ILIAS\Repository\ctrl().

2673  : void
2674  {
2675  $this->ctrl->setReturn($this, "");
2676  }
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )
protected

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

References ilObject\_getIcon(), ilObjectListGUIFactory\_getListGUIByType(), ilContainer\_lookupContainerSetting(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

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

311  : void
312  {
313  if (ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
314  $this->tpl->setTitle($this->object->getTitle(), true);
315  } else {
316  $this->tpl->setTitle($this->object->getTitle());
317  $this->tpl->setDescription($this->object->getLongDescription());
318 
319  // set tile icon
320  $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
321  $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_" . $this->object->getType()));
322 
323  $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
324  $lgui->initItem($this->object->getRefId(), $this->object->getId(), $this->object->getType());
325  $this->tpl->setAlertProperties($lgui->getAlertProperties());
326  }
327  }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( )

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

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

Referenced by renderObject().

450  : void
451  {
452  global $DIC;
453 
454  $ilAccess = $this->access;
455  $lng = $this->lng;
456 
457  $main_tpl = $DIC->ui()->mainTemplate();
458 
459  $lng->loadLanguageModule('cntr');
460 
461  if ($this->clipboard->hasEntries() && !$this->edit_order) {
462  // #11545
463  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
464 
465  $toolbar = new ilToolbarGUI();
466  $toolbar->setId("admclip");
467  $this->ctrl->setParameter($this, "type", "");
468  $this->ctrl->setParameter($this, "item_ref_id", "");
469 
471  $this->ui->factory()->button()->standard(
472  $this->lng->txt('paste_clipboard_items'),
473  $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class], 'paste')
474  )
475  );
476 
478  $this->ui->factory()->button()->standard(
479  $this->lng->txt('clear_clipboard'),
480  $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class], 'clear')
481  )
482  );
483 
484  $main_tpl->addAdminPanelToolbar($toolbar, true, false);
485  } elseif ($this->isActiveAdministrationPanel()) {
486  // #11545
487  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
488 
489  $toolbar = new ilToolbarGUI();
490  $toolbar->setId("adm");
491  $this->ctrl->setParameter($this, "type", "");
492  $this->ctrl->setParameter($this, "item_ref_id", "");
493 
494  if ($this->object->gotItems()) {
496  ilUtil::getImagePath("arrow_upright.svg"),
497  $lng->txt("actions")
498  );
500  $this->lng->txt('delete_selected_items'),
501  'delete'
502  );
504  $this->lng->txt('move_selected_items'),
505  'cut'
506  );
508  $this->lng->txt('copy_selected_items'),
509  'copy'
510  );
512  $this->lng->txt('link_selected_items'),
513  'link'
514  );
515  // add download button if multi download enabled
516  $folder_set = new ilSetting('fold');
517  if ((bool) $folder_set->get('enable_multi_download') === true) {
520  $this->lng->txt('download_selected_items'),
521  'download'
522  );
523  }
524  }
525  if ($this->object->getType() === 'crs' || $this->object->getType() === 'grp') {
526  if ($this->object->gotItems()) {
528  }
529 
530  $this->toolbar->addButton(
531  $this->lng->txt('cntr_adopt_content'),
532  $this->ctrl->getLinkTargetByClass(
533  'ilObjectCopyGUI',
534  'adoptContent'
535  )
536  );
537  }
538 
539  $main_tpl->addAdminPanelToolbar(
540  $toolbar,
541  $this->object->gotItems() && !$this->clipboard->hasEntries(),
542  $this->object->gotItems() && !$this->clipboard->hasEntries()
543  );
544 
545  // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
546  if ($this->object->gotItems()) {
547  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
548  }
549  } elseif ($this->edit_order) {
550  if ($this->object->gotItems() && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
551  if ($this->isActiveOrdering()) {
552  // #11843
553  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
554 
555  $toolbar = new ilToolbarGUI();
556  $this->ctrl->setParameter($this, "type", "");
557  $this->ctrl->setParameter($this, "item_ref_id", "");
558 
560  $this->lng->txt('sorting_save'),
561  'saveSorting'
562  );
563 
564  $main_tpl->addAdminPanelToolbar($toolbar, true, false);
565  }
566  }
567  }
568  // bugfix mantis 24559
569  // undoing an erroneous change inside mantis 23516 by adding "Download Multiple Objects"-functionality for non-admins
570  // as they don't have the possibility to use the multi-download-capability of the manage-tab
571  elseif ($this->isMultiDownloadEnabled()) {
572  // bugfix mantis 0021272
574  $num_files = $this->tree->getChildsByType($ref_id, "file");
575  $num_folders = $this->tree->getChildsByType($ref_id, "fold");
576  if (count($num_files) > 0 || count($num_folders) > 0) {
577  // #11843
578  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
579 
580  $toolbar = new ilToolbarGUI();
581  $this->ctrl->setParameter($this, "type", "");
582  $this->ctrl->setParameter($this, "item_ref_id", "");
583 
585  $this->lng->txt('download_selected_items'),
586  'download'
587  );
588 
589  $GLOBALS['tpl']->addAdminPanelToolbar(
590  $toolbar,
591  $this->object->gotItems(),
592  $this->object->gotItems()
593  );
594  } else {
595  $this->tpl->setOnScreenMessage('info', $this->lng->txt('msg_no_downloadable_objects'), true);
596  }
597  }
598  }
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 getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
addComponent(\ILIAS\UI\Component\Component $a_comp)
setLeadingImage(string $a_img, string $a_alt)
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
setId(string $a_val)
ilLanguage $lng
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
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 2705 of file class.ilContainerGUI.php.

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

Referenced by renderObject().

2705  : void
2706  {
2707  global $DIC;
2708  if (!is_null($this->ui_filter)) {
2709  $renderer = $DIC->ui()->renderer();
2710 
2711  $main_tpl = $this->tpl;
2712  $main_tpl->setFilter($renderer->render($this->ui_filter));
2713  if ($this->container_user_filter->isEmpty() && !ilContainer::_lookupContainerSetting(
2714  $this->object->getId(),
2715  "filter_show_empty",
2716  '0'
2717  )) {
2718  $this->tpl->setOnScreenMessage('info', $this->lng->txt("cont_filter_empty"));
2719  }
2720  }
2721  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
global $DIC
Definition: feed.php:28
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showContainerPageTabs()

ilContainerGUI::showContainerPageTabs ( )
protected

Definition at line 2066 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().

2066  : void
2067  {
2068  $ctrl = $this->ctrl;
2069  $tabs = $this->tabs;
2070  $tabs->clearTargets();
2071  $page_gui = new ilContainerPageGUI($this->object->getId());
2072  $tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($page_gui, "edit"));
2073  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 624 of file class.ilContainerGUI.php.

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

624  : void
625  {
626  $lng = $this->lng;
627  $tree = $this->tree;
628 
629  $cnt = [];
630 
631  $tpl = new ilGlobalTemplate(
632  "tpl.container_link_help.html",
633  true,
634  true,
635  "Services/Container"
636  );
637 
638  $type_ordering = [
639  "cat",
640  "fold",
641  "crs",
642  "grp",
643  "chat",
644  "frm",
645  "lres",
646  "glo",
647  "webr",
648  "file",
649  "exc",
650  "tst",
651  "svy",
652  "mep",
653  "qpl",
654  "spl"
655  ];
656 
657  $childs = $tree->getChilds($this->requested_ref_id);
658  foreach ($childs as $child) {
659  if (in_array($child["type"], ["lm", "sahs", "htlm"])) {
660  $cnt["lres"]++;
661  } else {
662  $cnt[$child["type"]]++;
663  }
664  }
665 
666  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
667  $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
668  foreach ($type_ordering as $type) {
669  $tpl->setCurrentBlock("row");
670  if ($type !== "lres") {
671  $tpl->setVariable(
672  "TYPE",
673  $lng->txt("objs_" . $type) .
674  " (" . ((int) $cnt[$type]) . ")"
675  );
676  } else {
677  $tpl->setVariable(
678  "TYPE",
679  $lng->txt("obj_lrss") .
680  " (" . ((int) $cnt["lres"]) . ")"
681  );
682  }
683  $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
685  }
686  $tpl->printToStdout();
687  exit;
688  }
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
exit
Definition: login.php:28
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...
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.
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

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

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

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

Referenced by savePasswordObject().

2120  : void {
2121  global $DIC;
2122  $tpl = $this->tpl;
2123  $ilToolbar = $this->toolbar;
2124 
2125  if ($a_init) {
2126  $this->tpl->setOnScreenMessage('info', $this->lng->txt('webdav_pwd_instruction'));
2127  $this->initFormPasswordInstruction();
2128  }
2129 
2130  $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
2131  $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
2132 
2133  $btn = ilButton::getInstance();
2134  $btn->setCaption('mount_webfolder');
2135  $btn->setOnClick("triggerWebDAVModal('$href')");
2136  $ilToolbar->addButtonInstance($btn);
2137 
2138  $tpl->setContent($this->form->getHTML());
2139  }
static getInstance()
initFormPasswordInstruction()
Init password form.
global $DIC
Definition: feed.php:28
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
ilToolbarGUI $toolbar
form( $class_path, string $cmd)
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 1520 of file class.ilContainerGUI.php.

References Vendor\Package\$b, $error, $ilErr, $message, $tabs, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilSubmitButton\getInstance(), getTreeSelectorGUI(), and ILIAS\Repository\lng().

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

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

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( )

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

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

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

600  : void
601  {
602  global $DIC;
603 
604  $tpl = $DIC->ui()->mainTemplate();
605 
607  $this->object->getType(),
608  $this->object->getRefId(),
609  "",
610  "_top"
611  );
612  }
global $DIC
Definition: feed.php:28
ilGlobalTemplateInterface $tpl
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 329 of file class.ilContainerGUI.php.

References isActiveAdministrationPanel(), isActiveOrdering(), ILIAS\Repository\object(), and ilObjectAddNewItemGUI\render().

Referenced by renderObject().

329  : void
330  {
331  if ($this->isActiveAdministrationPanel() || $this->isActiveOrdering()) {
332  return;
333  }
334  $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
335  $gui->render();
336  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
render()
Add new item selection to current page incl.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsPageEditor()

ilContainerGUI::supportsPageEditor ( )
protected

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

Referenced by renderObject().

428  : bool
429  {
430  return true;
431  }
+ Here is the caller graph for this function:

◆ trashApplyFilterObject()

ilContainerGUI::trashApplyFilterObject ( )

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

References trashHandleFilter().

2571  : void
2572  {
2573  $this->trashHandleFilter(true, false);
2574  }
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 2581 of file class.ilContainerGUI.php.

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

Referenced by trashApplyFilterObject(), and trashResetFilterObject().

2581  : void
2582  {
2583  $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2584  $trash_table->init();
2585  $trash_table->resetOffset();
2586  if ($action_reset) {
2587  $trash_table->resetFilter();
2588  }
2589  if ($action_apply) {
2590  $trash_table->writeFilterToSession();
2591  }
2592  $this->trashObject();
2593  }
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 2554 of file class.ilContainerGUI.php.

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilTrashTableGUI\init(), ILIAS\Repository\object(), and ilGlobalTemplateInterface\setContent().

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

2554  : void
2555  {
2556  $this->checkPermission("write");
2557  $tpl = $this->tpl;
2558 
2559  $this->tabs_gui->activateTab('trash');
2560 
2561  $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2562  $trash_table->init();
2563  $trash_table->parse();
2564 
2565  $trash_table->setFilterCommand('trashApplyFilter');
2566  $trash_table->setResetCommand('trashResetFilter');
2567 
2568  $tpl->setContent($trash_table->getHTML());
2569  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
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 2576 of file class.ilContainerGUI.php.

References trashHandleFilter().

2576  : void
2577  {
2578  $this->trashHandleFilter(false, true);
2579  }
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 2614 of file class.ilContainerGUI.php.

References ILIAS\Repository\ctrl().

Referenced by ilObjLearningSequenceGUI\executeCommand().

2614  : void
2615  {
2616  $ru = new ilRepositoryTrashGUI($this);
2617  $ru->restoreObjects(
2618  $this->requested_ref_id,
2619  $this->std_request->getTrashIds()
2620  );
2621  $this->ctrl->redirect($this, "trash");
2622  }
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 54 of file class.ilContainerGUI.php.

◆ $app_event_handler

ilAppEventHandler ilContainerGUI::$app_event_handler
protected

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

Referenced by ilObjLearningSequenceGUI\afterSave().

◆ $bl_cnt

int ilContainerGUI::$bl_cnt = 1

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

◆ $clipboard

ClipboardManager ilContainerGUI::$clipboard
protected

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

◆ $component_factory

ilComponentFactory ilContainerGUI::$component_factory
protected

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

◆ $container_filter_service

ilContainerFilterService ilContainerGUI::$container_filter_service
protected

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

Referenced by initFilter().

◆ $container_user_filter

ilContainerUserFilter ilContainerGUI::$container_user_filter = null
protected

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

◆ $content_style_domain

ILIAS Style Content DomainService ilContainerGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilContainerGUI::$content_style_gui
protected

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

◆ $current_position

int ilContainerGUI::$current_position = 0
protected

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

◆ $edit_order

bool ilContainerGUI::$edit_order = false
protected

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

Referenced by isActiveOrdering(), and showAdministrationPanel().

◆ $error

◆ $form

◆ $global_screen

Services ilContainerGUI::$global_screen
protected

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

◆ $log

◆ $multi_download_enabled

bool ilContainerGUI::$multi_download_enabled = false

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

Referenced by isMultiDownloadEnabled().

◆ $obj_data_cache

ilObjectDataCache ilContainerGUI::$obj_data_cache
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $obj_definition

ilObjectDefinition ilContainerGUI::$obj_definition
protected

Definition at line 40 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 55 of file class.ilContainerGUI.php.

◆ $std_request

StandardGUIRequest ilContainerGUI::$std_request
protected

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

◆ $tabs

◆ $ui

UIServices ilContainerGUI::$ui
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $ui_filter

Standard ilContainerGUI::$ui_filter = null
protected

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

◆ $view_manager

ViewManager ilContainerGUI::$view_manager
protected

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


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