ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 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] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 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 ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _buildPath (int $a_ref_id, int $a_course_ref_id)
 build path More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

int $bl_cnt = 1
 
bool $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const 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

 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 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...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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...
 
 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...
 

Protected Attributes

ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 2047 of file class.ilContainerGUI.php.

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

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

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

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

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

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

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

References ilObjectGUI\$ctrl, and $tabs.

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

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs ( bool  $a_include_view = true)

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

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

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

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

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

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

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

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

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

192  : void
193  {
194  // check if template is changed
196  $this->object->getRefId()
197  );
198  $new_tpl_id = $this->getDidacticTemplateVar('dtpl');
199 
200  if ($new_tpl_id !== $current_tpl_id) {
201  // redirect to didactic template confirmation
202  $this->ctrl->setReturn($this, 'edit');
203  $this->ctrl->setCmdClass('ildidactictemplategui');
204  $this->ctrl->setCmd('confirmTemplateSwitch');
205  $dtpl_gui = new ilDidacticTemplateGUI($this, $new_tpl_id);
206  $this->ctrl->forwardCommand($dtpl_gui);
207  return;
208  }
209  parent::afterUpdate();
210  }
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 1915 of file class.ilContainerGUI.php.

1915  : bool
1916  {
1917  return true;
1918  }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

1907  : bool
1908  {
1909  return true;
1910  }

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

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

Referenced by ilObjOrgUnitGUI\executeCommand().

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

References ILIAS\Repository\ctrl().

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

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

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

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

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

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

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

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

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

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

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

Referenced by performPasteIntoMultipleObjectsObject().

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

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

2767  : void
2768  {
2769  $ctrl = $this->ctrl;
2770 
2771  $ctrl->redirectByClass(["ilContainerSkillGUI", "ilContSkillPresentationGUI"]);
2772  }
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 2636 of file class.ilContainerGUI.php.

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

2636  : void
2637  {
2638  $lng = $this->lng;
2639  $this->checkPermission("write");
2640  if (count($this->std_request->getTrashIds()) == 0) {
2641  $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
2642  $this->ctrl->redirect($this, "trash");
2643  }
2644 
2645  $ru = new ilRepositoryTrashGUI($this);
2646  $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2647  }
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 1038 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().

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

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

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

931  : void
932  {
933  $this->getModeManager()->setContentMode();
934  $this->ctrl->redirect($this, "render");
935  }
+ Here is the call graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

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

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

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

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

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

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

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

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

References ILIAS\Repository\ctrl().

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

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

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

Referenced by ilObjStudyProgrammeGUI\executeCommand().

2069  : void
2070  {
2071  $this->content_style_gui
2072  ->redirectToObjectSettings();
2073  }
+ Here is the caller graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

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

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

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

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

References renderObject().

965  : void
966  {
967  $this->multi_download_enabled = true;
968  $this->renderObject();
969  }
+ Here is the call graph for this function:

◆ executeCommand()

ilContainerGUI::executeCommand ( )

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

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

156  : void
157  {
158  $tpl = $this->tpl;
159 
160  $next_class = $this->ctrl->getNextClass();
161  $cmd = $this->ctrl->getCmd("render");
162 
163  switch ($next_class) {
164  // page editing
165  case "ilcontainerpagegui":
166  if ($this->requested_redirectSource !== "ilinternallinkgui") {
167  $ret = $this->forwardToPageObject();
168  $tpl->setContent($ret);
169  } else {
170  return;
171  }
172  break;
173 
174  default:
175  $this->prepareOutput();
176  $cmd .= "Object";
177  $this->$cmd();
178  break;
179  }
180  }
prepareOutput(bool $show_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 213 of file class.ilContainerGUI.php.

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

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

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

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

2735  : void
2736  {
2737  if ($this->checkPermissionBool("visible,read")) {
2738  $this->tabs_gui->addTab(
2739  'view',
2740  $this->lng->txt('view'),
2741  $this->ctrl->getLinkTarget($this, 'view')
2742  );
2743  }
2744 
2745  // Always show container trash
2746  $this->tabs_gui->addTab(
2747  'trash',
2748  $this->lng->txt('trash'),
2749  $this->ctrl->getLinkTarget($this, 'trash')
2750  );
2751 
2752  if ($this->checkPermissionBool("edit_permission")) {
2753  $this->tabs_gui->addTab(
2754  'perm_settings',
2755  $this->lng->txt('perm_settings'),
2756  $this->ctrl->getLinkTargetByClass(
2757  [
2758  get_class($this),
2759  'ilpermissiongui'
2760  ],
2761  'perm'
2762  )
2763  );
2764  }
2765  }
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 2084 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().

2084  : void
2085  {
2086  $ref_id = $this->std_request->getCmdRefId();
2089 
2090  // this should be done via container-object->getSubItem in the future
2091  $data = [
2092  "child" => $ref_id,
2093  "ref_id" => $ref_id,
2094  "obj_id" => $obj_id,
2095  "type" => $type
2096  ];
2098  $item_list_gui->setContainerObject($this);
2099 
2100  $item_list_gui->enableComments(true);
2101  $item_list_gui->enableNotes(true);
2102  $item_list_gui->enableTags(true);
2103 
2104  $this->modifyItemGUI($item_list_gui, $data);
2105  $html = $item_list_gui->getListItemHTML(
2106  $ref_id,
2107  $obj_id,
2108  "",
2109  "",
2110  true,
2111  true
2112  );
2113 
2114  // include plugin slot for async item list
2115  foreach ($this->component_factory->getActivePluginsInSlot("uihk") as $plugin) {
2116  $gui_class = $plugin->getUIClassInstance();
2117  $resp = $gui_class->getHTML("Services/Container", "async_item_list", ["html" => $html]);
2118  if ((string) $resp["mode"] !== ilUIHookPluginGUI::KEEP) {
2119  $html = $gui_class->modifyHTML($html, $resp);
2120  }
2121  }
2122 
2123  echo $html;
2124  exit;
2125  }
exit
Definition: login.php:29
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 1157 of file class.ilContainerGUI.php.

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

Referenced by downloadObject().

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

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

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

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

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

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

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

361  {
362  $view_mode = $this->object->getViewMode();
363  if ($this->object->filteredSubtree()) {
364  $view_mode = ilContainer::VIEW_SIMPLE;
365  }
366  switch ($view_mode) {
367  // all items in one block
369  $container_view = new ilContainerSimpleContentGUI(
370  $this,
371  $this->getItemPresentation()
372  );
373  break;
374 
376  $container_view = new ilContainerObjectiveGUI(
377  $this,
378  $this->getItemPresentation()
379  );
380  break;
381 
382  // all items in one block
384  case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
385  $container_view = new ilContainerSessionsContentGUI(
386  $this,
387  $this->getItemPresentation()
388  );
389  break;
390 
391  // all items in one block
393  default:
394  $container_view = new ilContainerByTypeContentGUI(
395  $this,
396  $this->getItemPresentation()
397  );
398  break;
399  }
400  return $container_view;
401  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Parent class of all container content GUIs.
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

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

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

Referenced by ilObjFolderGUI\editObject().

182  : array
183  {
184  $values = parent::getEditFormValues();
185 
186  $values['didactic_type'] =
187  'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
188 
189  return $values;
190  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItemPresentation()

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

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

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

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

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

◆ getModeManager()

ilContainerGUI::getModeManager ( )
protected

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

References $mode_manager, and ilObjectGUI\getObject().

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

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

◆ getTabs()

ilContainerGUI::getTabs ( )
protected

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

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

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

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

Referenced by showPasteTreeObject().

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

◆ gotItems()

ilContainerGUI::gotItems ( )
protected

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

References getItemPresentation().

Referenced by showAdministrationPanel().

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

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

References showPasteTreeObject().

Referenced by copyObject().

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

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

References showPasteTreeObject().

Referenced by linkObject().

1528  : void
1529  {
1530  $this->showPasteTreeObject();
1531  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

References showPasteTreeObject().

Referenced by cutObject().

1607  : void
1608  {
1609  $this->showPasteTreeObject();
1610  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

Definition at line 2248 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.

2249  {
2250  $lng = $this->lng;
2251  $lng->loadLanguageModule($this->object->getType());
2252 
2253  $form = new ilPropertyFormGUI();
2254  $form->setFormAction($this->ctrl->getFormAction($this, "update"));
2255  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
2256 
2257  $this->initFormTitleDescription($form);
2258 
2259  $this->initEditCustomForm($form);
2260 
2261  $form->addCommandButton("update", $this->lng->txt("save"));
2262 
2263  return $form;
2264  }
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 2690 of file class.ilContainerGUI.php.

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

2690  : void
2691  {
2692  global $DIC;
2693 
2694  if (!$this->object || !ilContainer::_lookupContainerSetting($this->object->getId(), "filter", '0')) {
2695  return;
2696  }
2697 
2698  if ($this->isActiveOrdering() || $this->ctrl->getCmd() === "editOrder") {
2699  return;
2700  }
2701 
2702  $filter_service = $this->container_filter_service;
2703  $request = $DIC->http()->request();
2704 
2705  $filter = $filter_service->util()->getFilterForRefId(
2706  $this->ref_id,
2707  $DIC->ctrl()->getLinkTarget($this, "render", "", true),
2709  );
2710 
2711  $filter_data = $DIC->uiService()->filter()->getData($filter);
2712 
2713  $this->container_user_filter = $filter_service->userFilter($filter_data);
2714  $this->ui_filter = $filter;
2715  }
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 2153 of file class.ilContainerGUI.php.

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

Referenced by savePasswordObject(), and showPasswordInstructionObject().

2154  {
2155  $this->form = new ilPropertyFormGUI();
2156  $this->form->setFormAction($this->ctrl->getFormAction($this));
2157 
2158  // new password
2159  $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
2160  $ipass->setRequired(true);
2161 
2162  $this->form->addItem($ipass);
2163  $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
2164  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
2165 
2166  $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
2167  $this->form->setFormAction($this->ctrl->getFormAction($this));
2168 
2169  return $this->form;
2170  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRequired(bool $a_required)
ilPropertyFormGUI $form
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initListPresentationForm()

ilContainerGUI::initListPresentationForm ( ilPropertyFormGUI  $form)
protected

Add list presentation settings to form.

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

2378  {
2379  $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
2380 
2381  $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
2382  $item_list->setInfo($this->lng->txt('cont_item_list_info'));
2383  $lpres->addOption($item_list);
2384 
2385  $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
2386  $tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
2387  $lpres->addOption($tile_view);
2388 
2389  // tile size
2390 
2391  $si = new ilRadioGroupInputGUI($this->lng->txt("cont_tile_size"), "tile_size");
2392  foreach ($this->object->getTileSizes() as $key => $txt) {
2393  $op = new ilRadioOption($txt, $key);
2394  $si->addOption($op);
2395  }
2396  $tile_view->addSubItem($si);
2397  $si->setValue(
2398  (string) ((int) ilContainer::_lookupContainerSetting($this->object->getId(), "tile_size"))
2399  );
2400 
2401  $lpres->setValue(
2402  ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
2403  );
2404 
2405  $form->addItem($lpres);
2406 
2407  return $form;
2408  }
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:14
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 2463 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().

2468  : ilRadioOption {
2469  $position = new ilRadioGroupInputGUI(
2470  $this->lng->txt('sorting_new_items_position'),
2471  $a_prefix . '_new_items_position'
2472  );
2473  $position->setValue((string) $settings->getSortNewItemsPosition());
2474  $position->setRequired(true);
2475 
2476  //new items insert on top
2477  $new_top = new ilRadioOption(
2478  $this->lng->txt('sorting_new_items_at_top'),
2480  );
2481 
2482  $position->addOption($new_top);
2483 
2484  //new items insert at bottom
2485  $new_bottom = new ilRadioOption(
2486  $this->lng->txt('sorting_new_items_at_bottom'),
2488  );
2489 
2490  $position->addOption($new_bottom);
2491 
2492  $element->addSubItem($position);
2493 
2494  $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
2495  $order->setValue((string) $settings->getSortNewItemsOrder());
2496  $order->setRequired(true);
2497 
2498  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2499  //new items sort in alphabetical order
2500  $new_title = new ilRadioOption(
2501  $this->lng->txt('sorting_title_header'),
2503  );
2504 
2505  $order->addOption($new_title);
2506  }
2507 
2508  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2509  //new items sort by creation date
2510  $new_creation = new ilRadioOption(
2511  $this->lng->txt('sorting_creation_header'),
2513  );
2514 
2515  $order->addOption($new_creation);
2516  }
2517 
2518  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2519  //new items by activation
2520  $new_activation = new ilRadioOption(
2521  $this->lng->txt('crs_sort_activation'),
2523  );
2524 
2525  $order->addOption($new_activation);
2526  }
2527 
2528  $element->addSubItem($order);
2529 
2530  $this->initSortingDirectionForm($settings, $element, 'manual');
2531 
2532  return $element;
2533  }
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 2426 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().

2430  : ilRadioOption {
2431  if ($a_prefix === 'manual') {
2432  $txt = $this->lng->txt('sorting_new_items_direction');
2433  } else {
2434  $txt = $this->lng->txt('sorting_direction');
2435  }
2436 
2437  $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
2438  $direction->setValue((string) $sorting_settings->getSortDirection());
2439  $direction->setRequired(true);
2440 
2441  // asc
2442  $asc = new ilRadioOption(
2443  $this->lng->txt('sorting_asc'),
2445  );
2446  $direction->addOption($asc);
2447 
2448  // desc
2449  $desc = new ilRadioOption(
2450  $this->lng->txt('sorting_desc'),
2452  );
2453  $direction->addOption($desc);
2454 
2455  $element->addSubItem($direction);
2456 
2457  return $element;
2458  }
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:14
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 2307 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().

2310  : ilPropertyFormGUI {
2311  $settings = new ilContainerSortingSettings($this->object->getId());
2312  $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
2313 
2314  if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
2315  $sort_inherit = new ilRadioOption();
2316  $sort_inherit->setTitle(
2317  $this->lng->txt('sort_inherit_prefix') .
2320  $this->object->getId()
2321  )
2322  ) . ') '
2323  );
2324  $sort_inherit->setValue((string) ilContainer::SORT_INHERIT);
2325  $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
2326  $sort->addOption($sort_inherit);
2327  }
2328  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
2329  $sort_title = new ilRadioOption(
2330  $this->lng->txt('sorting_title_header'),
2331  (string) ilContainer::SORT_TITLE
2332  );
2333  $sort_title->setInfo($this->lng->txt('sorting_info_title'));
2334 
2335  $this->initSortingDirectionForm($settings, $sort_title, 'title');
2336  $sort->addOption($sort_title);
2337  }
2338  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
2339  $sort_activation = new ilRadioOption(
2340  $this->lng->txt('sorting_creation_header'),
2342  );
2343  $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
2344  $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
2345  $sort->addOption($sort_activation);
2346  }
2347  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
2348  $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), (string) ilContainer::SORT_ACTIVATION);
2349  $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
2350  $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
2351  $sort->addOption($sort_activation);
2352  }
2353  if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
2354  $sort_manual = new ilRadioOption(
2355  $this->lng->txt('sorting_manual_header'),
2356  (string) ilContainer::SORT_MANUAL
2357  );
2358  $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
2359  $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
2360  $sort->addOption($sort_manual);
2361  }
2362 
2363  // Handle moved containers and there possibly invalid values
2364  if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2365  $sort->setValue((string) $settings->getSortMode());
2366  } else {
2367  $sort->setValue((string) ilContainer::SORT_TITLE);
2368  }
2369  $form->addItem($sort);
2370 
2371  return $form;
2372  }
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 1870 of file class.ilContainerGUI.php.

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

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

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

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

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

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

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

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

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

References $edit_order.

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

948  : bool
949  {
950  return $this->edit_order;
951  }
+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

References $multi_download_enabled.

Referenced by showAdministrationPanel().

971  : bool
972  {
974  }
+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

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

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

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

1594  : void
1595  {
1596  $ilCtrl = $this->ctrl;
1597 
1598  $this->tpl->setOnScreenMessage('success', $this->lng->txt("obj_inserted_clipboard"), true);
1599  $ilCtrl->returnToParent($this);
1600  }
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 1166 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().

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

Referenced by getAsynchItemListObject().

2029  : void {
2030  /* not really implemented buildPath does not exist
2031  $lng = $this->lng;
2032 
2033  if ($a_show_path) {
2034  $a_item_list_gui->addCustomProperty(
2035  $lng->txt('path'),
2036  ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2037  false,
2038  true
2039  );
2040  }
2041  */
2042  }
+ 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 1616 of file class.ilContainerGUI.php.

References ilObjectGUI\$ctrl, $error, $ilErr, 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().

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

References $error, $ilErr, 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(), 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().

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

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

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

332  : bool
333  {
334  if (parent::prepareOutput($show_subobjects)) { // return false in admin mode
335  if ($show_subobjects === true && $this->getCreationMode() === false) {
336  ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
337  }
338  }
339  return true;
340  }
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 2190 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().

2190  : void
2191  {
2192  $tpl = $this->tpl;
2193 
2194  $html = null;
2195 
2196  $child_ref_id = $this->std_request->getChildRefId();
2197  $parent_ref_id = $this->std_request->getParentRefId();
2198 
2199  $item_data = $this->object->getSubItems(false, false, $child_ref_id);
2200  $container_view = $this->getContentGUI();
2201 
2202  // see #41377 (material not redrawn, when not a direct child)
2203  $sess_data = [];
2204  if (isset($this->object->items["sess"])) {
2205  $sess_data = $this->object->items["sess"]; // before #41377
2206  } elseif (ilObject::_lookupType($parent_ref_id, true) === "sess") {
2207  $sess_data[] = [
2208  "obj_id" => ilObject::_lookupObjectId($parent_ref_id)
2209  ]; // added with #41377
2210  }
2211 
2212  // list item is session material (not part of "_all"-items - see below)
2213  $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
2214  if (in_array($child_ref_id, $event_items)) {
2215  foreach (($sess_data) as $id) {
2216  $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
2217  foreach ($items as $event_item) {
2218  if ($event_item["child"] == $child_ref_id) {
2219  // sessions
2220  if ($parent_ref_id > 0) {
2221  $event_item["parent"] = $parent_ref_id;
2222  }
2223  $html = $container_view->renderItem($event_item);
2224  }
2225  }
2226  }
2227  }
2228 
2229  // "normal" list item
2230  if (!$html) {
2231  foreach (($this->object->items["_all"] ?? []) as $id) {
2232  if ($id["child"] == $child_ref_id) {
2233  $html = $container_view->renderItem($id);
2234  }
2235  }
2236  }
2237 
2238  if ($html) {
2239  echo $html;
2240 
2241  // we need to add onload code manually (rating, comments, etc.)
2242  echo $tpl->getOnLoadCodeForAsynch();
2243  }
2244 
2245  exit;
2246  }
exit
Definition: login.php:29
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 2607 of file class.ilContainerGUI.php.

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

2607  : void
2608  {
2609  $this->checkPermission("write");
2610  $ru = new ilRepositoryTrashGUI($this);
2611  $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2612  $this->ctrl->redirect($this, "trash");
2613  }
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 475 of file class.ilContainerGUI.php.

References exit, and getContentGUI().

475  : void
476  {
477  $container_view = $this->getContentGUI();
478  echo $container_view->getSingleTypeBlockAsynch(
479  $this->std_request->getType()
480  );
481  exit;
482  }
exit
Definition: login.php:29
+ Here is the call graph for this function:

◆ renderObject()

ilContainerGUI::renderObject ( )

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

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

Referenced by editOrderObject(), and enableMultiDownloadObject().

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

2615  : void
2616  {
2617  $this->tabs_gui->activateTab('trash');
2618 
2619  $ru = new ilRepositoryTrashGUI($this);
2620  $ru->restoreToNewLocation();
2621  }
Repository GUI Utilities.

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

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

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

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

2410  : void
2411  {
2412  $val = ($form->getInput('list_presentation') === "tile")
2413  ? "tile"
2414  : "";
2415  ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
2417  $this->object->getId(),
2418  "tile_size",
2419  (string) ((int) $form->getInput('tile_size'))
2420  );
2421  }
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 2172 of file class.ilContainerGUI.php.

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

2172  : void
2173  {
2174  $ilUser = $this->user;
2175 
2177  if ($form->checkInput()) {
2178  $ilUser->resetPassword($this->form->getInput('new_password'), $this->form->getInput('new_password'));
2179  $this->tpl->setOnScreenMessage('success', $this->lng->txt('webdav_pwd_instruction_success'), true);
2180  $this->showPasswordInstructionObject(false);
2181  return;
2182  }
2185  }
initFormPasswordInstruction()
Init password form.
showPasswordInstructionObject(bool $a_init=true)
ilPropertyFormGUI $form
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

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

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

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

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

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

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

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

2535  : void
2536  {
2537  $settings = new ilContainerSortingSettings($this->object->getId());
2538  $settings->setSortMode((int) $form->getInput("sorting"));
2539 
2540  switch ($form->getInput('sorting')) {
2542  $settings->setSortDirection((int) $form->getInput('title_sorting_direction'));
2543  break;
2545  $settings->setSortDirection((int) $form->getInput('activation_sorting_direction'));
2546  break;
2548  $settings->setSortDirection((int) $form->getInput('creation_sorting_direction'));
2549  break;
2551  $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
2552  $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
2553  $settings->setSortDirection((int) $form->getInput('manual_sorting_direction'));
2554  break;
2555  }
2556 
2557  $settings->update();
2558  }
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 1881 of file class.ilContainerGUI.php.

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

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

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

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

References addStandardContainerSubTabs().

Referenced by renderObject().

484  : void
485  {
487  }
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 816 of file class.ilContainerGUI.php.

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

816  : void
817  {
818  $lng = $this->lng;
819 
820  if (!$this->isActiveAdministrationPanel()
821  || strtolower($this->ctrl->getCmdClass()) !== "ilcontainerpagegui") {
822  return;
823  }
824 
825  $lng->loadLanguageModule("content");
826  //$tabs_gui = new ilTabsGUI();
827  //$tabs_gui->setSubTabs();
828 
829  // back to upper context
830  $this->tabs_gui->setBackTarget(
831  $this->lng->txt("obj_cat"),
832  $this->ctrl->getLinkTarget($this, ""),
833  ilFrameTargetInfo::_getFrame("MainContent")
834  );
835 
836  $this->tabs_gui->addTarget(
837  "edit",
838  $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view"),
839  ["", "view"],
840  "ilcontainerpagegui"
841  );
842 
843  //$this->tpl->setTabs($tabs_gui->getHTML());
844  }
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 2685 of file class.ilContainerGUI.php.

References ILIAS\Repository\ctrl().

2685  : void
2686  {
2687  $this->ctrl->setReturn($this, "");
2688  }
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )
protected

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

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

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

342  : void
343  {
344  if (ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
345  $this->tpl->setTitle($this->object->getTitle(), true);
346  } else {
347  parent::setTitleAndDescription();
348  }
349  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( )

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

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

Referenced by renderObject().

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

◆ showContainerFilter()

ilContainerGUI::showContainerFilter ( )
protected

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

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

Referenced by renderObject().

2717  : void
2718  {
2719  global $DIC;
2720  if (!is_null($this->ui_filter)) {
2721  $renderer = $DIC->ui()->renderer();
2722 
2723  $main_tpl = $this->tpl;
2724  $main_tpl->setFilter($renderer->render($this->ui_filter));
2725  if ($this->container_user_filter->isEmpty() && !ilContainer::_lookupContainerSetting(
2726  $this->object->getId(),
2727  "filter_show_empty",
2728  '0'
2729  )) {
2730  $this->tpl->setOnScreenMessage('info', $this->lng->txt("cont_filter_empty"));
2731  }
2732  }
2733  }
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 2075 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(), ilObjRootFolderGUI\executeCommand(), ilObjCategoryGUI\executeCommand(), ilObjFolderGUI\executeCommand(), and ilObjCourseGUI\executeCommand().

2075  : void
2076  {
2077  $ctrl = $this->ctrl;
2078  $tabs = $this->tabs;
2079  $tabs->clearTargets();
2080  $page_gui = new ilContainerPageGUI($this->object->getId());
2081  $tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($page_gui, "edit"));
2082  }
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 655 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().

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

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

Referenced by savePasswordObject().

2129  : void {
2130  global $DIC;
2131  $tpl = $this->tpl;
2132  $ilToolbar = $this->toolbar;
2133 
2134  if ($a_init) {
2135  $this->tpl->setOnScreenMessage('info', $this->lng->txt('webdav_pwd_instruction'));
2136  $this->initFormPasswordInstruction();
2137  }
2138 
2139  $uri_builder = new ilWebDAVUriBuilder($DIC->http()->request());
2140  $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
2141 
2142  $this->gui->button(
2143  $this->lng->txt("mount_webfolder"),
2144  "#"
2145  )->onClick("triggerWebDAVModal('$href'); return false;")->toToolbar();
2146 
2147  $tpl->setContent($this->form->getHTML());
2148  }
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, string $submit_caption="")
getUriToMountInstructionModalByRef(int $a_ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

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

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

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

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

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

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

Referenced by renderObject().

351  : void
352  {
353  if ($this->isActiveOrdering()) {
354  return;
355  }
356  $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
357  $gui->render();
358  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Container InternalGUIService $gui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsPageEditor()

ilContainerGUI::supportsPageEditor ( )
protected

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

Referenced by renderObject().

467  : bool
468  {
469  return true;
470  }
+ Here is the caller graph for this function:

◆ trashApplyFilterObject()

ilContainerGUI::trashApplyFilterObject ( )

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

References trashHandleFilter().

2583  : void
2584  {
2585  $this->trashHandleFilter(true, false);
2586  }
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 2593 of file class.ilContainerGUI.php.

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

Referenced by trashApplyFilterObject(), and trashResetFilterObject().

2593  : void
2594  {
2595  $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2596  $trash_table->init();
2597  $trash_table->resetOffset();
2598  if ($action_reset) {
2599  $trash_table->resetFilter();
2600  }
2601  if ($action_apply) {
2602  $trash_table->writeFilterToSession();
2603  }
2604  $this->trashObject();
2605  }
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 2563 of file class.ilContainerGUI.php.

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

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

2563  : void
2564  {
2565  $this->checkPermission("write");
2566  $tpl = $this->tpl;
2567 
2568  $this->tabs_gui->activateTab('trash');
2569 
2570  $this->lng->loadLanguageModule('cont');
2571  $tpl->setOnScreenMessage('info', $this->lng->txt('cont_trash_general_usage'));
2572 
2573  $trash_table = new ilTrashTableGUI($this, 'trash', $this->object->getRefId());
2574  $trash_table->init();
2575  $trash_table->parse();
2576 
2577  $trash_table->setFilterCommand('trashApplyFilter');
2578  $trash_table->setResetCommand('trashResetFilter');
2579 
2580  $tpl->setContent($trash_table->getHTML());
2581  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
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 2588 of file class.ilContainerGUI.php.

References trashHandleFilter().

2588  : void
2589  {
2590  $this->trashHandleFilter(false, true);
2591  }
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 2626 of file class.ilContainerGUI.php.

References ILIAS\Repository\ctrl().

Referenced by ilObjLearningSequenceGUI\executeCommand().

2626  : void
2627  {
2628  $ru = new ilRepositoryTrashGUI($this);
2629  $ru->restoreObjects(
2630  $this->requested_ref_id,
2631  $this->std_request->getTrashIds()
2632  );
2633  $this->ctrl->redirect($this, "trash");
2634  }
Repository GUI Utilities.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $adminCommands

bool ilContainerGUI::$adminCommands = false
protected

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

◆ $app_event_handler

ilAppEventHandler ilContainerGUI::$app_event_handler
protected

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

Referenced by ilObjLearningSequenceGUI\afterSave().

◆ $bl_cnt

int ilContainerGUI::$bl_cnt = 1

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

◆ $clipboard

ClipboardManager ilContainerGUI::$clipboard
protected

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

◆ $component_factory

ilComponentFactory ilContainerGUI::$component_factory
protected

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

◆ $container_filter_service

ilContainerFilterService ilContainerGUI::$container_filter_service
protected

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

Referenced by initFilter().

◆ $container_user_filter

ilContainerUserFilter ilContainerGUI::$container_user_filter = null
protected

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

◆ $content_style_domain

ILIAS Style Content DomainService ilContainerGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilContainerGUI::$content_style_gui
protected

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

◆ $current_position

int ilContainerGUI::$current_position = 0
protected

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

◆ $domain

ILIAS Container InternalDomainService ilContainerGUI::$domain
protected

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

◆ $edit_order

bool ilContainerGUI::$edit_order = false
protected

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

Referenced by isActiveOrdering(), and showAdministrationPanel().

◆ $error

◆ $form

◆ $global_screen

Services ilContainerGUI::$global_screen
protected

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

◆ $gui

◆ $item_presentation

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

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

Referenced by getItemPresentation().

◆ $log

◆ $mode_manager

ModeManager ilContainerGUI::$mode_manager = null
protected

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

Referenced by getModeManager().

◆ $multi_download_enabled

bool ilContainerGUI::$multi_download_enabled = false

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

Referenced by isMultiDownloadEnabled().

◆ $obj_data_cache

ilObjectDataCache ilContainerGUI::$obj_data_cache
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $obj_definition

ilObjectDefinition ilContainerGUI::$obj_definition
protected

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

Referenced by copyObject().

◆ $rbacadmin

ilRbacAdmin ilContainerGUI::$rbacadmin
protected

◆ $rbacreview

◆ $rbacsystem

◆ $requested_redirectSource

string ilContainerGUI::$requested_redirectSource = ""
protected

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

◆ $std_request

StandardGUIRequest ilContainerGUI::$std_request
protected

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

◆ $tabs

◆ $ui

UIServices ilContainerGUI::$ui
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $ui_filter

Standard ilContainerGUI::$ui_filter = null
protected

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


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