ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContainerGUI Class Reference

Class ilContainerGUI. More...

+ Inheritance diagram for ilContainerGUI:
+ Collaboration diagram for ilContainerGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard 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 ()
 
 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 ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 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 ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 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)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 getTreeSelectorGUI ($cmd)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $app_event_handler
 
 $ui
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Private Member Functions

 addDownloadButton (&$tpl, &$toolbar)
 
 downloadMultipleObjects ($a_ref_ids)
 

Static Private Member Functions

static recurseFolder ($refid, $title, $tmpdir)
 private functions which iterates through all folders and files and create an according file structure in a temporary directory. More...
 
static copyFile ($obj_id, $title, $tmpdir)
 

Detailed Description

Class ilContainerGUI.

This is a base GUI class for all container objects in ILIAS: root folder, course, group, category, folder

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
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
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilContainerGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor public.

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

References $DIC, ilObjectGUI\$lng, $rbacsystem, settings(), and user().

112  {
113  global $DIC;
114 
115  $this->lng = $DIC->language();
116  $this->tpl = $DIC["tpl"];
117  $this->ctrl = $DIC->ctrl();
118  $this->tabs = $DIC->tabs();
119  $this->settings = $DIC->settings();
120  $this->user = $DIC->user();
121  $this->db = $DIC->database();
122  $this->access = $DIC->access();
123  $this->tree = $DIC->repositoryTree();
124  $this->error = $DIC["ilErr"];
125  $this->obj_definition = $DIC["objDefinition"];
126  $this->rbacadmin = $DIC->rbac()->admin();
127  $this->rbacreview = $DIC->rbac()->review();
128  $this->log = $DIC["ilLog"];
129  $this->obj_data_cache = $DIC["ilObjDataCache"];
130  $this->toolbar = $DIC->toolbar();
131  $this->plugin_admin = $DIC["ilPluginAdmin"];
132  $this->app_event_handler = $DIC["ilAppEventHandler"];
133  $this->ui = $DIC->ui();
134  $rbacsystem = $DIC->rbac()->system();
135  $lng = $DIC->language();
136 
137  $this->rbacsystem = $rbacsystem;
138 
139  $lng->loadLanguageModule("cntr");
140  $lng->loadLanguageModule('cont');
141 
142  // prepare output things should generally be made in executeCommand
143  // method (maybe dependent on current class/command
144  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
145  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ __showTimingsButton()

ilContainerGUI::__showTimingsButton ( $tpl)

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

References ilObjectGUI\$tpl, and ilObjectGUI\$tree.

824  {
825  $tree = $this->tree;
826 
827  if (!$tree->checkForParentType($this->object->getRefId(), 'crs')) {
828  return false;
829  }
830  $tpl->setCurrentBlock("custom_button");
831  $tpl->setVariable("ADMIN_MODE_LINK", $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'editTimings'));
832  $tpl->setVariable("TXT_ADMIN_MODE", $this->lng->txt('timings_edit'));
833  $tpl->parseCurrentBlock();
834  return true;
835  }

◆ _buildPath()

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

build path

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

References ilObjectGUI\$data, $DIC, $path, and ilObjectGUI\$tree.

2957  {
2958  global $DIC;
2959 
2960  $tree = $DIC->repositoryTree();
2961 
2962  $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2963  $counter = 0;
2964  foreach ($path_arr as $data) {
2965  if ($counter++) {
2966  $path .= " > ";
2967  }
2968  $path .= $data['title'];
2969  }
2970 
2971  return $path;
2972  }
$path
Definition: aliased.php:25
global $DIC
Definition: saml.php:7

◆ addDownloadButton()

ilContainerGUI::addDownloadButton ( $tpl,
$toolbar 
)
private

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

References $toolbar, ilObjectGUI\$tpl, $url, and ilSubmitButton\getInstance().

Referenced by showAdministrationPanel().

801  {
802  $folder_set = new ilSetting("fold");
803  if (!$folder_set->get("bgtask_download", 0)) {
804  $toolbar->addFormButton(
805  $this->lng->txt('download_selected_items'),
806  'download'
807  );
808  } else {
809  $url = $this->ctrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjfoldergui", "ilbackgroundtaskhub"), "", "", true, false);
810  $tpl->addJavaScript("Services/BackgroundTask/js/BgTask.js");
811  $tpl->addOnLoadCode("il.BgTask.initMultiForm('ilFolderDownloadBackgroundTaskHandler');");
812  $tpl->addOnLoadCode('il.BgTask.setAjax("' . $url . '");');
813 
814  include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
815  $button = ilSubmitButton::getInstance();
816  $button->setCaption("download_selected_items");
817  $button->addCSSClass("ilbgtasksubmit");
818  $button->setCommand("download");
819  $toolbar->addButtonInstance($button);
820  }
821  }
$url
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addHeaderRow()

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

adds a header row to a block template

Parameters
object$a_tplblock template
string$a_typeobject type private

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

References $a_type, $DIC, $ilSetting, $settings, $title, ilContainerSortingSettings\_lookupSortMode(), ilUtil\getImagePath(), isActiveAdministrationPanel(), and ilContainer\SORT_MANUAL.

1148  {
1149  $icon = ilUtil::getImagePath("icon_" . $a_type . ".svg");
1150  $title = $this->lng->txt("objs_" . $a_type);
1151 
1152  if ($a_show_image) {
1153  $a_tpl->setCurrentBlock("container_header_row_image");
1154  $a_tpl->setVariable("HEADER_IMG", $icon);
1155  $a_tpl->setVariable("HEADER_ALT", $title);
1156  } else {
1157  $a_tpl->setCurrentBlock("container_header_row");
1158  }
1159 
1160  $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
1161  $a_tpl->parseCurrentBlock();
1162  //$a_tpl->touchBlock("container_row");
1163  }
$a_type
Definition: workflow.php:92
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ addMessageRow()

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

add message row

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

References $a_type, and $type.

1238  {
1239  $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1240  ? "row_type_2"
1241  : "row_type_1";
1242 
1243  $a_tpl->touchBlock($this->cur_row_type);
1244 
1245  $type = $this->lng->txt("obj_" . $a_type);
1246  $a_message = str_replace("[type]", $type, $a_message);
1247 
1248  $a_tpl->setVariable("ROW_NBSP", " ");
1249 
1250  $a_tpl->setCurrentBlock("container_standard_row");
1251  $a_tpl->setVariable(
1252  "BLOCK_ROW_CONTENT",
1253  $a_message
1254  );
1255  $a_tpl->parseCurrentBlock();
1256  $a_tpl->touchBlock("container_row");
1257  }
$type
$a_type
Definition: workflow.php:92

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Add page tabs.

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

References ilObjectGUI\$ctrl, $ilCtrl, and $tabs.

387  {
388  $ilTabs = $this->tabs;
390 
391  $ilTabs->addTarget(
392  "obj_sty",
393  $ilCtrl->getLinkTarget($this, 'editStyleProperties'),
394  "editStyleProperties"
395  );
396  }
global $ilCtrl
Definition: ilias.php:18

◆ addStandardContainerSubTabs()

ilContainerGUI::addStandardContainerSubTabs (   $a_include_view = true)

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

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

References $_SESSION, $access, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, $ilUser, ilObjectGUI\$lng, $settings, $tabs, $user, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

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

1297  {
1298  $ilTabs = $this->tabs;
1299  $ilAccess = $this->access;
1300  $lng = $this->lng;
1301  $ilCtrl = $this->ctrl;
1302  $ilUser = $this->user;
1304 
1305  if (!is_object($this->object)) {
1306  return;
1307  }
1308 
1309  if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId())) {
1310  if (!$this->isActiveAdministrationPanel()) {
1311  $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "view"));
1312  } else {
1313  $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
1314  }
1315  }
1316 
1317  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1318  (
1319  $this->adminCommands ||
1320  (is_object($this->object) &&
1321  ($ilAccess->checkAccess("write", "", $this->object->getRefId())))
1322  ||
1323  (is_object($this->object) &&
1324  ($this->object->getHiddenFilesFound())) ||
1325  $_SESSION["clipboard"]
1326  )
1327  ) {
1328  if ($this->isActiveAdministrationPanel()) {
1329  $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
1330  } else {
1331  $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
1332  }
1333  }
1334  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1335  is_object($this->object) &&
1336  $ilAccess->checkAccess("write", "", $this->object->getRefId()) /* &&
1337  $this->object->getOrderType() == ilContainer::SORT_MANUAL */ // always on because of custom block order
1338  ) {
1339  $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
1340  }
1341  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1342  is_object($this->object) &&
1343  $ilAccess->checkAccess("write", "", $this->object->getRefId())
1344  ) {
1345  if ($ilSetting->get("enable_cat_page_edit")) {
1346  $ilTabs->addSubTab(
1347  "page_editor",
1348  $lng->txt("cntr_text_media_editor"),
1349  $ilCtrl->getLinkTarget($this, "editPageFrame"),
1350  ilFrameTargetInfo::_getFrame("MainContent")
1351  );
1352  }
1353  }
1354  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToDeskObject()

ilContainerGUI::addToDeskObject ( )
See also
ilDesktopItemHandling::addToDesk()

Implements ilDesktopItemHandling.

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

References $ilSetting, ilObjectGUI\$lng, $settings, ilDesktopItemGUI\addToDesktop(), and renderObject().

Referenced by ilObjLearningSequenceGUI\executeCommand().

1452  {
1454  $lng = $this->lng;
1455 
1456  if ((int) $ilSetting->get('disable_my_offers')) {
1457  return $this->renderObject();
1458  }
1459 
1460  include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1462  ilUtil::sendSuccess($lng->txt("added_to_desktop"));
1463  $this->renderObject();
1464  }
renderObject()
render the object
static addToDesktop()
Add desktop item public.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

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

References ilObjectGUI\getDidacticTemplateVar(), and ilDidacticTemplateObjSettings\lookupTemplateId().

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

203  {
204  // check if template is changed
205  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
206  $current_tpl_id = (int) ilDidacticTemplateObjSettings::lookupTemplateId(
207  $this->object->getRefId()
208  );
209  $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
210 
211  if ($new_tpl_id != $current_tpl_id) {
212  $_REQUEST['tplid'] = $new_tpl_id;
213 
214  // redirect to didactic template confirmation
215  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
216  $this->ctrl->setReturn($this, 'edit');
217  $this->ctrl->setCmdClass('ildidactictemplategui');
218  $this->ctrl->setCmd('confirmTemplateSwitch');
219  $dtpl_gui = new ilDidacticTemplateGUI($this);
220  return $this->ctrl->forwardCommand($dtpl_gui);
221  }
222  parent::afterUpdate();
223  }
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
GUI class for didactic template settings inside repository objects.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allowBlocksConfigure()

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

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

2671  {
2672  return true;
2673  }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

Referenced by setColumnSettings().

2663  {
2664  return true;
2665  }
+ Here is the caller graph for this function:

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

References $_SESSION, ilObjectGUI\$ctrl, and $ilCtrl.

2252  {
2253  $ilCtrl = $this->ctrl;
2254 
2255  unset($_SESSION['clipboard']);
2256  $ilCtrl->returnToParent($this);
2257  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

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

1044  {
1045  $this->ctrl->redirect($this, "");
1046  }

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

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

1097  {
1098  $this->adminCommands = false;
1099  }

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

public

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

References $_POST, and $_SESSION.

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

1868  {
1869  unset($_SESSION["clipboard"]);
1870  unset($_SESSION["il_rep_clipboard"]);
1871 
1872  //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1873 
1874  // only redirect if clipboard was cleared
1875  if (isset($_POST["cmd"]["clear"])) {
1876  ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"), true);
1877  // fixed mantis 0018474: Clear Clipboard redirects to Subtab View, instead of Subtab "Edit Multiple"
1878  $this->ctrl->redirect($this, 'render');
1879  }
1880  }
$_SESSION["AccountId"]
$_POST["username"]
+ Here is the caller graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

show clipboard

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

References $_SESSION, ilObjectGUI\$ctrl, ilObjectGUI\$data, $error, $ilCtrl, ilObjectGUI\$ilErr, $ilLog, ilObjectGUI\$lng, $log, $message, ilObjectGUI\$ref_id, $tab, $tabs, $toolbar, ilObjectGUI\$tpl, and ilObjectFactory\getInstanceByRefId().

2557  {
2558  $ilErr = $this->error;
2559  $ilLog = $this->log;
2560  $ilTabs = $this->tabs;
2561  $tpl = $this->tpl;
2562  $ilToolbar = $this->toolbar;
2563  $ilCtrl = $this->ctrl;
2564  $lng = $this->lng;
2565 
2566  $ilTabs->activateTab("clipboard");
2567 
2568  // function should not be called if clipboard is empty
2569  if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard'])) {
2570  $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2571  $ilLog->write($message, $ilLog->FATAL);
2572  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->WARNING);
2573  }
2574 
2575  $data = array();
2576  foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id) {
2577  if (!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
2578  continue;
2579  }
2580 
2581  $data[] = array(
2582  "type" => $tmp_obj->getType(),
2583  "type_txt" => $this->lng->txt("obj_" . $tmp_obj->getType()),
2584  "title" => $tmp_obj->getTitle(),
2585  "cmd" => ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]),
2586  "ref_id" => $ref_id,
2587  "obj_id" => $tmp_obj->getId()
2588  );
2589 
2590  unset($tmp_obj);
2591  }
2592 
2593  include_once("./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2594  $tab = new ilObjClipboardTableGUI($this, "clipboard");
2595  $tab->setData($data);
2596  $tpl->setContent($tab->getHTML());
2597 
2598  if (count($data) > 0) {
2599  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2600  $ilToolbar->addFormButton(
2601  $lng->txt("insert_object_here"),
2602  "paste"
2603  );
2604  $ilToolbar->addFormButton(
2605  $lng->txt("clear_clipboard"),
2606  "clear"
2607  );
2608  }
2609 
2610  return true;
2611  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18
catch(Exception $e) $message
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

public

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

References $_COOKIE, $_GET, $_POST, $access, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $ilLog, $ilUser, $log, PHPMailer\PHPMailer\$options, $rbacsystem, ilObjectGUI\$ref_id, $result, ilObjectGUI\$tree, $user, ilCopyWizardOptions\_isFinished(), ilObjectGUI\createObject(), ilObjectFactory\getInstanceByRefId(), ilUtil\sendFailure(), and ilUtil\sendInfo().

2816  {
2817  $ilLog = $this->log;
2818  $ilCtrl = $this->ctrl;
2819 
2820  include_once('./Services/Link/classes/class.ilLink.php');
2821  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2822 
2823  $ilAccess = $this->access;
2824  $ilErr = $this->error;
2826  $tree = $this->tree;
2827  $ilUser = $this->user;
2828 
2829  $new_type = $_REQUEST['new_type'];
2830  $ref_id = (int) $_GET['ref_id'];
2831  $clone_source = (int) $_REQUEST['clone_source'];
2832 
2833  if (!$rbacsystem->checkAccess('create', $ref_id, $new_type)) {
2834  $ilErr->raiseError($this->lng->txt('permission_denied'));
2835  }
2836  if (!$clone_source) {
2837  ilUtil::sendFailure($this->lng->txt('select_one'));
2838  $this->createObject();
2839  return false;
2840  }
2841  if (!$ilAccess->checkAccess('write', '', $clone_source, $new_type)) {
2842  $ilErr->raiseError($this->lng->txt('permission_denied'));
2843  }
2844 
2845  $options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
2846  $orig = ilObjectFactory::getInstanceByRefId($clone_source);
2847  $result = $orig->cloneAllObject($_COOKIE[session_name()], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
2848 
2849  include_once './Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
2850  if (ilCopyWizardOptions::_isFinished($result['copy_id'])) {
2851  ilUtil::sendSuccess($this->lng->txt("object_duplicated"), true);
2852  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result['ref_id']);
2853  $ilCtrl->redirectByClass("ilrepositorygui", "");
2854  } else {
2855  ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"), true);
2856  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
2857  $ilCtrl->redirectByClass("ilrepositorygui", "");
2858  }
2859  }
$_COOKIE['client_id']
Definition: server.php:9
$result
$_GET["client_id"]
createObject()
create new object form
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _isFinished($a_copy_id)
check if copy is finished
$ilUser
Definition: imgupload.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$_POST["username"]
+ Here is the call graph for this function:

◆ cloneNodes()

ilContainerGUI::cloneNodes (   $srcRef,
  $dstRef,
$mapping,
  $newName = null 
)

Recursively clones all nodes of the RBAC tree.

private

Parameters
integerref_id of source object
integerref_id of destination object
arraymapping new_ref_id => old_ref_id
stringthe new name of the copy (optional).
Returns
The ref_id pointing to the cloned object.

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

References ilObjectGUI\$tree, Monolog\Handler\error_log(), and ilObjectFactory\getInstanceByRefId().

Referenced by performPasteIntoMultipleObjectsObject().

2894  {
2895  $tree = $this->tree;
2896 
2897  // clone the source node
2898  $srcObj = ilObjectFactory::getInstanceByRefId($srcRef);
2899  error_log(__METHOD__ . ' cloning srcRef=' . $srcRef . ' dstRef=' . $dstRef . '...');
2900  $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2901  error_log(__METHOD__ . ' ...cloning... newRef=' . $newRef . '...');
2902 
2903  // We must immediately apply a new name to the object, to
2904  // prevent confusion of WebDAV clients about having two objects with identical
2905  // name in the repository.
2906  if (!is_null($newName)) {
2907  $newObj = ilObjectFactory::getInstanceByRefId($newRef);
2908  $newObj->setTitle($newName);
2909  $newObj->update();
2910  unset($newObj);
2911  }
2912  unset($srcObj);
2913  $mapping[$newRef] = $srcRef;
2914 
2915  // clone all children of the source node
2916  $children = $tree->getChilds($srcRef);
2917  foreach ($tree->getChilds($srcRef) as $child) {
2918  // Don't clone role folders, because it does not make sense to clone local roles
2919  // FIXME - Maybe it does make sense (?)
2920  if ($child["type"] != 'rolf') {
2921  $this->cloneNodes($child["ref_id"], $newRef, $mapping);
2922  } else {
2923  if (count($rolf = $tree->getChildsByType($newRef, "rolf"))) {
2924  $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
2925  }
2926  }
2927  }
2928  error_log(__METHOD__ . ' ...cloned srcRef=' . $srcRef . ' dstRef=' . $dstRef . ' newRef=' . $newRef);
2929  return $newRef;
2930  }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageListObject()

ilContainerGUI::cloneWizardPageListObject ( )

public

Parameters

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

References cloneWizardPageObject().

2695  {
2696  $this->cloneWizardPageObject(false);
2697  }
cloneWizardPageObject($a_tree_view=true)
Show clone wizard page for container objects.
+ Here is the call graph for this function:

◆ cloneWizardPageObject()

ilContainerGUI::cloneWizardPageObject (   $a_tree_view = true)

Show clone wizard page for container objects.

public

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

References $_SESSION, $html, $i, $obj_data_cache, ilObjectGUI\$tree, $type, ilCopyWizardPageFactory\_getInstanceByType(), ilObjectGUI\createObject(), ilUtil\getImagePath(), and ilUtil\sendFailure().

Referenced by cloneWizardPageListObject(), and cloneWizardPageTreeObject().

2706  {
2707  include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2708 
2709  $ilObjDataCache = $this->obj_data_cache;
2710  $tree = $this->tree;
2711 
2712  if (!$_REQUEST['clone_source']) {
2713  ilUtil::sendFailure($this->lng->txt('select_one'));
2714  if (isset($_SESSION['wizard_search_title'])) {
2715  $this->searchCloneSourceObject();
2716  } else {
2717  $this->createObject();
2718  }
2719  return false;
2720  }
2721  $source_id = $_REQUEST['clone_source'];
2722  $new_type = $_REQUEST['new_type'];
2723  $this->ctrl->setParameter($this, 'clone_source', (int) $_REQUEST['clone_source']);
2724  $this->ctrl->setParameter($this, 'new_type', $new_type);
2725 
2726 
2727  // Generell JavaScript
2728  $this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
2729  $this->tpl->setVariable('BODY_ATTRIBUTES', 'onload="ilDisableChilds(\'cmd\');"');
2730 
2731 
2732  $this->tpl->addBlockFile(
2733  'ADM_CONTENT',
2734  'adm_content',
2735  'tpl.container_wizard_page.html',
2736  "Services/Container"
2737  );
2738  $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
2739  $this->tpl->setVariable('TYPE_IMG', ilUtil::getImagePath('icon_' . $new_type . '.svg'));
2740  $this->tpl->setVariable('ALT_IMG', $this->lng->txt('obj_' . $new_type));
2741  $this->tpl->setVariable('TXT_DUPLICATE', $this->lng->txt($new_type . '_wizard_page'));
2742  $this->tpl->setVariable('INFO_DUPLICATE', $this->lng->txt($new_type . '_copy_threads_info'));
2743  $this->tpl->setVariable('BTN_COPY', $this->lng->txt('obj_' . $new_type . '_duplicate'));
2744  $this->tpl->setVariable('BTN_BACK', $this->lng->txt('btn_back'));
2745  if (isset($_SESSION['wizard_search_title'])) {
2746  $this->tpl->setVariable('CMD_BACK', 'searchCloneSource');
2747  } else {
2748  $this->tpl->setVariable('CMD_BACK', 'create');
2749  }
2750 
2751  $this->tpl->setVariable('BTN_TREE', $this->lng->txt('treeview'));
2752  $this->tpl->setVariable('BTN_LIST', $this->lng->txt('flatview'));
2753 
2754  // Fill item rows
2755  // tree view
2756  if ($a_tree_view) {
2757  $first = true;
2758  $has_items = false;
2759  foreach ($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id), true) as $node) {
2760  if ($first == true) {
2761  $first = false;
2762  continue;
2763  }
2764 
2765  if ($node['type'] == 'rolf') {
2766  continue;
2767  }
2768 
2769  $has_items = true;
2770 
2771  for ($i = $source_node['depth'];$i < $node['depth']; $i++) {
2772  $this->tpl->touchBlock('padding');
2773  $this->tpl->touchBlock('end_padding');
2774  }
2775  // fill options
2776  $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id, $node['type']);
2777  $copy_wizard_page->fillTreeSelection($node['ref_id'], $node['type'], $node['depth']);
2778 
2779  $this->tpl->setCurrentBlock('tree_row');
2780  $this->tpl->setVariable('TREE_IMG', ilUtil::getImagePath('icon_' . $node['type'] . '.svg'));
2781  $this->tpl->setVariable('TREE_ALT_IMG', $this->lng->txt('obj_' . $node['type']));
2782  $this->tpl->setVariable('TREE_TITLE', $node['title']);
2783  $this->tpl->parseCurrentBlock();
2784  }
2785  if (!$has_items) {
2786  $this->tpl->setCurrentBlock('no_content');
2787  $this->tpl->setVariable('TXT_NO_CONTENT', $this->lng->txt('container_no_items'));
2788  $this->tpl->parseCurrentBlock();
2789  } else {
2790  $this->tpl->setCurrentBlock('tree_footer');
2791  $this->tpl->setVariable('TXT_COPY_ALL', $this->lng->txt('copy_all'));
2792  $this->tpl->setVariable('TXT_LINK_ALL', $this->lng->txt('link_all'));
2793  $this->tpl->setVariable('TXT_OMIT_ALL', $this->lng->txt('omit_all'));
2794  $this->tpl->parseCurrentBlock();
2795  }
2796  } else {
2797  foreach ($tree->getSubTreeTypes($source_id, array('rolf','crs')) as $type) {
2798  $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id, $type);
2799  if (strlen($html = $copy_wizard_page->getWizardPageBlockHTML())) {
2800  $this->tpl->setCurrentBlock('obj_row');
2801  $this->tpl->setVariable('ITEM_BLOCK', $html);
2802  $this->tpl->parseCurrentBlock();
2803  }
2804  }
2805  }
2806  }
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.
$_SESSION["AccountId"]
$type
createObject()
create new object form
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$i
Definition: disco.tpl.php:19
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageTreeObject()

ilContainerGUI::cloneWizardPageTreeObject ( )

public

Parameters

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

References cloneWizardPageObject().

2683  {
2684  $this->cloneWizardPageObject(true);
2685  }
cloneWizardPageObject($a_tree_view=true)
Show clone wizard page for container objects.
+ Here is the call graph for this function:

◆ confirmRemoveFromSystemObject()

ilContainerGUI::confirmRemoveFromSystemObject ( )

confirmation screen remove from system

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

References $_POST, ilObjectGUI\$lng, and ilUtil\sendFailure().

3792  {
3793  $lng = $this->lng;
3794  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3795 
3796  if (!isset($_POST["trash_id"])) {
3797  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3798  $this->ctrl->redirect($this, "trash");
3799  }
3800 
3801  $ru = new ilRepUtilGUI($this);
3802  $ru->confirmRemoveFromSystemObject($_POST["trash_id"]);
3803  }
Repository GUI Utilities.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ copyFile()

static ilContainerGUI::copyFile (   $obj_id,
  $title,
  $tmpdir 
)
staticprivate

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

References ilObjectGUI\$obj_id, $title, ilObjFile\_lookupAbsolutePath(), and ilUtil\getASCIIFilename().

1782  {
1783  $newFilename = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1784 
1785  // copy to temporary directory
1786  $oldFilename = ilObjFile::_lookupAbsolutePath($obj_id);
1787 
1788  if (!copy($oldFilename, $newFilename)) {
1789  throw new ilFileException("Could not copy " . $oldFilename . " to " . $newFilename);
1790  }
1791 
1792  touch($newFilename, filectime($oldFilename));
1793  }
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
Class to report exception.
static _lookupAbsolutePath($obj_id, $a_version=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.

public

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $obj_definition, ilObjectGUI\$objDefinition, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), initAndDisplayCopyIntoMultipleObjectsObject(), and ilUtil\sendInfo().

1568  {
1570  $ilCtrl = $this->ctrl;
1572  $ilErr = $this->error;
1573 
1574  $no_copy = [];
1575 
1576  if ($_GET["item_ref_id"] != "") {
1577  $_POST["id"] = array($_GET["item_ref_id"]);
1578  }
1579 
1580  if (!isset($_POST["id"])) {
1581  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1582  }
1583 
1584  // FOR ALL OBJECTS THAT SHOULD BE COPIED
1585  $containers = 0;
1586  foreach ($_POST["id"] as $ref_id) {
1587  // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1588  $node_data = $this->tree->getNodeData($ref_id);
1589 
1590  // count containers
1591  if ($objDefinition->isContainer($node_data["type"])) {
1592  $containers++;
1593  }
1594 
1595  $subtree_nodes = $this->tree->getSubTree($node_data);
1596 
1597  $all_node_data[] = $node_data;
1598  $all_subtree_nodes[] = $subtree_nodes;
1599 
1600  // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1601  foreach ($subtree_nodes as $node) {
1602  if ($node['type'] == 'rolf') {
1603  continue;
1604  }
1605 
1606  if (!$rbacsystem->checkAccess('visible,read,copy', $node["ref_id"])) {
1607  $no_copy[] = $node["ref_id"];
1608  }
1609  }
1610  }
1611 
1612  if ($containers > 0 && count($_POST["id"]) > 1) {
1613  $ilErr->raiseError($this->lng->txt("cntr_container_only_on_their_own"), $ilErr->MESSAGE);
1614  }
1615 
1616  // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1617  if (is_array($no_copy) && count($no_copy)) {
1618  $titles = array();
1619  foreach ((array) $no_copy as $copy_id) {
1620  $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($copy_id));
1621  }
1622  $ilErr->raiseError(
1623  $this->lng->txt("msg_no_perm_copy") . " " . implode(',', $titles),
1624  $ilErr->MESSAGE
1625  );
1626  }
1627 
1628  // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1629  if (count($_POST["id"]) == 1) {
1630  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $_POST["id"][0]);
1631  $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1632  } else {
1633  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $_POST["id"]));
1634  $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1635  }
1636 
1637  $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1638  $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1639  $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1640 
1641  ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"), true);
1642 
1644  } // END COPY
$_SESSION["AccountId"]
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _lookupObjId($a_id)
$_POST["username"]
+ Here is the call graph for this function:

◆ createStyleObject()

ilContainerGUI::createStyleObject ( )

Create Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

3111  {
3112  $ilCtrl = $this->ctrl;
3113 
3114  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
3115  }
global $ilCtrl
Definition: ilias.php:18

◆ cutObject()

ilContainerGUI::cutObject ( )

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

public

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), initAndDisplayMoveIntoObjectObject(), and ilUtil\sendInfo().

Referenced by ilObjLearningSequenceGUI\executeCommand().

1505  {
1507  $ilCtrl = $this->ctrl;
1508  $ilErr = $this->error;
1509 
1510  if ($_GET["item_ref_id"] != "") {
1511  $_POST["id"] = array($_GET["item_ref_id"]);
1512  }
1513 
1514  $no_cut = [];
1515 
1516  if (!isset($_POST["id"])) {
1517  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1518  }
1519 
1520  // FOR ALL OBJECTS THAT SHOULD BE COPIED
1521  foreach ($_POST["id"] as $ref_id) {
1522  // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1523  $node_data = $this->tree->getNodeData($ref_id);
1524  $subtree_nodes = $this->tree->getSubTree($node_data);
1525 
1526  $all_node_data[] = $node_data;
1527  $all_subtree_nodes[] = $subtree_nodes;
1528 
1529  // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1530  foreach ($subtree_nodes as $node) {
1531  if ($node['type'] == 'rolf') {
1532  continue;
1533  }
1534 
1535  if (!$rbacsystem->checkAccess('delete', $node["ref_id"])) {
1536  $no_cut[] = $node["ref_id"];
1537  }
1538  }
1539  }
1540  // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1541  if (count($no_cut)) {
1542  $titles = array();
1543  foreach ((array) $no_cut as $cut_id) {
1544  $titles[] = ilObject::_lookupTitle(ilObject::_lookupObjId($cut_id));
1545  }
1546  $ilErr->raiseError(
1547  $this->lng->txt("msg_no_perm_cut") . " " . implode(',', (array) $titles),
1548  $ilErr->MESSAGE
1549  );
1550  }
1551  $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1552  $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1553  $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1554 
1555  ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"), true);
1556 
1557  return $this->initAndDisplayMoveIntoObjectObject();
1558  } // END CUT
$_SESSION["AccountId"]
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _lookupObjId($a_id)
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteStyleObject()

ilContainerGUI::deleteStyleObject ( )

Delete Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

3131  {
3132  $ilCtrl = $this->ctrl;
3133 
3134  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
3135  }
global $ilCtrl
Definition: ilias.php:18

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

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

References $_SESSION.

1408  {
1409  $_SESSION["il_cont_admin_panel"] = false;
1410  $this->ctrl->redirect($this, "render");
1411  }
$_SESSION["AccountId"]

◆ downloadMultipleObjects()

ilContainerGUI::downloadMultipleObjects (   $a_ref_ids)
private

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

References $access, ilObjectGUI\$lng, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, ilObject\_isInTrash(), ilUtil\delDir(), ilUtil\deliverFile(), ilObjectFactory\getInstanceByRefId(), ilUtil\ilTempnam(), ilUtil\makeDir(), ilUtil\sendInfo(), and ilUtil\zip().

Referenced by downloadObject().

1695  {
1696  $lng = $this->lng;
1698  $ilAccess = $this->access;
1699 
1700  include_once 'Modules/Folder/classes/class.ilObjFolder.php';
1701  include_once 'Modules/File/classes/class.ilObjFile.php';
1702  include_once 'Modules/File/classes/class.ilFileException.php';
1703 
1704  // create temporary file to download
1705  $zip = PATH_TO_ZIP;
1706  $tmpdir = ilUtil::ilTempnam();
1707  ilUtil::makeDir($tmpdir);
1708 
1709  try {
1710  // copy each selected object
1711  foreach ($a_ref_ids as $ref_id) {
1712  if (!$ilAccess->checkAccess("read", "", $ref_id)) {
1713  continue;
1714  }
1715 
1716  if (ilObject::_isInTrash($ref_id)) {
1717  continue;
1718  }
1719 
1720  // get object
1722  $obj_type = $object->getType();
1723  if ($obj_type == "fold") {
1724  // copy folder to temp directory
1725  self::recurseFolder($ref_id, $object->getTitle(), $tmpdir);
1726  } elseif ($obj_type == "file") {
1727  // copy file to temp directory
1728  self::copyFile($object->getId(), $object->getTitle(), $tmpdir);
1729  }
1730  }
1731 
1732  // compress the folder
1733  $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) . ".zip";
1734  $tmpzipfile = ilUtil::ilTempnam() . ".zip";
1735  ilUtil::zip($tmpdir, $tmpzipfile, true);
1736  ilUtil::delDir($tmpdir);
1737  ilUtil::deliverFile($tmpzipfile, $deliverFilename, '', false, true, true);
1738  } catch (ilFileException $e) {
1739  ilUtil::sendInfo($e->getMessage(), true);
1740  }
1741  }
static _isInTrash($a_ref_id)
checks wether object is in trash
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class to report exception.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

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

References $_GET, $_POST, $error, ilObjectGUI\$ilErr, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, $type, downloadMultipleObjects(), and ilObjectFactory\getInstanceByRefId().

1647  {
1649  $ilErr = $this->error;
1650 
1651  $no_download = [];
1652  $no_perm = [];
1653 
1654  if ($_GET["item_ref_id"] != "") {
1655  $_POST["id"] = array($_GET["item_ref_id"]);
1656  }
1657 
1658  if (!isset($_POST["id"])) {
1659  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1660  }
1661 
1662  // FOR ALL OBJECTS THAT SHOULD BE DOWNLOADED
1663  foreach ($_POST["id"] as $ref_id) {
1665  $obj_type = $object->getType();
1666  if (!in_array($obj_type, array("fold", "file"))) {
1667  $no_download[] = $object->getType();
1668  } elseif (!$rbacsystem->checkAccess('read', $ref_id)) {
1669  $no_perm[] = $ref_id;
1670  }
1671  }
1672 
1673  // IF THERE IS ANY OBJECT THAT CANNOT BE DOWNLOADED
1674  if (count($no_download)) {
1675  $no_download = array_unique($no_download);
1676  foreach ($no_download as $type) {
1677  $txt_objs[] = $this->lng->txt("objs_" . $type);
1678  }
1679  $ilErr->raiseError(implode(', ', $txt_objs) . " " . $this->lng->txt("msg_obj_no_download"), $ilErr->MESSAGE);
1680  }
1681 
1682  // NO ACCESS
1683  if (count($no_perm)) {
1684  $ilErr->raiseError(
1685  $this->lng->txt("msg_obj_perm_download") . " " . implode(',', $no_perm),
1686  $ilErr->MESSAGE
1687  );
1688  }
1689 
1690  // download the objects
1691  $this->downloadMultipleObjects($_POST["id"]);
1692  }
$type
$_GET["client_id"]
downloadMultipleObjects($a_ref_ids)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$_POST["username"]
+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Edit order.

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

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

1417  {
1418  $ilTabs = $this->tabs;
1419 
1420  $this->edit_order = true;
1421  $_SESSION["il_cont_admin_panel"] = false;
1422  $this->renderObject();
1423 
1424  $ilTabs->activateSubTab("ordering");
1425  }
$_SESSION["AccountId"]
renderObject()
render the object
+ Here is the call graph for this function:

◆ editPageContentObject()

ilContainerGUI::editPageContentObject ( )

edit page content (for repository root node and categories)

public

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

References $_GET, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$obj_id, $rbacsystem, ilObjectGUI\$tpl, ilRTE\_getRTEClassname(), ilContainer\_lookupContainerSetting(), ilObject\_lookupObjectId(), ilObject\_lookupType(), ilUtil\getImagePath(), and ilUtil\prepareFormOutput().

932  {
934  $tpl = $this->tpl;
935  $lng = $this->lng;
938 
939  if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
940  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
941  }
942 
944  $this->object->getId(),
945  "xhtml_page"
946  );
947  if ($xpage_id > 0) {
948  include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
949  $xpage = new ilXHTMLPage($xpage_id);
950  $content = $xpage->getContent();
951  }
952 
953  // get template
954  $tpl->addBlockFile(
955  "ADM_CONTENT",
956  "adm_content",
957  "tpl.container_edit_page_content.html",
958  "Services/Container"
959  );
960  $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
961  $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
962  $tpl->setVariable(
963  "TXT_EDIT_PAGE_CONTENT",
964  $this->lng->txt("edit_page_content")
965  );
966  $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
967  $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
968  $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
969  $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
970  $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert.svg"));
971  $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
972  $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
973 
974  include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
975  include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
976  //$ta = new ilTextAreaInputGUI();
977  //$tags = $ta->getRteTagSet("extended_table_img");
978 
979  // add rte support
980  include_once "./Services/RTE/classes/class.ilRTE.php";
981  $rtestring = ilRTE::_getRTEClassname();
982  include_once "./Services/RTE/classes/class.$rtestring.php";
983  $rte = new $rtestring();
984  //$rte->addPlugin("latex");
985  include_once "./Services/Object/classes/class.ilObject.php";
987  $obj_type = ilObject::_lookupType($_GET["ref_id"], true);
988  $rte->addRTESupport($obj_id, $obj_type);
989  //$rte->setStyleSelect(true);
990  //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
991  }
static _getRTEClassname()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$_GET["client_id"]
static _lookupObjectId($a_ref_id)
lookup object id
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupType($a_id, $a_reference=false)
lookup object type
XHTML Page class.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

◆ editPageFrameObject()

ilContainerGUI::editPageFrameObject ( )

show page editor frameset

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

References $_SESSION, and ilContainer\_lookupContainerSetting().

913  {
914  // old tiny stuff
916  $this->object->getId(),
917  "xhtml_page"
918  );
919  if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std") {
920  $this->ctrl->redirect($this, "editPageContent");
921  } else {
922  $this->ctrl->redirectByClass(array("ilcontainerpagegui"), "edit");
923  }
924  }
$_SESSION["AccountId"]
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

◆ editStyleObject()

ilContainerGUI::editStyleObject ( )

Edit Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

3121  {
3122  $ilCtrl = $this->ctrl;
3123 
3124  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
3125  }
global $ilCtrl
Definition: ilias.php:18

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

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

References $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and initStylePropertiesForm().

2982  {
2983  $ilTabs = $this->tabs;
2984  $tpl = $this->tpl;
2985 
2986  $this->checkPermission("write");
2987 
2988  $this->initStylePropertiesForm();
2989  $tpl->setContent($this->form->getHTML());
2990 
2991  $ilTabs->activateTab("obj_sty");
2992  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
initStylePropertiesForm()
Init style properties form.
+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilContainerGUI::enableAdministrationPanelObject ( )

enable administration panel

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

References $_SESSION.

1399  {
1400  $_SESSION["il_cont_admin_panel"] = true;
1401  $this->ctrl->redirect($this, "render");
1402  }
$_SESSION["AccountId"]

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

References renderObject().

1488  {
1489  $this->multi_download_enabled = true;
1490  $this->renderObject();
1491  }
renderObject()
render the object
+ Here is the call graph for this function:

◆ executeCommand()

ilContainerGUI::executeCommand ( )

execute command note: this method is overwritten in all container objects

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

References $_GET, $ret, ilObjectGUI\$tpl, forwardToPageObject(), forwardToStyleSheet(), and prepareOutput().

152  {
153  $tpl = $this->tpl;
154 
155  $next_class = $this->ctrl->getNextClass();
156  $cmd = $this->ctrl->getCmd("render");
157 
158 
159  switch ($next_class) {
160  // page editing
161  case "ilcontainerpagegui":
162  if ($_GET["redirectSource"] != "ilinternallinkgui") {
163  $ret = $this->forwardToPageObject();
164  $tpl->setContent($ret);
165  } else {
166  return "";
167  }
168  break;
169 
170  case "ilobjstylesheetgui":
171  $this->forwardToStyleSheet();
172  break;
173 
174  default:
175  $this->prepareOutput();
176  $cmd .= "Object";
177  $this->$cmd();
178  break;
179  }
180  return true;
181  }
$_GET["client_id"]
prepareOutput($a_show_subobjects=true)
prepare output
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

◆ fileManagerLaunchObject()

ilContainerGUI::fileManagerLaunchObject ( )
protected

Launch jnlp.

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

References $_COOKIE, $ilUser, ilObjectGUI\$tpl, $user, exit, and ilFMSettings\getInstance().

3353  {
3354  $ilUser = $this->user;
3355 
3356  $tpl = new ilTemplate('tpl.fm_launch_ws.html', false, false, 'Services/WebServices/FileManager');
3357  $tpl->setVariable('JNLP_URL', ILIAS_HTTP_PATH . '/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3358  $tpl->setVariable('SESSION_ID', $_COOKIE[session_name()] . '::' . CLIENT_ID);
3359  $tpl->setVariable('UID', $ilUser->getId());
3360  $tpl->setVariable('REF_ID', $this->object->getRefId());
3361  $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH . '/webservice/soap/server.php?wsdl');
3362  $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
3363  $tpl->setVariable('REST_URI', ILIAS_HTTP_PATH . '/Services/WebServices/Rest/server.php');
3364  $tpl->setVariable('FILE_LOCKS', 0);
3365  $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
3366 
3367  include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3368  $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3369  $tpl->setVariable('HEADER_TITLE', $header_top_title ? $header_top_title : '');
3370  echo $tpl->get();
3371  exit;
3372  }
$_COOKIE['client_id']
Definition: server.php:9
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
exit
Definition: backend.php:16
static getInstance()
Get singleton instance.
+ Here is the call graph for this function:

◆ forwardToPageObject()

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $ret, $tabs, ilPageObject\_exists(), ilContainer\_lookupContainerSetting(), ilObjectGUI\checkPermission(), exit, ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilUtil\getImagePath(), and ilObjStyleSheet\getSyntaxStylePath().

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

265  {
266  $lng = $this->lng;
267  $ilTabs = $this->tabs;
269 
270  $cmd = $ilCtrl->getCmd();
271 
272  if (in_array($cmd, array("displayMediaFullscreen", "downloadFile", "displayMedia"))) {
273  $this->checkPermission("read");
274  } else {
275  $this->checkPermission("write");
276  }
277 
278  $ilTabs->clearTargets();
279 
280  if ($_GET["redirectSource"] == "ilinternallinkgui") {
281  exit;
282  }
283 
285  $this->object->getId(),
286  "xhtml_page"
287  );
288  if ($xpage_id > 0) {
289  $ilTabs->setBackTarget(
290  $lng->txt("cntr_back_to_old_editor"),
291  $ilCtrl->getLinkTarget($this, "switchToOldEditor"),
292  "_top"
293  );
294  } else {
295  $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=" . $this->object->getType() . "_" .
296  $this->object->getRefId(), "_top");
297  }
298 
299  // page object
300  include_once("./Services/Container/classes/class.ilContainerPage.php");
301  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
302 
303  $lng->loadLanguageModule("content");
304 
305  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
306  $this->tpl->setVariable(
307  "LOCATION_CONTENT_STYLESHEET",
308  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
309  );
310  $this->tpl->setCurrentBlock("SyntaxStyle");
311  $this->tpl->setVariable(
312  "LOCATION_SYNTAX_STYLESHEET",
314  );
315  $this->tpl->parseCurrentBlock();
316 
318  "cont",
319  $this->object->getId()
320  )) {
321  // doesn't exist -> create new one
322  $new_page_object = new ilContainerPage();
323  $new_page_object->setParentId($this->object->getId());
324  $new_page_object->setId($this->object->getId());
325  $new_page_object->createFromXML();
326  }
327 
328  // get page object
329  $this->ctrl->setReturnByClass("ilcontainerpagegui", "edit");
330  $page_gui = new ilContainerPageGUI($this->object->getId());
331  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
332  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
333  $this->object->getStyleSheetId(),
334  $this->object->getType()
335  ));
336 
337  $page_gui->setTemplateTargetVar("ADM_CONTENT");
338  $page_gui->setFileDownloadLink("");
339  $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
340  //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
341  $page_gui->setPresentationTitle("");
342  $page_gui->setTemplateOutput(false);
343 
344  // old editor information text
346  $this->object->getId(),
347  "xhtml_page"
348  );
349  if ($xpage_id > 0) {
350  $wtpl = new ilTemplate(
351  "tpl.cntr_old_editor_message.html",
352  true,
353  true,
354  "Services/Container"
355  );
356  $wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
357  $wtpl->setVariable(
358  "IMG_WARNING",
359  ilUtil::getImagePath("icon_alert.svg")
360  );
361  $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
362  $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
363  $wtpl->setVariable(
364  "HREF_SWITCH_TO_NEW_EDITOR",
365  $ilCtrl->getLinkTarget($this, "useNewEditor")
366  );
367  $wtpl->setVariable(
368  "TXT_MIGRATION_SWITCH",
369  $lng->txt("cntr_switch_to_new_editor_cmd")
370  );
371  $page_gui->setPrependingHtml($wtpl->get());
372  }
373 
374  // style tab
375  $page_gui->setTabHook($this, "addPageTabs");
376 
377  $ret = $this->ctrl->forwardCommand($page_gui);
378 
379  //$ret =& $page_gui->executeCommand();
380  return $ret;
381  }
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Container page GUI class.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Container page object.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
exit
Definition: backend.php:16
$ret
Definition: parser.php:6
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forwardToStyleSheet()

ilContainerGUI::forwardToStyleSheet ( )

Forward to style object.

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $ret, $tabs, and ilObjectGUI\omitLocator().

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

230  {
232  $ilTabs = $this->tabs;
233 
234  $ilTabs->clearTargets();
235 
236  $cmd = $ilCtrl->getCmd();
237  include_once("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
238  $this->ctrl->setReturn($this, "editStyleProperties");
239  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
240  $style_gui->omitLocator();
241  if ($cmd == "create" || $_GET["new_type"] == "sty") {
242  $style_gui->setCreationMode(true);
243  }
244 
245  if ($cmd == "confirmedDelete") {
246  $this->object->setStyleSheetId(0);
247  $this->object->update();
248  }
249 
250  $ret = $this->ctrl->forwardCommand($style_gui);
251 
252  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
253  $style_id = $ret;
254  $this->object->setStyleSheetId($style_id);
255  $this->object->update();
256  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
257  }
258  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
omitLocator($a_omit=true)
Class ilObjStyleSheetGUI.
$ret
Definition: parser.php:6
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAsynchItemListObject()

ilContainerGUI::getAsynchItemListObject ( )

Get item list command drop down asynchronously.

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

References $_GET, ilObjectGUI\$ctrl, ilObjectGUI\$data, $html, $ilCtrl, ilObjectGUI\$obj_id, $plugin_admin, ilObjectGUI\$ref_id, $type, ilObjectListGUIFactory\_getListGUIByType(), ilObject\_lookupObjId(), ilObject\_lookupType(), exit, ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilUIHookPluginGUI\KEEP, and modifyItemGUI().

3159  {
3160  $ilCtrl = $this->ctrl;
3161 
3162  $ref_id = $_GET["cmdrefid"];
3165 
3166  // this should be done via container-object->getSubItem in the future
3167  $data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
3168  "type" => $type);
3169  include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
3171  $item_list_gui->setContainerObject($this);
3172 
3173  $item_list_gui->enableComments(true);
3174  $item_list_gui->enableNotes(true);
3175  $item_list_gui->enableTags(true);
3176 
3177  $this->modifyItemGUI($item_list_gui, $data, false);
3178  $html = $item_list_gui->getListItemHTML(
3179  $ref_id,
3180  $obj_id,
3181  "",
3182  "",
3183  true,
3184  true
3185  );
3186 
3187  // include plugin slot for async item list
3188  $ilPluginAdmin = $this->plugin_admin;
3189  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
3190  foreach ($pl_names as $pl) {
3191  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
3192  $gui_class = $ui_plugin->getUIClassInstance();
3193  $resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
3194  if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
3195  $html = $gui_class->modifyHTML($html, $resp);
3196  }
3197  }
3198 
3199  echo $html;
3200  exit;
3201  }
$type
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify list gui for presentation in container.
static _lookupType($a_id, $a_reference=false)
lookup object type
exit
Definition: backend.php:16
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
$html
Definition: example_001.php:87
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

Get container page HTML.

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

References $ilSetting, $ilUser, $lang, $ret, $settings, $user, ilPageUtil\_existsAndNotEmpty(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilObjectTranslation\getInstance(), and ilObjStyleSheet\getSyntaxStylePath().

402  {
405 
406  if (!$ilSetting->get("enable_cat_page_edit")) {
407  return;
408  }
409 
410  // old page editor content
412  $this->object->getId(),
413  "xhtml_page"
414  );
415  if ($xpage_id > 0) {
416  include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
417  $xpage = new ilXHTMLPage($xpage_id);
418  return $xpage->getContent();
419  }
420 
421 
422  // page object
423 
424 
425  // if page does not exist, return nothing
426  include_once("./Services/COPage/classes/class.ilPageUtil.php");
428  "cont",
429  $this->object->getId()
430  )) {
431  return "";
432  }
433  include_once("./Services/Container/classes/class.ilContainerPage.php");
434  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
435 
436  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
437  $this->tpl->setVariable(
438  "LOCATION_CONTENT_STYLESHEET",
439  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
440  );
441  $this->tpl->setCurrentBlock("SyntaxStyle");
442  $this->tpl->setVariable(
443  "LOCATION_SYNTAX_STYLESHEET",
445  );
446  $this->tpl->parseCurrentBlock();
447 
448  // get page object
449  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
450  $ot = ilObjectTranslation::getInstance($this->object->getId());
451  $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
452  $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
453  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
454  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
455  $this->object->getStyleSheetId(),
456  $this->object->getType()
457  ));
458 
459  $page_gui->setPresentationTitle("");
460  $page_gui->setTemplateOutput(false);
461  $page_gui->setHeader("");
462  $ret = $page_gui->showPage();
463 
464  //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
465 
466  //$ret =& $page_gui->executeCommand();
467  return $ret;
468  }
Container page GUI class.
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages) ...
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
$ilUser
Definition: imgupload.php:18
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
XHTML Page class.
global $ilSetting
Definition: privfeed.php:17
static getInstance($a_obj_id)
Get instance.
$ret
Definition: parser.php:6
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

Get content gui object.

Parameters

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

References ilCourseConstants\IL_CRS_VIEW_TIMING, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_OBJECTIVE, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by redrawListItemObject(), renderBlockAsynchObject(), and renderObject().

546  {
547  switch ($this->object->getViewMode()) {
548  // all items in one block
550  include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
551  $container_view = new ilContainerSimpleContentGUI($this);
552  break;
553 
555  include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
556  $container_view = new ilContainerObjectiveGUI($this);
557  break;
558 
559  // all items in one block
561  case ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
562  include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
563  $container_view = new ilContainerSessionsContentGUI($this);
564  break;
565 
566  // all items in one block
568  default:
569  include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
570  $container_view = new ilContainerByTypeContentGUI($this);
571  break;
572  }
573 
574  return $container_view;
575  }
Shows all items grouped by type.
GUI class for course objective view.
+ Here is the caller graph for this function:

◆ getEditFormValues()

ilContainerGUI::getEditFormValues ( )
protected

Get values for edit form.

Returns
array

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

References $values, and ilDidacticTemplateObjSettings\lookupTemplateId().

Referenced by ilObjFolderGUI\editObject().

189  {
190  $values = parent::getEditFormValues();
191 
192  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
193  $values['didactic_type'] =
194  'dtpl_' . ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
195 
196  return $values;
197  }
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
$values
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilContainerGUI::getTabs ( )

common tabs for all container objects (should be called at the end of child getTabs() method

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

References $_GET, $_SESSION, ilObjectGUI\$ctrl, $ilCtrl, and $rbacsystem.

1362  {
1364  $ilCtrl = $this->ctrl;
1365 
1366  // edit permissions
1367  if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
1368  $this->tabs_gui->addTarget(
1369  "perm_settings",
1370  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1371  array("perm","info","owner"),
1372  'ilpermissiongui'
1373  );
1374  if ($ilCtrl->getNextClass() == "ilpermissiongui") {
1375  $this->tabs_gui->activateTab("perm_settings");
1376  }
1377  }
1378 
1379  // show clipboard
1380  if (strtolower($_GET["baseClass"]) == "ilrepositorygui" && !empty($_SESSION["clipboard"])) {
1381  $this->tabs_gui->addTarget(
1382  "clipboard",
1383  $this->ctrl->getLinkTarget($this, "clipboard"),
1384  "clipboard",
1385  get_class($this)
1386  );
1387  }
1388  }
$_SESSION["AccountId"]
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ getTreeSelectorGUI()

ilContainerGUI::getTreeSelectorGUI (   $cmd)
protected
Parameters
$cmdstring
Returns
ilTreeExplorerGUI

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

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

Referenced by showPasteTreeObject().

3810  {
3811  include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3812  $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
3813  // TODO: The study programme 'prg' is not included here, as the
3814  // ilRepositorySelectorExplorerGUI only handles static rules for
3815  // parent-child-relations and not the dynamic relationsships
3816  // required for the SP (see #16909).
3817  $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
3818 
3819  // Not all types are allowed in the LearningSequence
3820  // Extend whitelist, if all selected types are possible subojects of LSO
3821  if (in_array($_SESSION["clipboard"]["cmd"], ["link", "cut"])) {
3822  $lso_types = array_keys($this->obj_definition->getSubObjects('lso'));
3823  $refs = $_SESSION["clipboard"]["ref_ids"];
3824  $allow_lso = true;
3825  foreach ($refs as $item_ref_id) {
3826  $type = ilObject::_lookupType($item_ref_id, true);
3827  if (!in_array($type, $lso_types)) {
3828  $allow_lso = false;
3829  }
3830  }
3831  if ($allow_lso) {
3832  $whitelist = $exp->getTypeWhiteList();
3833  $whitelist[] = 'lso';
3834  $exp->setTypeWhiteList($whitelist);
3835  }
3836  }
3837 
3838  if ($cmd == "link") {
3839  $exp->setSelectMode("nodes", true);
3840  return $exp;
3841  } else {
3842  $exp->setSelectMode("nodes[]", false);
3843  return $exp;
3844  }
3845  }
$_SESSION["AccountId"]
Explorer for selecting repository items.
$type
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by copyObject().

2272  {
2273  $tree = $this->tree;
2274 
2275  // empty session on init
2276  $_SESSION['paste_copy_repexpand'] = array();
2277 
2278  // copy opend nodes from repository explorer
2279  $_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2280 
2281  // open current position
2282  $path = $tree->getPathId((int) $_GET['ref_id']);
2283  foreach ((array) $path as $node_id) {
2284  if (!in_array($node_id, $_SESSION['paste_copy_repexpand'])) {
2285  $_SESSION['paste_copy_repexpand'][] = $node_id;
2286  }
2287  }
2288 
2289  return $this->showPasteTreeObject();
2290  }
$path
Definition: aliased.php:25
$_SESSION["AccountId"]
$_GET["client_id"]
showPasteTreeObject()
Show paste tree.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by linkObject().

2170  {
2171  $tree = $this->tree;
2172 
2173  // empty session on init
2174  $_SESSION['paste_linked_repexpand'] = array();
2175 
2176  // copy opend nodes from repository explorer
2177  $_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2178 
2179  // open current position
2180  $path = $tree->getPathId((int) $_GET['ref_id']);
2181  foreach ((array) $path as $node_id) {
2182  if (!in_array($node_id, $_SESSION['paste_linked_repexpand'])) {
2183  $_SESSION['paste_linked_repexpand'][] = $node_id;
2184  }
2185  }
2186 
2187  return $this->showPasteTreeObject();
2188  }
$path
Definition: aliased.php:25
$_SESSION["AccountId"]
$_GET["client_id"]
showPasteTreeObject()
Show paste tree.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

References $_GET, $_SESSION, $path, ilObjectGUI\$tree, and showPasteTreeObject().

Referenced by cutObject().

2294  {
2295  $tree = $this->tree;
2296 
2297  // empty session on init
2298  $_SESSION['paste_cut_repexpand'] = array();
2299 
2300  // copy opend nodes from repository explorer
2301  $_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2302 
2303  // open current position
2304  $path = $tree->getPathId((int) $_GET['ref_id']);
2305  foreach ((array) $path as $node_id) {
2306  if (!in_array($node_id, $_SESSION['paste_cut_repexpand'])) {
2307  $_SESSION['paste_cut_repexpand'][] = $node_id;
2308  }
2309  }
2310 
2311  return $this->showPasteTreeObject();
2312  }
$path
Definition: aliased.php:25
$_SESSION["AccountId"]
$_GET["client_id"]
showPasteTreeObject()
Show paste tree.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilContainerGUI::initEditForm ( )
protected

Init object edit form.

Returns
ilPropertyFormGUI

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

References ilObjectGUI\$ctrl, $form, $ilCtrl, $languages, ilObjectGUI\$lng, $title, ilMDLanguageItem\_getLanguages(), ilPropertyFormGUI\addItem(), ilObjectGUI\initEditCustomForm(), ilTextAreaInputGUI\setRows(), and ilObject\TITLE_LENGTH.

3437  {
3438  $lng = $this->lng;
3439  $ilCtrl = $this->ctrl;
3440 
3441  $lng->loadLanguageModule($this->object->getType());
3442 
3443  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3444  $form = new ilPropertyFormGUI();
3445  $form->setFormAction($this->ctrl->getFormAction($this, "update"));
3446  $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
3447 
3448  $this->initFormTitleDescription($form);
3449 
3450  $this->initEditCustomForm($form);
3451 
3452  $form->addCommandButton("update", $this->lng->txt("save"));
3453  //$this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
3454 
3455  return $form;
3456  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
+ Here is the call graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

Returns

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

References $form, and ilFormPropertyGUI\setRequired().

Referenced by savePasswordObject(), and showPasswordInstructionObject().

3236  {
3237  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3238  $this->form = new ilPropertyFormGUI();
3239  $this->form->setFormAction($this->ctrl->getFormAction($this));
3240 
3241  // new password
3242  $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
3243  $ipass->setRequired(true);
3244 
3245  $this->form->addItem($ipass);
3246  $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
3247  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
3248 
3249  $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
3250  $this->form->setFormAction($this->ctrl->getFormAction($this));
3251 
3252  return $this->form;
3253  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
This class represents a password property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initHeaderAction()

ilContainerGUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add file manager link.

Parameters
<type>$a_sub_type
<type>$a_sub_id

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

References $lg, and ilFMSettings\getInstance().

3335  {
3336  $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3337 
3338  // begin-patch fm
3339  include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3340  if (ilFMSettings::getInstance()->isEnabled()) {
3341  if ($lg instanceof ilObjectListGUI) {
3342  $lg->addCustomCommand($this->ctrl->getLinkTarget($this, 'fileManagerLaunch'), 'fm_start', '_blank');
3343  }
3344  }
3345  // end-patch fm
3346  return $lg;
3347  }
$lg
Definition: example_018.php:62
Class ilObjectListGUI.
static getInstance()
Get singleton instance.
+ Here is the call graph for this function:

◆ initListPresentationForm()

ilContainerGUI::initListPresentationForm ( ilPropertyFormGUI  $form)
protected

Add list presentation settings to form.

Parameters
ilPropertyFormGUI$form
Returns
ilPropertyFormGUI

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

References $form, ilContainer\_lookupContainerSetting(), ilPropertyFormGUI\addItem(), and ilRadioOption\setValue().

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

3574  {
3575  $lpres = new ilRadioGroupInputGUI($this->lng->txt('cont_list_presentation'), "list_presentation");
3576 
3577  $item_list = new ilRadioOption($this->lng->txt('cont_item_list'), "");
3578  //$item_list->setInfo($this->lng->txt('cont_item_list_info'));
3579  $lpres->addOption($item_list);
3580 
3581  $tile_view = new ilRadioOption($this->lng->txt('cont_tile_view'), "tile");
3582  //$tile_view->setInfo($this->lng->txt('cont_tile_view_info'));
3583  $lpres->addOption($tile_view);
3584 
3585  $lpres->setValue(
3586  ilContainer::_lookupContainerSetting($this->object->getId(), "list_presentation")
3587  );
3588 
3589  $form->addItem($lpres);
3590 
3591  return $form;
3592  }
This class represents an option in a radio group.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
setValue($a_value)
Set Value.
if(isset($_POST['submit'])) $form
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initManualSortingOptionForm()

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

Add manual sorting options.

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

References ilRadioOption\addSubItem(), ilContainerSortingSettings\getSortNewItemsOrder(), ilContainerSortingSettings\getSortNewItemsPosition(), initSortingDirectionForm(), 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().

3651  {
3652  $position = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_position'), $a_prefix . '_new_items_position');
3653  $position->setValue($settings->getSortNewItemsPosition());
3654  $position->setRequired(true);
3655 
3656  //new items insert on top
3657  $new_top = new ilRadioOption(
3658  $this->lng->txt('sorting_new_items_at_top'),
3660  );
3661 
3662  $position->addOption($new_top);
3663 
3664  //new items insert at bottom
3665  $new_bottom = new ilRadioOption(
3666  $this->lng->txt('sorting_new_items_at_bottom'),
3668  );
3669 
3670  $position->addOption($new_bottom);
3671 
3672  $element->addSubItem($position);
3673 
3674  $order = new ilRadioGroupInputGUI($this->lng->txt('sorting_new_items_order'), $a_prefix . '_new_items_order');
3675  $order->setValue($settings->getSortNewItemsOrder());
3676  $order->setRequired(true);
3677 
3678  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
3679  //new items sort in alphabetical order
3680  $new_title = new ilRadioOption(
3681  $this->lng->txt('sorting_title_header'),
3683  );
3684 
3685  $order->addOption($new_title);
3686  }
3687 
3688  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
3689  //new items sort by creation date
3690  $new_creation = new ilRadioOption(
3691  $this->lng->txt('sorting_creation_header'),
3693  );
3694 
3695  $order->addOption($new_creation);
3696  }
3697 
3698 
3699  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
3700  //new items by activation
3701  $new_activation = new ilRadioOption(
3702  $this->lng->txt('crs_sort_activation'),
3704  );
3705 
3706  $order->addOption($new_activation);
3707  }
3708 
3709  $element->addSubItem($order);
3710 
3711  $this->initSortingDirectionForm($settings, $element, 'manual');
3712 
3713  return $element;
3714  }
This class represents an option in a radio group.
const SORT_NEW_ITEMS_POSITION_TOP
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
Add sorting direction.
const SORT_NEW_ITEMS_POSITION_BOTTOM
This class represents a property in a property form.
addSubItem($a_item)
Add Subitem.
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_ORDER_ACTIVATION
getSortNewItemsPosition()
GET new item position.
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,
  $element,
  $a_prefix 
)
protected

Add sorting direction.

Parameters
ilFormPropertyGUI$element

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

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

Referenced by initManualSortingOptionForm(), and initSortingForm().

3612  {
3613  if ($a_prefix == 'manual') {
3614  $txt = $this->lng->txt('sorting_new_items_direction');
3615  } else {
3616  $txt = $this->lng->txt('sorting_direction');
3617  }
3618 
3619  $direction = new ilRadioGroupInputGUI($txt, $a_prefix . '_sorting_direction');
3620  $direction->setValue($sorting_settings->getSortDirection());
3621  $direction->setRequired(true);
3622 
3623  // asc
3624  $asc = new ilRadioOption(
3625  $this->lng->txt('sorting_asc'),
3627  );
3628  $direction->addOption($asc);
3629 
3630  // desc
3631  $desc = new ilRadioOption(
3632  $this->lng->txt('sorting_desc'),
3634  );
3635  $direction->addOption($desc);
3636 
3637  $element->addSubItem($direction);
3638 
3639  return $element;
3640  }
This class represents an option in a radio group.
This class represents a property in a property form.
addSubItem($a_item)
Add Subitem.
$txt
Definition: error.php:11
+ 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.

Parameters
ilPropertyFormGUI$form
type$a_sorting_settings

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

References $form, $settings, ilPropertyFormGUI\addItem(), initManualSortingOptionForm(), initSortingDirectionForm(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ilRadioOption\setInfo(), 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().

3504  {
3505  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3506  include_once './Services/Container/classes/class.ilContainer.php';
3507 
3508  $settings = new ilContainerSortingSettings($this->object->getId());
3509  $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
3510 
3511  if (in_array(ilContainer::SORT_INHERIT, $a_sorting_settings)) {
3512  $sort_inherit = new ilRadioOption();
3513  $sort_inherit->setTitle(
3514  $this->lng->txt('sort_inherit_prefix') .
3517  $this->object->getId()
3518  )
3519  ) . ') '
3520  );
3521  $sort_inherit->setValue(ilContainer::SORT_INHERIT);
3522  $sort_inherit->setInfo($this->lng->txt('sorting_info_inherit'));
3523  $sort->addOption($sort_inherit);
3524  }
3525  if (in_array(ilContainer::SORT_TITLE, $a_sorting_settings)) {
3526  $sort_title = new ilRadioOption(
3527  $this->lng->txt('sorting_title_header'),
3529  );
3530  $sort_title->setInfo($this->lng->txt('sorting_info_title'));
3531 
3532  $this->initSortingDirectionForm($settings, $sort_title, 'title');
3533  $sort->addOption($sort_title);
3534  }
3535  if (in_array(ilContainer::SORT_CREATION, $a_sorting_settings)) {
3536  $sort_activation = new ilRadioOption($this->lng->txt('sorting_creation_header'), ilContainer::SORT_CREATION);
3537  $sort_activation->setInfo($this->lng->txt('sorting_creation_info'));
3538  $this->initSortingDirectionForm($settings, $sort_activation, 'creation');
3539  $sort->addOption($sort_activation);
3540  }
3541  if (in_array(ilContainer::SORT_ACTIVATION, $a_sorting_settings)) {
3542  $sort_activation = new ilRadioOption($this->lng->txt('crs_sort_activation'), ilContainer::SORT_ACTIVATION);
3543  $sort_activation->setInfo($this->lng->txt('crs_sort_timing_info'));
3544  $this->initSortingDirectionForm($settings, $sort_activation, 'activation');
3545  $sort->addOption($sort_activation);
3546  }
3547  if (in_array(ilContainer::SORT_MANUAL, $a_sorting_settings)) {
3548  $sort_manual = new ilRadioOption(
3549  $this->lng->txt('sorting_manual_header'),
3551  );
3552  $sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
3553  $this->initManualSortingOptionForm($settings, $sort_manual, "manual", $a_sorting_settings);
3554  $sort->addOption($sort_manual);
3555  }
3556 
3557  // Handle moved containers and there possibly invalid values
3558  if (in_array($settings->getSortMode(), $a_sorting_settings)) {
3559  $sort->setValue($settings->getSortMode());
3560  } else {
3561  $sort->setValue(ilContainer::SORT_TITLE);
3562  }
3563  $form->addItem($sort);
3564 
3565  return $form;
3566  }
initManualSortingOptionForm(ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
Add manual sorting options.
This class represents an option in a radio group.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Info.
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
Add sorting direction.
This class represents a property in a property form.
if(isset($_POST['submit'])) $form
static lookupSortModeFromParentContainer($a_obj_id)
Lookup sort mode from parent container.
static sortModeToString($a_sort_mode)
get String representation of sort mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilContainerGUI::initStylePropertiesForm ( )

Init style properties form.

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, $settings, $tabs, ilObjectGUI\$tpl, ilObjStyleSheet\_getStandardStyles(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilUtil\formSelect(), ilSelectInputGUI\setOptions(), ilPageObjectGUI\setStyleId(), ilPageObjectGUI\setTabHook(), and ilNonEditableValueGUI\setValue().

Referenced by editStylePropertiesObject().

2998  {
2999  $ilCtrl = $this->ctrl;
3000  $lng = $this->lng;
3001  $ilTabs = $this->tabs;
3003  $tpl = $this->tpl;
3004 
3005  $tpl->setTreeFlatIcon("", "");
3006  $ilTabs->clearTargets();
3008  $this->object->getId(),
3009  "xhtml_page"
3010  );
3011  if ($xpage_id > 0) {
3012  $ilTabs->setBackTarget(
3013  $lng->txt("cntr_back_to_old_editor"),
3014  $ilCtrl->getLinkTarget($this, "switchToOldEditor"),
3015  "_top"
3016  );
3017  } else {
3018  $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=" . $this->object->getType() . "_" .
3019  $this->object->getRefId(), "_top");
3020  }
3021 
3022  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
3023  $page_gui = new ilContainerPageGUI($this->object->getId());
3024  $style_id = $this->object->getStyleSheetId();
3025  if (ilObject::_lookupType($style_id) == "sty") {
3026  $page_gui->setStyleId($style_id);
3027  } else {
3028  $style_id = 0;
3029  }
3030  $page_gui->setTabHook($this, "addPageTabs");
3031  $ilCtrl->getHTML($page_gui);
3032  $ilTabs->setTabActive("obj_sty");
3033 
3034  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3035  $lng->loadLanguageModule("style");
3036 
3037  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
3038  $this->form = new ilPropertyFormGUI();
3039 
3040  $fixed_style = $ilSetting->get("fixed_content_style_id");
3041  // $style_id = $this->object->getStyleSheetId();
3042 
3043  if ($fixed_style > 0) {
3044  $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
3045  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
3046  $this->lng->txt("global_fixed") . ")");
3047  $this->form->addItem($st);
3048  } else {
3050  true,
3051  false,
3052  $_GET["ref_id"]
3053  );
3054 
3055  $st_styles[0] = $this->lng->txt("default");
3056  ksort($st_styles);
3057 
3058  if ($style_id > 0) {
3059  // individual style
3060  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
3061  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
3062  $st->setValue(ilObject::_lookupTitle($style_id));
3063  $this->form->addItem($st);
3064 
3065  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
3066 
3067  // delete command
3068  $this->form->addCommandButton(
3069  "editStyle",
3070  $lng->txt("style_edit_style")
3071  );
3072  $this->form->addCommandButton(
3073  "deleteStyle",
3074  $lng->txt("style_delete_style")
3075  );
3076  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
3077  }
3078  }
3079 
3080  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
3081  $style_sel = ilUtil::formSelect(
3082  $style_id,
3083  "style_id",
3084  $st_styles,
3085  false,
3086  true
3087  );
3088  $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
3089  $style_sel->setOptions($st_styles);
3090  $style_sel->setValue($style_id);
3091  $this->form->addItem($style_sel);
3092  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
3093  $this->form->addCommandButton(
3094  "saveStyleSettings",
3095  $lng->txt("save")
3096  );
3097  $this->form->addCommandButton(
3098  "createStyle",
3099  $lng->txt("sty_create_ind_style")
3100  );
3101  }
3102  }
3103  $this->form->setTitle($lng->txt("obj_sty"));
3104  $this->form->setFormAction($ilCtrl->getFormAction($this));
3105  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
Container page GUI class.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
global $ilCtrl
Definition: ilias.php:18
setOptions($a_options)
Set Options.
static _lookupType($a_id, $a_reference=false)
lookup object type
setStyleId($a_styleid)
Set Style Id.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:17
setTabHook($a_object, $a_function)
Set tab hook.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilContainerGUI::isActiveAdministrationPanel ( )

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

References $_SESSION, and $access.

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

2614  {
2615  $ilAccess = $this->access;
2616 
2617  // #10081
2618  if ($_SESSION["il_cont_admin_panel"] &&
2619  $this->object->getRefId() &&
2620  !$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
2621  return false;
2622  }
2623 
2624  return $_SESSION["il_cont_admin_panel"];
2625  }
$_SESSION["AccountId"]
+ Here is the caller graph for this function:

◆ isActiveItemOrdering()

ilContainerGUI::isActiveItemOrdering ( )

Check if item ordering is enabled.

Returns
bool

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

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

1441  {
1442  if ($this->isActiveOrdering()) {
1443  return (ilContainerSortingSettings::_lookupSortMode($this->object->getId()) == ilContainer::SORT_MANUAL);
1444  }
1445  return false;
1446  }
isActiveOrdering()
Check if ordering is enabled.
static _lookupSortMode($a_obj_id)
lookup sort mode
+ Here is the call graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

Check if ordering is enabled.

Returns
bool

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

Referenced by isActiveItemOrdering(), and showAdministrationPanel().

1432  {
1433  return $this->edit_order ? true : false;
1434  }
+ Here is the caller graph for this function:

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

References $multi_download_enabled.

Referenced by showAdministrationPanel().

1494  {
1496  }
+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

Keep objects in the clipboard.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

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

2263  {
2264  $ilCtrl = $this->ctrl;
2265 
2266  ilUtil::sendSuccess($this->lng->txt("obj_inserted_clipboard"), true);
2267  $ilCtrl->returnToParent($this);
2268  }
global $ilCtrl
Definition: ilias.php:18
+ 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

public

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$object, $rbacsystem, ilObjectGUI\$ref_id, ilObjectFactory\getInstanceByRefId(), initAndDisplayLinkIntoMultipleObjectsObject(), and ilUtil\sendInfo().

Referenced by ilObjLearningSequenceGUI\executeCommand().

1802  {
1804  $ilCtrl = $this->ctrl;
1805  $ilErr = $this->error;
1806 
1807  $no_cut = [];
1808  $no_link = [];
1809 
1810  if ($_GET["item_ref_id"] != "") {
1811  $_POST["id"] = array($_GET["item_ref_id"]);
1812  }
1813 
1814  if (!isset($_POST["id"])) {
1815  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1816  }
1817 
1818  // CHECK ACCESS
1819  foreach ($_POST["id"] as $ref_id) {
1820  if (!$rbacsystem->checkAccess('delete', $ref_id)) {
1821  $no_cut[] = $ref_id;
1822  }
1823 
1825 
1826  if (!$this->objDefinition->allowLink($object->getType())) {
1827  $no_link[] = $object->getType();
1828  }
1829  }
1830 
1831  // NO ACCESS
1832  if (count($no_cut)) {
1833  $ilErr->raiseError($this->lng->txt("msg_no_perm_link") . " " .
1834  implode(',', $no_cut), $ilErr->MESSAGE);
1835  }
1836 
1837  if (count($no_link)) {
1838  //#12203
1839  $ilErr->raiseError($this->lng->txt("msg_obj_no_link"), $ilErr->MESSAGE);
1840  }
1841 
1842  // WRITE TO CLIPBOARD
1843  $clipboard["parent"] = $_GET["ref_id"];
1844  $clipboard["cmd"] = $ilCtrl->getCmd();
1845 
1846  foreach ($_POST["id"] as $ref_id) {
1847  $clipboard["ref_ids"][] = $ref_id;
1848  }
1849 
1850  $_SESSION["clipboard"] = $clipboard;
1851 
1852  $suffix = 'p';
1853  if (count($clipboard["ref_ids"]) == 1) {
1854  $suffix = 's';
1855  }
1856  ilUtil::sendInfo($this->lng->txt("msg_link_clipboard_" . $suffix), true);
1857 
1859  } // END LINK
$_SESSION["AccountId"]
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifyItemGUI()

ilContainerGUI::modifyItemGUI (   $a_item_list_gui,
  $a_item_data,
  $a_show_path 
)

Modify list gui for presentation in container.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path

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

References ilObjectGUI\$lng.

Referenced by getAsynchItemListObject().

2940  {
2941  $lng = $this->lng;
2942 
2943  if ($a_show_path) {
2944  $a_item_list_gui->addCustomProperty(
2945  $lng->txt('path'),
2946  ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
2947  false,
2948  true
2949  );
2950  }
2951  }
+ Here is the caller graph for this function:

◆ newBlockTemplate()

& ilContainerGUI::newBlockTemplate ( )

determin admin commands

returns a new list block template

private

Returns
object block template

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

References ilObjectGUI\$tpl.

1129  {
1130  $tpl = new ilTemplate(
1131  "tpl.container_list_block.html",
1132  true,
1133  true,
1134  "Services/Container"
1135  );
1136  $this->cur_row_type = "row_type_1";
1137  return $tpl;
1138  }
special template class to simplify handling of ITX/PEAR

◆ pasteObject()

ilContainerGUI::pasteObject ( )

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

public

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

References $_GET, $_SESSION, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, $ilLog, $ilUser, $key, $log, $message, $rbacadmin, $rbacsystem, ilObjectGUI\$ref_id, ilObjectGUI\$tree, $user, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), clearObject(), and ilObjectFactory\getInstanceByRefId().

Referenced by ilObjOrgUnitGUI\performPaste().

2322  {
2325  $ilLog = $this->log;
2326  $tree = $this->tree;
2327  $ilUser = $this->user;
2328  $ilCtrl = $this->ctrl;
2329  $ilErr = $this->error;
2330 
2331  $exists = [];
2332  $no_paste = [];
2333  $is_child = [];
2334  $not_allowed_subobject = [];
2335 
2336  // BEGIN ChangeEvent: Record paste event.
2337  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2338  // END ChangeEvent: Record paste event.
2339 
2340  //var_dump($_SESSION["clipboard"]);exit;
2341  if (!in_array($_SESSION["clipboard"]["cmd"], array("cut","link","copy"))) {
2342  $message = get_class($this) . "::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2343  $ilErr->raiseError($message, $ilErr->WARNING);
2344  }
2345 
2346  // this loop does all checks
2347  foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id) {
2348  $obj_data = ilObjectFactory::getInstanceByRefId($ref_id);
2349 
2350  // CHECK ACCESS
2351  if (!$rbacsystem->checkAccess('create', $this->object->getRefId(), $obj_data->getType())) {
2352  $no_paste[] = $ref_id;
2353  $no_paste_titles[] = $obj_data->getTitle();
2354  }
2355 
2356  // CHECK IF REFERENCE ALREADY EXISTS
2357  if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId())) {
2358  $exists[] = $ref_id;
2359  break;
2360  }
2361 
2362  // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
2363  if ($this->tree->isGrandChild($ref_id, $this->object->getRefId())) {
2364  $is_child[] = ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id));
2365  }
2366 
2367  if ($ref_id == $this->object->getRefId()) {
2368  $is_child[] = ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id));
2369  }
2370 
2371  // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
2372  $obj_type = $obj_data->getType();
2373 
2374  if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects()))) {
2375  $not_allowed_subobject[] = $obj_data->getType();
2376  }
2377  }
2378 
2380  // process checking results
2381  // BEGIN WebDAV: Copying an object into the same container is allowed
2382  if (count($exists) > 0 && $_SESSION["clipboard"]["cmd"] != "copy") {
2383  // END WebDAV: Copying an object into the same container is allowed
2384  $ilErr->raiseError($this->lng->txt("msg_obj_exists"), $ilErr->MESSAGE);
2385  }
2386 
2387  if (count($is_child) > 0) {
2388  $ilErr->raiseError(
2389  $this->lng->txt("msg_not_in_itself") . " " . implode(',', $is_child),
2390  $ilErr->MESSAGE
2391  );
2392  }
2393 
2394  if (count($not_allowed_subobject) > 0) {
2395  $ilErr->raiseError(
2396  $this->lng->txt("msg_may_not_contain") . " " . implode(',', $not_allowed_subobject),
2397  $ilErr->MESSAGE
2398  );
2399  }
2400 
2401  if (count($no_paste) > 0) {
2402  $ilErr->raiseError($this->lng->txt("msg_no_perm_paste") . " " .
2403  implode(',', $no_paste), $ilErr->MESSAGE);
2404  }
2405 
2406  // log pasteObject call
2407  $ilLog->write("ilObjectGUI::pasteObject(), cmd: " . $_SESSION["clipboard"]["cmd"]);
2408 
2410  // everything ok: now paste the objects to new location
2411 
2412  // to prevent multiple actions via back/reload button
2413  $ref_ids = $_SESSION["clipboard"]["ref_ids"];
2414  unset($_SESSION["clipboard"]["ref_ids"]);
2415 
2416  // BEGIN WebDAV: Support a copy command in the repository
2417  // process COPY command
2418  if ($_SESSION["clipboard"]["cmd"] == "copy") {
2419  unset($_SESSION["clipboard"]["cmd"]);
2420 
2421  // new implementation, redirects to ilObjectCopyGUI
2422  if (count($ref_ids) == 1) {
2423  $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2424  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
2425  $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2426  } else {
2427  $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2428  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode("_", $ref_ids));
2429  $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2430  }
2431 
2432 
2433 
2434  /* old implementation
2435 
2436  foreach($ref_ids as $ref_id)
2437  {
2438  $revIdMapping = array();
2439 
2440  $oldNode_data = $tree->getNodeData($ref_id);
2441  if ($oldNode_data['parent'] == $this->object->getRefId())
2442  {
2443  require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2444  $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2445  $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2446  }
2447  else
2448  {
2449  $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2450  }
2451 
2452  // BEGIN ChangeEvent: Record copy event.
2453  $old_parent_data = $tree->getParentNodeData($ref_id);
2454  $newNode_data = $tree->getNodeData($newRef);
2455  ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2456  $oldNode_data['obj_id'], $ilUser->getId());
2457  ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2458  $this->object->getId());
2459  ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2460  // END ChangeEvent: Record copy event.
2461  }*/
2462 
2463  $ilLog->write("ilObjectGUI::pasteObject(), copy finished");
2464  }
2465  // END WebDAV: Support a Copy command in the repository
2466 
2467  // process CUT command
2468  if ($_SESSION["clipboard"]["cmd"] == "cut") {
2469  foreach ($ref_ids as $ref_id) {
2470  // Store old parent
2471  $old_parent = $tree->getParentId($ref_id);
2472  $this->tree->moveTree($ref_id, $this->object->getRefId());
2473  $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
2474 
2475  include_once('./Services/Conditions/classes/class.ilConditionHandler.php');
2477 
2478  // BEGIN ChangeEvent: Record cut event.
2479  $node_data = $tree->getNodeData($ref_id);
2480  $old_parent_data = $tree->getNodeData($old_parent);
2482  $node_data['obj_id'],
2483  $ilUser->getId(),
2484  'remove',
2485  $old_parent_data['obj_id']
2486  );
2488  $node_data['obj_id'],
2489  $ilUser->getId(),
2490  'add',
2491  $this->object->getId()
2492  );
2493  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2494  // END PATCH ChangeEvent: Record cut event.
2495  }
2496  } // END CUT
2497 
2498  // process LINK command
2499  if ($_SESSION["clipboard"]["cmd"] == "link") {
2500  foreach ($ref_ids as $ref_id) {
2501  // get node data
2502  $top_node = $this->tree->getNodeData($ref_id);
2503 
2504  // get subnodes of top nodes
2505  $subnodes[$ref_id] = $this->tree->getSubtree($top_node);
2506  }
2507 
2508  // now move all subtrees to new location
2509  foreach ($subnodes as $key => $subnode) {
2510  // first paste top_node....
2511  $obj_data = ilObjectFactory::getInstanceByRefId($ref_id);
2512  $new_ref_id = $obj_data->createReference();
2513  $obj_data->putInTree($_GET["ref_id"]);
2514  $obj_data->setPermissions($_GET["ref_id"]);
2515 
2516  // BEGIN ChangeEvent: Record link event.
2517  $node_data = $tree->getNodeData($new_ref_id);
2519  $node_data['obj_id'],
2520  $ilUser->getId(),
2521  'add',
2522  $this->object->getId()
2523  );
2524  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2525  // END PATCH ChangeEvent: Record link event.
2526  }
2527 
2528  $ilLog->write("ilObjectGUI::pasteObject(), link finished");
2529  } // END LINK
2530 
2531  // save cmd for correct message output after clearing the clipboard
2532  $last_cmd = $_SESSION["clipboard"]["cmd"];
2533 
2534 
2535  // clear clipboard
2536  $this->clearObject();
2537 
2538  if ($last_cmd == "cut") {
2539  ilUtil::sendSuccess($this->lng->txt("msg_cut_copied"), true);
2540  }
2541  // BEGIN WebDAV: Support a copy command in repository
2542  elseif ($last_cmd == "copy") {
2543  ilUtil::sendSuccess($this->lng->txt("msg_cloned"), true);
2544  } elseif ($last_cmd == 'link') {
2545  // END WebDAV: Support copy command in repository
2546  ilUtil::sendSuccess($this->lng->txt("msg_linked"), true);
2547  }
2548 
2549  $this->ctrl->returnToParent($this);
2550  } // END PASTE
clearObject()
clear clipboard and go back to last object
$_SESSION["AccountId"]
$_GET["client_id"]
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static _lookupTitle($a_id)
lookup object title
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
global $ilCtrl
Definition: ilias.php:18
catch(Exception $e) $message
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

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

References $_POST, $_SESSION, ilObjectGUI\$ctrl, $error, ilObjectGUI\$ilErr, $ilLog, $ilUser, $key, $links, ilObjectGUI\$lng, $log, $message, $obj_data_cache, $rbacadmin, $rbacreview, $rbacsystem, ilObjectGUI\$ref_id, $title, ilObjectGUI\$tree, $ui, $user, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilLink\_getLink(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), clearObject(), cloneNodes(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilRbacLog\isActive(), ilRbacLog\LINK_OBJECT, ilUtil\sendFailure(), and showPasteTreeObject().

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

1883  {
1887  $ilLog = $this->log;
1888  $tree = $this->tree;
1889  $ilObjDataCache = $this->obj_data_cache;
1890  $ilUser = $this->user;
1891  $ilErr = $this->error;
1892  $lng = $this->lng;
1893  $ctrl = $this->ctrl;
1894  $ui = $this->ui;
1895 
1896  $exists = [];
1897  $is_child = [];
1898  $not_allowed_subobject = [];
1899  $no_paste = [];
1900 
1901  $command = $_SESSION['clipboard']['cmd'];
1902  if (!in_array($command, array('cut', 'link', 'copy'))) {
1903  $message = __METHOD__ . ": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1904  $ilErr->raiseError($message, $ilErr->WARNING);
1905  }
1906 
1907  if ($command == 'cut') {
1908  if (isset($_POST['node']) && (int) $_POST['node']) {
1909  $_POST['nodes'] = array($_POST['node']);
1910  }
1911  }
1912 
1913  if (!is_array($_POST['nodes']) || !count($_POST['nodes'])) {
1914  ilUtil::sendFailure($this->lng->txt('select_at_least_one_object'));
1915  switch ($command) {
1916  case 'cut':
1917  $this->showPasteTreeObject();
1918  break;
1919  case 'copy':
1920  $this->showPasteTreeObject();
1921  break;
1922  case 'link':
1923  $this->showPasteTreeObject();
1924  break;
1925  }
1926  return;
1927  }
1928 
1929  // this loop does all checks
1930  $folder_objects_cache = array();
1931  foreach ($_SESSION['clipboard']['ref_ids'] as $ref_id) {
1932  $obj_data = ilObjectFactory::getInstanceByRefId($ref_id);
1933  $current_parent_id = $tree->getParentId($obj_data->getRefId());
1934 
1935  foreach ($_POST['nodes'] as $folder_ref_id) {
1936  if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1937  $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
1938  }
1939 
1940  // CHECK ACCESS
1941  if (!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType())) {
1942  $no_paste[] = sprintf($this->lng->txt('msg_no_perm_paste_object_in_folder'), $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']', $folder_objects_cache[$folder_ref_id]->getTitle() . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']');
1943  }
1944 
1945  // CHECK IF REFERENCE ALREADY EXISTS
1946  if ($folder_ref_id == $current_parent_id) {
1947  $exists[] = sprintf($this->lng->txt('msg_obj_exists_in_folder'), $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']', $folder_objects_cache[$folder_ref_id]->getTitle() . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']');
1948  }
1949 
1950  // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
1951  if ($tree->isGrandChild($ref_id, $folder_ref_id) ||
1952  $ref_id == $folder_ref_id) {
1953  $is_child[] = sprintf($this->lng->txt('msg_paste_object_not_in_itself'), $obj_data->getTitle() . ' [' . $obj_data->getRefId() . ']');
1954  }
1955 
1956  // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
1957  if (!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()))) {
1958  $not_allowed_subobject[] = sprintf(
1959  $this->lng->txt('msg_obj_may_not_contain_objects_of_type'),
1960  $folder_objects_cache[$folder_ref_id]->getTitle() . ' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . ']',
1961  $lng->txt('obj_' . $obj_data->getType())
1962  );
1963  }
1964  }
1965  }
1966 
1968  // process checking results
1969  if (count($exists) && $command != "copy") {
1970  $error .= implode('<br />', $exists);
1971  }
1972 
1973  if (count($is_child)) {
1974  $error .= $error != '' ? '<br />' : '';
1975  $error .= implode('<br />', $is_child);
1976  }
1977 
1978  if (count($not_allowed_subobject)) {
1979  $error .= $error != '' ? '<br />' : '';
1980  $error .= implode('<br />', $not_allowed_subobject);
1981  }
1982 
1983  if (count($no_paste)) {
1984  $error .= $error != '' ? '<br />' : '';
1985  $error .= implode('<br />', $no_paste);
1986  }
1987 
1988  if ($error != '') {
1990  switch ($command) {
1991  case 'cut':
1992  $this->showPasteTreeObject();
1993  break;
1994  case 'copy':
1995  $this->showPasteTreeObject();
1996  break;
1997  case 'link':
1998  $this->showPasteTreeObject();
1999  break;
2000  }
2001  return;
2002  }
2003 
2004  // log pasteObject call
2005  $ilLog->write(__METHOD__ . ", cmd: " . $command);
2006 
2008  // everything ok: now paste the objects to new location
2009 
2010  // to prevent multiple actions via back/reload button
2011  $ref_ids = $_SESSION['clipboard']['ref_ids'];
2012  unset($_SESSION['clipboard']['ref_ids']);
2013 
2014  // BEGIN ChangeEvent: Record paste event.
2015  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2016  // END ChangeEvent: Record paste event.
2017 
2018  // process COPY command
2019  if ($command == 'copy') {
2020  foreach ($_POST['nodes'] as $folder_ref_id) {
2021  foreach ($ref_ids as $ref_id) {
2022  $revIdMapping = array();
2023 
2024  $oldNode_data = $tree->getNodeData($ref_id);
2025  if ($oldNode_data['parent'] == $folder_ref_id) {
2026  require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2027  $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'], null);
2028  $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
2029  } else {
2030  $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
2031  }
2032 
2033  // BEGIN ChangeEvent: Record copy event.
2034  $old_parent_data = $tree->getParentNodeData($ref_id);
2035  $newNode_data = $tree->getNodeData($newRef);
2037  $oldNode_data['type'],
2038  $ref_id,
2039  $oldNode_data['obj_id'],
2040  $ilUser->getId()
2041  );
2043  $newNode_data['obj_id'],
2044  $ilUser->getId(),
2045  'add',
2046  $ilObjDataCache->lookupObjId($folder_ref_id)
2047  );
2048  ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2049  // END PATCH ChangeEvent: Record cut event.
2050  }
2051  }
2052 
2053  ilUtil::sendSuccess($this->lng->txt('msg_cloned'), true);
2054  } // END COPY
2055 
2056  // process CUT command
2057  if ($command == 'cut') {
2058  foreach ($_POST['nodes'] as $folder_ref_id) {
2059  foreach ($ref_ids as $ref_id) {
2060  // Store old parent
2061  $old_parent = $tree->getParentId($ref_id);
2062  $tree->moveTree($ref_id, $folder_ref_id);
2063  $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
2064 
2065  include_once('./Services/Conditions/classes/class.ilConditionHandler.php');
2067 
2068  // BEGIN ChangeEvent: Record cut event.
2069  $node_data = $tree->getNodeData($ref_id);
2070  $old_parent_data = $tree->getNodeData($old_parent);
2072  $node_data['obj_id'],
2073  $ilUser->getId(),
2074  'remove',
2075  $old_parent_data['obj_id']
2076  );
2078  $node_data['obj_id'],
2079  $ilUser->getId(),
2080  'add',
2081  $ilObjDataCache->lookupObjId($folder_ref_id)
2082  );
2083  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2084  // END PATCH ChangeEvent: Record cut event.
2085  }
2086 
2087  // prevent multiple iterations for cut cmommand
2088  break;
2089  }
2090 
2091  ilUtil::sendSuccess($this->lng->txt('msg_cut_copied'), true);
2092  } // END CUT
2093 
2094  // process LINK command
2095  if ($command == 'link') {
2096  $linked_to_folders = array();
2097 
2098  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
2099  $rbac_log_active = ilRbacLog::isActive();
2100 
2101  foreach ($_POST['nodes'] as $folder_ref_id) {
2102  $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2103 
2104  foreach ($ref_ids as $ref_id) {
2105  // get node data
2106  $top_node = $tree->getNodeData($ref_id);
2107 
2108  // get subnodes of top nodes
2109  $subnodes[$ref_id] = $tree->getSubtree($top_node);
2110  }
2111 
2112  // now move all subtrees to new location
2113  foreach ($subnodes as $key => $subnode) {
2114  // first paste top_node....
2116  $new_ref_id = $obj_data->createReference();
2117  $obj_data->putInTree($folder_ref_id);
2118  $obj_data->setPermissions($folder_ref_id);
2119 
2120  // rbac log
2121  if ($rbac_log_active) {
2122  $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
2123  $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
2124  ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
2125  }
2126 
2127  // BEGIN ChangeEvent: Record link event.
2128  $node_data = $tree->getNodeData($new_ref_id);
2130  $node_data['obj_id'],
2131  $ilUser->getId(),
2132  'add',
2133  $ilObjDataCache->lookupObjId($folder_ref_id)
2134  );
2135  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2136  // END PATCH ChangeEvent: Record link event.
2137  }
2138 
2139  $ilLog->write(__METHOD__ . ', link finished');
2140  }
2141 
2142  $linked_targets = array();
2143  $links = [];
2144  if (count($linked_to_folders)) {
2145  require_once 'Services/Link/classes/class.ilLink.php';
2146  foreach ($linked_to_folders as $ref_id => $title) {
2147  $linked_targets[] = '<a href="' . ilLink::_getLink($ref_id) . '">' . $title . '</a>';
2148  $links[] = $ui->factory()->link()->standard($title, ilLink::_getLink($ref_id));
2149  }
2150  }
2151 
2152  $suffix = 'p';
2153  if (count($ref_ids) == 1) {
2154  $suffix = 's';
2155  }
2156 
2157  $mbox = $ui->factory()->messageBox()->success($this->lng->txt('mgs_objects_linked_to_the_following_folders_' . $suffix))
2158  ->withLinks($links);
2159 
2160  ilUtil::sendSuccess($ui->renderer()->render($mbox), true);
2161  } // END LINK
2162 
2163  // clear clipboard
2164  $this->clearObject();
2165 
2166  $this->ctrl->returnToParent($this);
2167  }
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
clearObject()
clear clipboard and go back to last object
$_SESSION["AccountId"]
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null, $a_handle_extension=false)
Appends the text " - Copy" to a filename in the language of the current user.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static isActive()
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
catch(Exception $e) $message
showPasteTreeObject()
Show paste tree.
$ilUser
Definition: imgupload.php:18
const LINK_OBJECT
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$links
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.
$key
Definition: croninfo.php:18
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutput()

ilContainerGUI::prepareOutput (   $a_show_subobjects = true)

prepare output

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

References ilObjectGUI\getCreationMode(), ilMemberViewGUI\showMemberViewSwitch(), and showTreeFlatIcon().

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

474  {
475  if (parent::prepareOutput($a_show_subobjects)) { // return false in admin mode
476  if ($this->getCreationMode() != true && $a_show_subobjects) {
477  // This method is called directly from ilContainerGUI::renderObject
478  #$this->showPossibleSubObjects();
479  $this->showTreeFlatIcon();
480 
481  // Member view
482  include_once './Services/Container/classes/class.ilMemberViewGUI.php';
483  ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
484  }
485  }
486  }
static showMemberViewSwitch($a_ref_id)
Show member view switch.
getCreationMode()
get creation mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recurseFolder()

static ilContainerGUI::recurseFolder (   $refid,
  $title,
  $tmpdir 
)
staticprivate

private functions which iterates through all folders and files and create an according file structure in a temporary directory.

This function works recursive.

Parameters
integer$refidreference it
tmpdictory$tmpdir
Returns
returns first created directory

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

References $DIC, $rbacsystem, $title, ilObjectGUI\$tree, ilObject\_isInTrash(), ilUtil\getASCIIFilename(), and ilUtil\makeDir().

1752  {
1753  global $DIC;
1754 
1755  $rbacsystem = $DIC->rbac()->system();
1756  $tree = $DIC->repositoryTree();
1757  $ilAccess = $DIC->access();
1758 
1759  $tmpdir = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1760  ilUtil::makeDir($tmpdir);
1761 
1762  $subtree = $tree->getChildsByTypeFilter($refid, array("fold","file"));
1763 
1764  foreach ($subtree as $child) {
1765  if (!$ilAccess->checkAccess("read", "", $child["ref_id"])) {
1766  continue;
1767  }
1768 
1769  if (ilObject::_isInTrash($child["ref_id"])) {
1770  continue;
1771  }
1772 
1773  if ($child["type"] == "fold") {
1774  self::recurseFolder($child["ref_id"], $child["title"], $tmpdir);
1775  } else {
1776  self::copyFile($child["obj_id"], $child["title"], $tmpdir);
1777  }
1778  }
1779  }
global $DIC
Definition: saml.php:7
static _isInTrash($a_ref_id)
checks wether object is in trash
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
+ Here is the call graph for this function:

◆ redrawListItemObject()

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

Parameters

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

References $_GET, $html, $id, ilObjectGUI\$tpl, ilEventItems\_getItemsOfContainer(), exit, getContentGUI(), and ilObjectActivation\getItemsByEvent().

3281  {
3282  $tpl = $this->tpl;
3283 
3284  $html = null;
3285 
3286  $item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
3287  $container_view = $this->getContentGUI();
3288 
3289  // list item is session material (not part of "_all"-items - see below)
3290  include_once './Modules/Session/classes/class.ilEventItems.php';
3291  $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
3292  if (in_array((int) $_GET["child_ref_id"], $event_items)) {
3293  include_once('./Services/Object/classes/class.ilObjectActivation.php');
3294  foreach ($this->object->items["sess"] as $id) {
3295  $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
3296  foreach ($items as $event_item) {
3297  if ($event_item["child"] == (int) $_GET["child_ref_id"]) {
3298  // sessions
3299  if ((int) $_GET["parent_ref_id"]) {
3300  $event_item["parent"] = (int) $_GET["parent_ref_id"];
3301  }
3302  $html = $container_view->renderItem($event_item);
3303  }
3304  }
3305  }
3306  }
3307 
3308  // "normal" list item
3309  if (!$html) {
3310  foreach ($this->object->items["_all"] as $id) {
3311  if ($id["child"] == (int) $_GET["child_ref_id"]) {
3312  $html = $container_view->renderItem($id);
3313  }
3314  }
3315  }
3316 
3317  if ($html) {
3318  echo $html;
3319 
3320  // we need to add onload code manually (rating, comments, etc.)
3321  echo $tpl->getOnLoadCodeForAsynch();
3322  }
3323 
3324  exit;
3325  }
getContentGUI()
Get content gui object.
static getItemsByEvent($a_event_id)
Get session material / event items.
$_GET["client_id"]
static _getItemsOfContainer($a_ref_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
exit
Definition: backend.php:16
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ removeFromDeskObject()

ilContainerGUI::removeFromDeskObject ( )
See also
ilDesktopItemHandling::removeFromDesk()

Implements ilDesktopItemHandling.

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

References $ilSetting, ilObjectGUI\$lng, $settings, ilDesktopItemGUI\removeFromDesktop(), and renderObject().

Referenced by ilObjLearningSequenceGUI\executeCommand().

1470  {
1472  $lng = $this->lng;
1473 
1474  if ((int) $ilSetting->get('disable_my_offers')) {
1475  return $this->renderObject();
1476  }
1477 
1478  include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1480  ilUtil::sendSuccess($lng->txt("removed_from_desktop"));
1481  $this->renderObject();
1482  }
renderObject()
render the object
static removeFromDesktop()
Remove item from personal desktop public.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFromSystemObject()

ilContainerGUI::removeFromSystemObject ( )

remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method

public

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

References $_POST, $app_event_handler, $ilLog, ilObjectGUI\$lng, and $log.

3766  {
3767  $ilLog = $this->log;
3768  $ilAppEventHandler = $this->app_event_handler;
3769  $lng = $this->lng;
3770 
3771  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3772  $ru = new ilRepUtilGUI($this);
3773  $ru->removeObjectsFromSystem($_POST["trash_id"]);
3774  $this->ctrl->redirect($this, "trash");
3775  }
Repository GUI Utilities.
$_POST["username"]

◆ renderBlockAsynchObject()

ilContainerGUI::renderBlockAsynchObject ( )

render the object

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

References $_GET, exit, and getContentGUI().

622  {
623  $container_view = $this->getContentGUI();
624  echo $container_view->getSingleTypeBlockAsynch($_GET["type"]);
625  exit;
626  }
getContentGUI()
Get content gui object.
$_GET["client_id"]
exit
Definition: backend.php:16
+ Here is the call graph for this function:

◆ renderObject()

ilContainerGUI::renderObject ( )

render the object

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

References $_GET, ilObjectGUI\$ctrl, $db, $ilCtrl, $ilDB, $ilSetting, $settings, $tabs, ilObjectGUI\$tpl, getContentGUI(), isActiveAdministrationPanel(), setContentSubTabs(), showAdministrationPanel(), showPermanentLink(), and showPossibleSubObjects().

Referenced by addToDeskObject(), editOrderObject(), enableMultiDownloadObject(), and removeFromDeskObject().

583  {
584  $ilDB = $this->db;
585  $tpl = $this->tpl;
586  $ilTabs = $this->tabs;
589 
590  $container_view = $this->getContentGUI();
591 
592  $this->setContentSubTabs();
593  if ($this->isActiveAdministrationPanel()) {
594  $ilTabs->activateSubTab("manage");
595  } else {
596  $ilTabs->activateSubTab("view_content");
597  }
598 
599  $container_view->setOutput();
600 
601  $this->adminCommands = $container_view->adminCommands;
602 
603  // it is important not to show the subobjects/admin panel here, since
604  // we will create nested forms in case, e.g. a news/calendar item is added
605  if ($ilCtrl->getNextClass() != "ilcolumngui") {
606  $this->showAdministrationPanel();
607  $this->showPossibleSubObjects();
608  }
609 
610  $this->showPermanentLink();
611 
612  // add tree updater javascript
613  if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize")) {
614  $ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
615  }
616  }
getContentGUI()
Get content gui object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
showPossibleSubObjects()
show possible sub objects selection list
showPermanentLink()
show permanent link
setContentSubTabs()
Set content sub tabs.
global $ilSetting
Definition: privfeed.php:17
global $ilDB
showAdministrationPanel()
show administration panel
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetRowType()

ilContainerGUI::resetRowType ( )

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

1260  {
1261  $this->cur_row_type = "";
1262  }

◆ saveListPresentation()

ilContainerGUI::saveListPresentation ( ilPropertyFormGUI  $form)
protected

Save list presentation setting.

Parameters
ilPropertyFormGUI$form

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

References ilContainer\_writeContainerSetting(), and ilPropertyFormGUI\getInput().

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

3599  {
3600  $val = ($form->getInput('list_presentation') == "tile")
3601  ? "tile"
3602  : "";
3603  ilContainer::_writeContainerSetting($this->object->getId(), "list_presentation", $val);
3604  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ savePageContentObject()

ilContainerGUI::savePageContentObject ( )

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

References $_POST, $text, ilRTE\_cleanupMediaObjectUsage(), ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), ilContainer\_lookupContainerSetting(), ilContainer\_writeContainerSetting(), and ilUtil\stripSlashes().

994  {
995  include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
996  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
998  $this->object->getId(),
999  "xhtml_page"
1000  );
1001 
1002  /*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
1003  include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
1004  $ta = new ilTextAreaInputGUI();
1005  $ta->setRteTagSet("extended_table_img");
1006  $tags = $ta->getRteTagString();*/
1007 
1008  //$text = ilUtil::stripSlashes($_POST["page_content"],
1009  // true,
1010  // $tags);
1011 
1013  $_POST["page_content"],
1014  true,
1016  );
1017  if ($xpage_id > 0) {
1018  $xpage = new ilXHTMLPage($xpage_id);
1019  $xpage->setContent($text);
1020  $xpage->save();
1021  } else {
1022  $xpage = new ilXHTMLPage();
1023  $xpage->setContent($text);
1024  $xpage->save();
1026  $this->object->getId(),
1027  "xhtml_page",
1028  $xpage->getId()
1029  );
1030  }
1031 
1032  include_once("Services/RTE/classes/class.ilRTE.php");
1034  $text,
1035  $this->object->getType() . ":html",
1036  $this->object->getId()
1037  );
1038 
1039  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1040  $this->ctrl->redirect($this, "");
1041  }
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
$text
Definition: errorreport.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
XHTML Page class.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static _cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
Synchronises appearances of media objects in $a_text with media object usage table.
$_POST["username"]
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

◆ savePasswordObject()

ilContainerGUI::savePasswordObject ( )
protected

Save password.

Returns

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

References $form, $ilUser, $user, initFormPasswordInstruction(), and showPasswordInstructionObject().

3260  {
3261  $ilUser = $this->user;
3262 
3264  if ($form->checkInput()) {
3265  $ilUser->resetPassword($this->form->getInput('new_password'), $this->form->getInput('new_password'));
3266  ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'), true);
3267  $this->showPasswordInstructionObject(false);
3268  return true;
3269  }
3270  $form->setValuesByPost();
3272  }
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.
initFormPasswordInstruction()
Init password form.
if(isset($_POST['submit'])) $form
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

Save Sorting.

public

Parameters

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

References $_POST, and ilContainerSorting\_getInstance().

2870  {
2871  include_once('Services/Container/classes/class.ilContainerSorting.php');
2872  $sorting = ilContainerSorting::_getInstance($this->object->getId());
2873 
2874  // Allow comma
2875  $positions = str_replace(',', '.', $_POST['position']);
2876 
2877  $sorting->savePost($positions);
2878  ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
2879  $this->ctrl->redirect($this, "editOrder");
2880  }
static _getInstance($a_obj_id)
get instance by obj_id
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSortingSettings()

ilContainerGUI::saveSortingSettings ( ilPropertyFormGUI  $form)
protected

Save sorting settings.

Parameters
ilPropertyFormGUI$form

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

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

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

3721  {
3722  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
3723  $settings = new ilContainerSortingSettings($this->object->getId());
3724  $settings->setSortMode($form->getInput("sorting"));
3725 
3726  switch ($form->getInput('sorting')) {
3728  $settings->setSortDirection($form->getInput('title_sorting_direction'));
3729  break;
3731  $settings->setSortDirection($form->getInput('activation_sorting_direction'));
3732  break;
3734  $settings->setSortDirection($form->getInput('creation_sorting_direction'));
3735  break;
3737  $settings->setSortNewItemsPosition($form->getInput('manual_new_items_position'));
3738  $settings->setSortNewItemsOrder($form->getInput('manual_new_items_order'));
3739  $settings->setSortDirection($form->getInput('manual_sorting_direction'));
3740  break;
3741  }
3742 
3743  $settings->update();
3744  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStyleSettingsObject()

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

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

References $_POST, $ilSetting, $settings, ilObjStyleSheet\_lookupStandard(), and ilUtil\stripSlashes().

3141  {
3143 
3144  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3145  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
3146  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
3147  || $this->object->getStyleSheetId() == 0)) {
3148  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
3149  $this->object->update();
3150  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
3151  }
3152  $this->ctrl->redirect($this, "editStyleProperties");
3153  }
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ setColumnSettings()

ilContainerGUI::setColumnSettings ( ilColumnGUI  $column_gui)

May be overwritten in subclasses.

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

References $access, allowBlocksMoving(), isActiveAdministrationPanel(), ilColumnGUI\setAdminCommands(), ilColumnGUI\setBlockProperty(), ilColumnGUI\setEnableMovement(), and ilColumnGUI\setRepositoryItems().

2631  {
2632  $ilAccess = $this->access;
2633  parent::setColumnSettings($column_gui);
2634 
2635  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
2636  $this->isActiveAdministrationPanel() &&
2637  $this->allowBlocksMoving()) {
2638  $column_gui->setEnableMovement(true);
2639  }
2640 
2641  $column_gui->setRepositoryItems(
2642  $this->object->getSubItems($this->isActiveAdministrationPanel(), true)
2643  );
2644 
2645  //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
2646  // && $this->allowBlocksConfigure())
2647  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
2648  $column_gui->setBlockProperty("news", "settings", true);
2649  //$column_gui->setBlockProperty("news", "public_notifications_option", true);
2650  $column_gui->setBlockProperty("news", "default_visibility_option", true);
2651  $column_gui->setBlockProperty("news", "hide_news_block_option", true);
2652  }
2653 
2654  if ($this->isActiveAdministrationPanel()) {
2655  $column_gui->setAdminCommands(true);
2656  }
2657  }
setBlockProperty($a_block_type, $a_property, $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...
allowBlocksMoving()
Standard is to allow blocks moving.
setRepositoryItems($a_repositoryitems)
Set Repository Items.
setAdminCommands($a_admincommands)
Set Administration Commmands.
setEnableMovement($a_enablemovement)
Set Enable Movement.
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

Set content sub tabs.

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

References addStandardContainerSubTabs().

Referenced by renderObject().

633  {
635  }
addStandardContainerSubTabs($a_include_view=true)
Add standar 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 ( )

Add page editor tabs.

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

References ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), and isActiveAdministrationPanel().

1269  {
1270  $lng = $this->lng;
1271 
1272  if (!$this->isActiveAdministrationPanel()
1273  || strtolower($this->ctrl->getCmdClass()) != "ilcontainerpagegui") {
1274  return;
1275  }
1276 
1277  $lng->loadLanguageModule("content");
1278  //$tabs_gui = new ilTabsGUI();
1279  //$tabs_gui->setSubTabs();
1280 
1281  // back to upper context
1282  $this->tabs_gui->setBackTarget(
1283  $this->lng->txt("obj_cat"),
1284  $this->ctrl->getLinkTarget($this, "frameset"),
1285  ilFrameTargetInfo::_getFrame("MainContent")
1286  );
1287 
1288  $this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view"), array("", "view"), "ilcontainerpagegui");
1289 
1290  //$this->tpl->setTabs($tabs_gui->getHTML());
1291  }
static _getFrame($a_class, $a_type='')
Get content frame name.
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilContainerGUI::setSideColumnReturn ( )

Set return point for side column actions.

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

3851  {
3852  $this->ctrl->setReturn($this, "");
3853  }

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

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

References ilObjectListGUIFactory\_getListGUIByType(), and ilContainer\_lookupContainerSetting().

513  {
514  if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title")) {
515  $this->tpl->setTitle($this->object->getTitle());
516  $this->tpl->setDescription($this->object->getLongDescription());
517 
518  // set tile icon
519  $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
520  $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_" . $this->object->getType()));
521 
522  include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
523  $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
524  $lgui->initItem($this->object->getRefId(), $this->object->getId());
525  $this->tpl->setAlertProperties($lgui->getAlertProperties());
526  }
527  }
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( )

show administration panel

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

References $_GET, $_SESSION, $access, $DIC, $GLOBALS, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $toolbar, addDownloadButton(), ilUtil\getImagePath(), isActiveAdministrationPanel(), isActiveOrdering(), isMultiDownloadEnabled(), and ilUtil\sendInfo().

Referenced by renderObject(), and ilObjOrgUnitGUI\updateSettings().

641  {
642  global $DIC;
643 
644  $ilAccess = $this->access;
645  $lng = $this->lng;
646 
647  $main_tpl = $DIC->ui()->mainTemplate();
648 
649  $lng->loadLanguageModule('cntr');
650 
651  if ($_SESSION["clipboard"]) {
652  // #11545
653  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
654 
655  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
656  $toolbar = new ilToolbarGUI();
657  $this->ctrl->setParameter($this, "type", "");
658  $this->ctrl->setParameter($this, "item_ref_id", "");
659 
660  $toolbar->addFormButton(
661  $this->lng->txt('paste_clipboard_items'),
662  'paste'
663  );
664 
665  $toolbar->addFormButton(
666  $this->lng->txt('clear_clipboard'),
667  'clear'
668  );
669 
670  $main_tpl->addAdminPanelToolbar($toolbar, true, false);
671  } elseif ($this->isActiveAdministrationPanel()) {
672  // #11545
673  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
674 
675  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
676  $toolbar = new ilToolbarGUI();
677  $this->ctrl->setParameter($this, "type", "");
678  $this->ctrl->setParameter($this, "item_ref_id", "");
679 
680  // if (!$_SESSION["clipboard"])
681  // {
682  if ($this->object->gotItems()) {
683  $toolbar->setLeadingImage(
684  ilUtil::getImagePath("arrow_upright.svg"),
685  $lng->txt("actions")
686  );
687  $toolbar->addFormButton(
688  $this->lng->txt('delete_selected_items'),
689  'delete'
690  );
691  $toolbar->addFormButton(
692  $this->lng->txt('move_selected_items'),
693  'cut'
694  );
695  $toolbar->addFormButton(
696  $this->lng->txt('copy_selected_items'),
697  'copy'
698  );
699  $toolbar->addFormButton(
700  $this->lng->txt('link_selected_items'),
701  'link'
702  );
703  // add download button if multi download enabled
704  $folder_set = new ilSetting("fold");
705  if ($folder_set->get("enable_multi_download") == true) {
706  $toolbar->addSeparator();
707  $this->addDownloadButton($main_tpl, $toolbar);
708  }
709  }
710  if ($this->object->getType() == 'crs' or $this->object->getType() == 'grp') {
711  if ($this->object->gotItems()) {
712  $toolbar->addSeparator();
713  }
714 
715  $toolbar->addButton(
716  $this->lng->txt('cntr_adopt_content'),
717  $this->ctrl->getLinkTargetByClass(
718  'ilObjectCopyGUI',
719  'adoptContent'
720  )
721  );
722  }
723  // }
724  /*else
725  {
726 
727  if ($this->isMultiDownloadEnabled())
728  {
729  $toolbar->addSeparator();
730  $toolbar->addFormButton(
731  $this->lng->txt('download_selected_items'),
732  'download'
733  );
734  }
735  }*/
736 
737  $main_tpl->addAdminPanelToolbar(
738  $toolbar,
739  ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false,
740  ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false
741  );
742 
743  // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
744  if ($this->object->gotItems()) {
745  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
746  }
747  } else {
748  if ($this->edit_order) {
749  if ($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
750  include_once('./Services/Container/classes/class.ilContainer.php');
751 
752  if ($this->isActiveOrdering()) {
753  // #11843
754  $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
755 
756  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
757  $toolbar = new ilToolbarGUI();
758  $this->ctrl->setParameter($this, "type", "");
759  $this->ctrl->setParameter($this, "item_ref_id", "");
760 
761  $toolbar->addFormButton(
762  $this->lng->txt('sorting_save'),
763  'saveSorting'
764  );
765 
766  $main_tpl->addAdminPanelToolbar($toolbar, true, false);
767  }
768  }
769  }
770  // bugfix mantis 24559
771  // undoing an erroneous change inside mantis 23516 by adding "Download Multiple Objects"-functionality for non-admins
772  // as they don't have the possibility to use the multi-download-capability of the manage-tab
773  elseif ($this->isMultiDownloadEnabled()) {
774  // bugfix mantis 0021272
775  $ref_id = $_GET['ref_id'];
776  $num_files = $this->tree->getChildsByType($ref_id, "file");
777  $num_folders = $this->tree->getChildsByType($ref_id, "fold");
778  if (count($num_files) > 0 or count($num_folders) > 0) {
779  // #11843
780  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
781 
782  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
783  $toolbar = new ilToolbarGUI();
784  $this->ctrl->setParameter($this, "type", "");
785  $this->ctrl->setParameter($this, "item_ref_id", "");
786 
787  $this->addDownloadButton($main_tpl, $toolbar);
788 
789  $GLOBALS['tpl']->addAdminPanelToolbar(
790  $toolbar,
791  $this->object->gotItems() ? true : false,
792  $this->object->gotItems() ? true : false
793  );
794  } else {
795  ilUtil::sendInfo($this->lng->txt('msg_no_downloadable_objects'), true);
796  }
797  }
798  }
799  }
$_SESSION["AccountId"]
addDownloadButton(&$tpl, &$toolbar)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
isActiveOrdering()
Check if ordering is enabled.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

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

References $_GET, $i, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, $type, exit, and ilUtil\getStyleSheetLocation().

1049  {
1050  $lng = $this->lng;
1051  $tree = $this->tree;
1052 
1053  $tpl = new ilTemplate(
1054  "tpl.container_link_help.html",
1055  true,
1056  true,
1057  "Services/Container"
1058  );
1059 
1060  $type_ordering = array(
1061  "cat", "fold", "crs", "grp", "chat", "frm", "lres",
1062  "glo", "webr", "file", "exc",
1063  "tst", "svy", "mep", "qpl", "spl");
1064 
1065  $childs = $tree->getChilds($_GET["ref_id"]);
1066  foreach ($childs as $child) {
1067  if (in_array($child["type"], array("lm", "sahs", "htlm"))) {
1068  $cnt["lres"]++;
1069  } else {
1070  $cnt[$child["type"]]++;
1071  }
1072  }
1073 
1074  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1075  $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
1076  foreach ($type_ordering as $type) {
1077  $tpl->setCurrentBlock("row");
1078  $tpl->setVariable("ROWCOL", "tblrow" . ((($i++) % 2) + 1));
1079  if ($type != "lres") {
1080  $tpl->setVariable("TYPE", $lng->txt("objs_" . $type) .
1081  " (" . ((int) $cnt[$type]) . ")");
1082  } else {
1083  $tpl->setVariable("TYPE", $lng->txt("obj_lrss") .
1084  " (" . ((int) $cnt["lres"]) . ")");
1085  }
1086  $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
1087  $tpl->parseCurrentBlock();
1088  }
1089  $tpl->show();
1090  exit;
1091  }
$type
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
special template class to simplify handling of ITX/PEAR
exit
Definition: backend.php:16
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

ilContainerGUI::showPasswordInstructionObject (   $a_init = true)
protected

Show webdav password instruction.

Returns

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

References $toolbar, ilObjectGUI\$tpl, ilWebDAVUtil\getInstance(), initFormPasswordInstruction(), and ilUtil\sendInfo().

Referenced by savePasswordObject().

3208  {
3209  $tpl = $this->tpl;
3210  $ilToolbar = $this->toolbar;
3211 
3212  if ($a_init) {
3213  ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
3214  $this->initFormPasswordInstruction();
3215  }
3216 
3217  include_once('Services/WebDAV/classes/class.ilWebDAVUtil.php');
3218  $dav_util = ilWebDAVUtil::getInstance();
3219  $ilToolbar->addButton(
3220  $this->lng->txt('mount_webfolder'),
3221  $dav_util->getMountURI($this->object->getRefId()),
3222  '_blank',
3223  '',
3224  $dav_util->getFolderURI($this->object->getRefId())
3225  );
3226 
3227 
3228  $tpl->setContent($this->form->getHTML());
3229  }
initFormPasswordInstruction()
Init password form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getInstance()
Get singleton instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPasteTreeObject()

ilContainerGUI::showPasteTreeObject ( )

Show paste tree.

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

References $_SESSION, $error, ilObjectGUI\$ilErr, $message, Sabre\VObject\$output, $t, $tabs, $toolbar, ilUtil\getImagePath(), ilSubmitButton\getInstance(), and getTreeSelectorGUI().

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

2194  {
2195  $ilTabs = $this->tabs;
2196  $ilToolbar = $this->toolbar;
2197  $ilErr = $this->error;
2198 
2199  $ilTabs->setTabActive('view_content');
2200 
2201  if (!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut'))) {
2202  $message = __METHOD__ . ": Unknown action.";
2203  $ilErr->raiseError($message, $ilErr->WARNING);
2204  }
2205  $cmd = $_SESSION['clipboard']['cmd'];
2206 
2207  //
2208  $exp = $this->getTreeSelectorGUI($cmd);
2209  if ($exp->handleCommand()) {
2210  return;
2211  }
2212  $output = $exp->getHTML();
2213 
2214  $txt_var = ($cmd == "copy")
2215  ? "copy"
2216  : "paste";
2217 
2218  // toolbars
2219  $t = new ilToolbarGUI();
2220  $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
2221 
2222  include_once("./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2224  $b->setCaption($txt_var);
2225  $b->setCommand("performPasteIntoMultipleObjects");
2226 
2227  //$t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
2228  $t->addStickyItem($b);
2229 
2230  $t->addSeparator();
2231  $this->lng->loadLanguageModule('obj');
2232  $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
2233 
2234  $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
2235  $t->setCloseFormTag(false);
2236  $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), " ");
2237  $output = $t->getHTML() . $output;
2238  $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), " ");
2239  $t->setCloseFormTag(true);
2240  $t->setOpenFormTag(false);
2241  $output .= "<br />" . $t->getHTML();
2242 
2243  $this->tpl->setContent($output);
2244  }
$_SESSION["AccountId"]
catch(Exception $e) $message
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( )

show permanent link

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

References $DIC, and ilObjectGUI\$tpl.

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

840  {
841  global $DIC;
842 
843  $tpl = $DIC->ui()->mainTemplate();
844 
845  $tpl->setPermanentLink(
846  $this->object->getType(),
847  $this->object->getRefId(),
848  "",
849  "_top"
850  );
851  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilContainerGUI::showPossibleSubObjects ( )

show possible sub objects selection list

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

References ilObjectAddNewItemGUI\render().

Referenced by renderObject().

533  {
534  include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
535  $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
536  $gui->render();
537  }
Render add new item selector.
render()
Add new item selection to current page incl.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showRepTree()

ilContainerGUI::showRepTree ( )

Show tree.

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

References $_GET, $_SESSION, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, $ilUser, $settings, ilObjectGUI\$tpl, $user, and ilUtil\stripSlashes().

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

3379  {
3380  $tpl = $this->tpl;
3381  $ilUser = $this->user;
3383  $ilCtrl = $this->ctrl;
3384 
3385  // set current repository view mode
3386  if (!empty($_GET["set_mode"])) {
3387  $_SESSION["il_rep_mode"] = $_GET["set_mode"];
3388  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
3389  $ilUser->writePref("il_rep_mode", $_GET["set_mode"]);
3390  }
3391  }
3392 
3393  // get user setting
3394  if ($_SESSION["il_rep_mode"] == "") {
3395  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
3396  $_SESSION["il_rep_mode"] = $ilUser->getPref("il_rep_mode");
3397  }
3398  }
3399 
3400  // if nothing set, get default view
3401  if ($_SESSION["il_rep_mode"] == "") {
3402  $_SESSION["il_rep_mode"] = $ilSetting->get("default_repository_view");
3403  }
3404 
3405  $mode = ($_SESSION["il_rep_mode"] != "")
3406  ? $_SESSION["il_rep_mode"]
3407  : "flat";
3408 
3409  if (isset($_REQUEST['new_type'])) {
3410  $ilCtrl->setParameter($this, 'new_type', \ilUtil::stripSlashes($_REQUEST['new_type']));
3411  }
3412 
3413  // check for administration context, see #0016312
3414  if ($mode == "tree" && (strtolower($_GET["baseClass"]) != "iladministrationgui")) {
3415  include_once("./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3416  $exp = new ilRepositoryExplorerGUI($this, "showRepTree");
3417  if (method_exists($this, 'getAdditionalWhitelistTypes')) {
3418  $whitelist = array_merge(
3419  $exp->getTypeWhiteList(),
3420  $this->getAdditionalWhitelistTypes()
3421  );
3422  $exp->setTypeWhiteList($whitelist);
3423  }
3424 
3425  if (!$exp->handleCommand()) {
3426  $tpl->setLeftNavContent($exp->getHTML());
3427  }
3428  }
3429  }
$_SESSION["AccountId"]
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Repository explorer GUI class.
$ilUser
Definition: imgupload.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTreeFlatIcon()

ilContainerGUI::showTreeFlatIcon ( )

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

References $_GET, $_SESSION, ilObjectGUI\$tpl, and ilMemberViewSettings\getInstance().

Referenced by prepareOutput().

489  {
490  $tpl = $this->tpl;
491 
492  // dont show icon, if role (permission gui->rolegui) is edited
493  if ($_GET["obj_id"] != "") {
494  return;
495  }
496  // hide for member view
497  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
498  if (ilMemberViewSettings::getInstance()->isActive()) {
499  return;
500  }
501 
502  $mode = ($_SESSION["il_rep_mode"] == "flat")
503  ? "tree"
504  : "flat";
505  $link = "ilias.php?baseClass=ilRepositoryGUI&amp;cmd=frameset&amp;set_mode=" . $mode . "&amp;ref_id=" . $this->object->getRefId();
506  $tpl->setTreeFlatIcon($link, $mode);
507  }
$_SESSION["AccountId"]
$_GET["client_id"]
static getInstance()
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchToOldEditorObject()

ilContainerGUI::switchToOldEditorObject ( )

Switch to old page editor.

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

References $_SESSION, ilObjectGUI\$ctrl, and $ilCtrl.

868  {
870 
871  $_SESSION["il_cntr_editor"] = "old";
872  $ilCtrl->redirect($this, "editPageFrame");
873  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18

◆ switchToStdEditorObject()

ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

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

References $_SESSION, ilObjectGUI\$ctrl, and $ilCtrl.

857  {
859 
860  $_SESSION["il_cntr_editor"] = "std";
861  $ilCtrl->redirect($this, "editPageFrame");
862  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

public

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

References $_GET, and ilObjectGUI\$tpl.

Referenced by ilObjLearningSequenceGUI\executeCommand().

3752  {
3753  $tpl = $this->tpl;
3754 
3755  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3756  $ru = new ilRepUtilGUI($this);
3757  $ru->showTrashTable($_GET["ref_id"]);
3758  }
$_GET["client_id"]
Repository GUI Utilities.
+ Here is the caller graph for this function:

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

References $_GET, and $_POST.

Referenced by ilObjLearningSequenceGUI\executeCommand().

3781  {
3782  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3783  $ru = new ilRepUtilGUI($this);
3784  $ru->restoreObjects($_GET["ref_id"], $_POST["trash_id"]);
3785  $this->ctrl->redirect($this, "trash");
3786  }
$_GET["client_id"]
Repository GUI Utilities.
$_POST["username"]
+ Here is the caller graph for this function:

◆ useNewEditorObject()

ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

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

References $access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, and ilContainer\_writeContainerSetting().

879  {
881  $ilAccess = $this->access;
882  $lng = $this->lng;
884 
885  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
886  include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
887 
888  /* keep old page content for now...
889  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
890  "xhtml_page");
891  if ($xpage_id)
892  {
893  $xpage = new ilXHTMLPage($xpage_id);
894  }
895  */
896 
898  $this->object->getId(),
899  "xhtml_page",
900  0
901  );
902 
903  ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
904  }
905 
906  $ilCtrl->redirect($this, "editPageFrame");
907  }
global $ilCtrl
Definition: ilias.php:18
static _writeContainerSetting($a_id, $a_keyword, $a_value)
+ Here is the call graph for this function:

Field Documentation

◆ $access

◆ $app_event_handler

ilContainerGUI::$app_event_handler
protected

◆ $bl_cnt

ilContainerGUI::$bl_cnt = 1

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

◆ $db

ilContainerGUI::$db
protected

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

Referenced by renderObject().

◆ $error

◆ $log

◆ $multi_download_enabled

ilContainerGUI::$multi_download_enabled = false

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

Referenced by isMultiDownloadEnabled().

◆ $obj_data_cache

ilContainerGUI::$obj_data_cache
protected

◆ $obj_definition

ilContainerGUI::$obj_definition
protected

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

Referenced by copyObject().

◆ $plugin_admin

ilContainerGUI::$plugin_admin
protected

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

Referenced by getAsynchItemListObject().

◆ $rbacadmin

ilContainerGUI::$rbacadmin
protected

◆ $rbacreview

◆ $rbacsystem

◆ $settings

◆ $tabs

◆ $toolbar

◆ $ui

ilContainerGUI::$ui
protected

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

Referenced by performPasteIntoMultipleObjectsObject().

◆ $user


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