ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerGUI Class Reference

Class ilContainerGUI. More...

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

Public Member Functions

 ilContainerGUI ($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...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 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 ()
 
 renderItemList ($a_type="all")
 
 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...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard 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 (&$tabs_gui)
 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 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 ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings ($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 Item ListGUI 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 ($a_initial_call=false)
 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...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 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...
 

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
 
 $ilias
 
 $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...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 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...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 

Private Member Functions

 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
Version
$Id$

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

Member Function Documentation

◆ __showTimingsButton()

ilContainerGUI::__showTimingsButton ( $tpl)

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

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

707  {
708  global $tree;
709 
710  if(!$tree->checkForParentType($this->object->getRefId(),'crs'))
711  {
712  return false;
713  }
714  $tpl->setCurrentBlock("custom_button");
715  $tpl->setVariable("ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','editTimings'));
716  $tpl->setVariable("TXT_ADMIN_MODE",$this->lng->txt('timings_edit'));
717  $tpl->parseCurrentBlock();
718  return true;
719  }

◆ _buildPath()

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

build path

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

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

3394  {
3395  global $tree;
3396 
3397  $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
3398  $counter = 0;
3399  foreach($path_arr as $data)
3400  {
3401  if($counter++)
3402  {
3403  $path .= " > ";
3404  }
3405  $path .= $data['title'];
3406  }
3407 
3408  return $path;
3409  }
$path
Definition: index.php:22

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

References ilUtil\getImagePath().

Referenced by renderItemList().

1222  {
1223  $icon = ilUtil::getImagePath("icon_".$a_type.".png");
1224  $title = $this->lng->txt("objs_".$a_type);
1225 
1226  if ($a_show_image)
1227  {
1228  $a_tpl->setCurrentBlock("container_header_row_image");
1229  $a_tpl->setVariable("HEADER_IMG", $icon);
1230  $a_tpl->setVariable("HEADER_ALT", $title);
1231  }
1232  else
1233  {
1234  $a_tpl->setCurrentBlock("container_header_row");
1235  }
1236 
1237  $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
1238  $a_tpl->parseCurrentBlock();
1239  $a_tpl->touchBlock("container_row");
1240  }
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:

◆ addMessageRow()

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

add message row

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

Referenced by renderItemList().

1313  {
1314  $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1315  ? "row_type_2"
1316  : "row_type_1";
1317 
1318  $a_tpl->touchBlock($this->cur_row_type);
1319 
1320  $type = $this->lng->txt("obj_".$a_type);
1321  $a_message = str_replace("[type]", $type, $a_message);
1322 
1323  $a_tpl->setVariable("ROW_NBSP", " ");
1324 
1325  $a_tpl->setCurrentBlock("container_standard_row");
1326  $a_tpl->setVariable("BLOCK_ROW_CONTENT",
1327  $a_message);
1328  $a_tpl->parseCurrentBlock();
1329  $a_tpl->touchBlock("container_row");
1330  }
+ Here is the caller graph for this function:

◆ addPageTabs()

ilContainerGUI::addPageTabs ( )

Add page tabs.

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

References $ilCtrl.

275  {
276  global $ilTabs, $ilCtrl;
277 
278  $ilTabs->addTarget("obj_sty",
279  $ilCtrl->getLinkTarget($this, 'editStyleProperties'), "editStyleProperties");
280  }
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 1369 of file class.ilContainerGUI.php.

References $_SESSION, $ilCtrl, $ilSetting, $ilUser, ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), isActiveAdministrationPanel(), and ilContainer\SORT_MANUAL.

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

1370  {
1371  global $ilTabs, $ilAccess, $lng, $ilCtrl, $ilUser, $ilSetting;
1372 
1373  if (!is_object($this->object))
1374  {
1375  return;
1376  }
1377 
1378  if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId()))
1379  {
1380  if (!$this->isActiveAdministrationPanel())
1381  {
1382  $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, ""));
1383  }
1384  else
1385  {
1386  $ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
1387  }
1388  }
1389 
1390  if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
1391  ($this->adminCommands ||
1392  (is_object($this->object) &&
1393  ($ilAccess->checkAccess("write", "", $this->object->getRefId())))
1394  ||
1395  (is_object($this->object) &&
1396  ($this->object->getHiddenFilesFound())) ||
1397  $_SESSION["clipboard"]
1398  )
1399  )
1400  {
1401  if ($this->isActiveAdministrationPanel())
1402  {
1403  $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
1404  }
1405  else
1406  {
1407  $ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
1408  }
1409  }
1410  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1411  is_object($this->object) &&
1412  $ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
1413  $this->object->getOrderType() == ilContainer::SORT_MANUAL
1414  )
1415  {
1416  $ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
1417  }
1418  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1419  is_object($this->object) &&
1420  $ilAccess->checkAccess("write", "", $this->object->getRefId())
1421  )
1422  {
1423  if ($ilSetting->get("enable_cat_page_edit"))
1424  {
1425  $ilTabs->addSubTab("page_editor", $lng->txt("cntr_text_media_editor"), $ilCtrl->getLinkTarget($this, "editPageFrame"),
1426  ilFrameTargetInfo::_getFrame("MainContent"));
1427  }
1428  }
1429  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStandardRow()

ilContainerGUI::addStandardRow ( $a_tpl,
  $a_html,
  $a_item_ref_id = "",
  $a_item_obj_id = "",
  $a_image_type = "" 
)

adds a standard row to a block template

Parameters
object$a_tplblock template
string$a_htmlhtml code private

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

References $path, ilContainer\_lookupIconPath(), ilContainerSortingSettings\_lookupSortMode(), ilUtil\getImagePath(), isActiveAdministrationPanel(), and ilContainer\SORT_MANUAL.

Referenced by renderItemList().

1251  {
1252  $this->cur_row_type = ($this->cur_row_type == "row_type_1")
1253  ? "row_type_2"
1254  : "row_type_1";
1255 
1256  $a_tpl->touchBlock($this->cur_row_type);
1257 
1258  $nbsp = true;
1259  if ($this->ilias->getSetting("icon_position_in_lists") == "item_rows")
1260  {
1261  $icon = ilUtil::getImagePath("icon_".$a_image_type.".png");
1262  $alt = $this->lng->txt("obj_".$a_image_type);
1263 
1264  // custom icon
1265  if ($this->ilias->getSetting("custom_icons") &&
1266  in_array($a_image_type, array("cat","grp","crs")))
1267  {
1268  require_once("./Services/Container/classes/class.ilContainer.php");
1269  if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "")
1270  {
1271  $icon = $path;
1272  }
1273  }
1274 
1275  $a_tpl->setCurrentBlock("block_row_image");
1276  $a_tpl->setVariable("ROW_IMG", $icon);
1277  $a_tpl->setVariable("ROW_ALT", $alt);
1278  $a_tpl->parseCurrentBlock();
1279  $nbsp = false;
1280  }
1281 
1282  if ($this->isActiveAdministrationPanel())
1283  {
1284  $a_tpl->setCurrentBlock("block_row_check");
1285  $a_tpl->setVariable("ITEM_ID", $a_item_ref_id);
1286  $a_tpl->parseCurrentBlock();
1287  $nbsp = false;
1288  }
1289  include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
1290  if($this->isActiveAdministrationPanel() &&
1292  {
1293  $a_tpl->setCurrentBlock('block_position');
1294  $a_tpl->setVariable('POS_TYPE',$a_image_type);
1295  $a_tpl->setVariable('POS_ID',$a_item_ref_id);
1296  $a_tpl->setVariable('POSITION',sprintf('%.1f',$this->current_position++));
1297  $a_tpl->parseCurrentBlock();
1298  }
1299  if ($nbsp)
1300  {
1301  $a_tpl->setVariable("ROW_NBSP", "&nbsp;");
1302  }
1303  $a_tpl->setCurrentBlock("container_standard_row");
1304  $a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
1305  $a_tpl->parseCurrentBlock();
1306  $a_tpl->touchBlock("container_row");
1307  }
_lookupIconPath($a_id, $a_size="big")
lookup icon path
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file) ...
$path
Definition: index.php:22
static _lookupSortMode($a_obj_id)
lookup sort mode
+ 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 1512 of file class.ilContainerGUI.php.

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

1513  {
1514  global $ilSetting, $lng;
1515 
1516  if((int)$ilSetting->get('disable_my_offers'))
1517  {
1518  return $this->renderObject();
1519  }
1520 
1521  include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1523  ilUtil::sendSuccess($lng->txt("added_to_desktop"));
1524  $this->renderObject();
1525  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
renderObject()
render the object
static addToDesktop()
Add desktop item public.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ afterUpdate()

ilContainerGUI::afterUpdate ( )
protected

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

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

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

105  {
106  // check if template is changed
107  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
108  $current_tpl_id = (int) ilDidacticTemplateObjSettings::lookupTemplateId(
109  $this->object->getRefId()
110  );
111  $new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
112 
113  if($new_tpl_id != $current_tpl_id)
114  {
115  $_REQUEST['tplid'] = $new_tpl_id;
116 
117  // redirect to didactic template confirmation
118  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
119  $this->ctrl->setReturn($this,'edit');
120  $this->ctrl->setCmdClass('ildidactictemplategui');
121  $this->ctrl->setCmd('confirmTemplateSwitch');
122  $dtpl_gui = new ilDidacticTemplateGUI($this);
123  return $this->ctrl->forwardCommand($dtpl_gui);
124  }
125  parent::afterUpdate();
126  }
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.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ 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 3089 of file class.ilContainerGUI.php.

3090  {
3091  true;
3092  }

◆ allowBlocksMoving()

ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

Referenced by setColumnSettings().

3082  {
3083  true;
3084  }
+ Here is the caller graph for this function:

◆ cancelMoveLinkObject()

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

References $_SESSION, and $GLOBALS.

2374  {
2375  unset($_SESSION['clipboard']);
2376  $GLOBALS['ilCtrl']->returnToParent($this);
2377  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$GLOBALS['ct_recipient']

◆ cancelPageContentObject()

ilContainerGUI::cancelPageContentObject ( )

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

914  {
915  $this->ctrl->redirect($this, "");
916  }

◆ clearAdminCommandsDetermination()

ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

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

Referenced by renderItemList().

1175  {
1176  $this->adminCommands = false;
1177  }
+ Here is the caller graph for this function:

◆ clearObject()

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

public

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

References $_POST, $_SESSION, disableAdministrationPanelObject(), and ilUtil\sendSuccess().

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

1963  {
1964  unset($_SESSION["clipboard"]);
1965  unset($_SESSION["il_rep_clipboard"]);
1966 
1967  //var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1968 
1969  // only redirect if clipboard was cleared
1970  if (isset($_POST["cmd"]["clear"]))
1971  {
1972  ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"),true);
1973 
1974  //$this->ctrl->returnToParent($this);
1975  //ilUtil::redirect($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
1977  }
1978  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
disableAdministrationPanelObject()
enable administration panel
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipboardObject()

ilContainerGUI::clipboardObject ( )

Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.

public show clipboard

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

References $_SESSION, ilObjectGUI\$data, $ilCtrl, $ilErr, $ilLog, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $tab, ilObjectGUI\$tpl, and ilObjectFactory\getInstanceByRefId().

2854  {
2855  global $ilErr, $ilLog, $ilTabs, $tpl, $ilToolbar, $ilCtrl, $lng;
2856 
2857  $ilTabs->activateTab("clipboard");
2858 
2859  // function should not be called if clipboard is empty
2860  if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard']))
2861  {
2862  $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2863  $ilLog->write($message,$ilLog->FATAL);
2864  $ilErr->raiseError($this->lng->txt("permission_denied"),$ilErr->WARNING);
2865  }
2866 
2867  $data = array();
2868  foreach($_SESSION["clipboard"]["ref_ids"] as $ref_id)
2869  {
2870  if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id,false))
2871  {
2872  continue;
2873  }
2874 
2875  $data[] = array(
2876  "type" => $tmp_obj->getType(),
2877  "type_txt" => $this->lng->txt("obj_".$tmp_obj->getType()),
2878  "title" => $tmp_obj->getTitle(),
2879  "cmd" => ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]),
2880  "ref_id" => $ref_id,
2881  "obj_id" => $tmp_obj->getId()
2882  );
2883 
2884  unset($tmp_obj);
2885  }
2886 
2887  include_once("./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2888  $tab = new ilObjClipboardTableGUI($this, "clipboard");
2889  $tab->setData($data);
2890  $tpl->setContent($tab->getHTML());
2891 
2892  if (count($data) > 0)
2893  {
2894  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2895  $ilToolbar->addFormButton($lng->txt("insert_object_here"),
2896  "paste");
2897  $ilToolbar->addFormButton($lng->txt("clear_clipboard"),
2898  "clear");
2899  }
2900 
2901  return true;
2902  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ cloneAllObject()

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

public

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

References $_COOKIE, $_GET, $_POST, $_REQUEST, $ilCtrl, $ilErr, $ilLog, $ilUser, $options, ilObjectGUI\$ref_id, $result, ilObjectGUI\$tree, ilObjectGUI\createObject(), ilObjectFactory\getInstanceByRefId(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

3250  {
3251  global $ilLog, $ilCtrl;
3252 
3253  include_once('./Services/Link/classes/class.ilLink.php');
3254  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
3255 
3256  global $ilAccess,$ilErr,$rbacsystem,$tree,$ilUser;
3257 
3258  $new_type = $_REQUEST['new_type'];
3259  $ref_id = (int) $_GET['ref_id'];
3260  $clone_source = (int) $_REQUEST['clone_source'];
3261 
3262  if(!$rbacsystem->checkAccess('create', $ref_id,$new_type))
3263  {
3264  $ilErr->raiseError($this->lng->txt('permission_denied'));
3265  }
3266  if(!$clone_source)
3267  {
3268  ilUtil::sendFailure($this->lng->txt('select_one'));
3269  $this->createObject();
3270  return false;
3271  }
3272  if(!$ilAccess->checkAccess('write','', $clone_source,$new_type))
3273  {
3274  $ilErr->raiseError($this->lng->txt('permission_denied'));
3275  }
3276 
3277  $options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
3278  $orig = ilObjectFactory::getInstanceByRefId($clone_source);
3279  $result = $orig->cloneAllObject($_COOKIE['PHPSESSID'], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
3280 
3281  // Check if copy is in progress
3282  if ($result == $ref_id)
3283  {
3284  ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"),true);
3285  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
3286  $ilCtrl->redirectByClass("ilrepositorygui", "");
3287  }
3288  else
3289  {
3290  ilUtil::sendSuccess($this->lng->txt("object_duplicated"),true);
3291  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $result);
3292  $ilCtrl->redirectByClass("ilrepositorygui", "");
3293  }
3294  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$result
$_GET["client_id"]
$_COOKIE["ilClientId"]
Definition: cron.php:11
createObject()
create new object form
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!is_array($argv)) $options
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ 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 3328 of file class.ilContainerGUI.php.

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

Referenced by performPasteIntoMultipleObjectsObject().

3329  {
3330  global $tree;
3331  global $ilias;
3332 
3333  // clone the source node
3334  $srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
3335  error_log(__METHOD__.' cloning srcRef='.$srcRef.' dstRef='.$dstRef.'...');
3336  $newRef = $srcObj->cloneObject($dstRef)->getRefId();
3337  error_log(__METHOD__.' ...cloning... newRef='.$newRef.'...');
3338 
3339  // We must immediately apply a new name to the object, to
3340  // prevent confusion of WebDAV clients about having two objects with identical
3341  // name in the repository.
3342  if (! is_null($newName))
3343  {
3344  $newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
3345  $newObj->setTitle($newName);
3346  $newObj->update();
3347  unset($newObj);
3348  }
3349  unset($srcObj);
3350  $mapping[$newRef] = $srcRef;
3351 
3352  // clone all children of the source node
3353  $children = $tree->getChilds($srcRef);
3354  foreach ($tree->getChilds($srcRef) as $child)
3355  {
3356  // Don't clone role folders, because it does not make sense to clone local roles
3357  // FIXME - Maybe it does make sense (?)
3358  if ($child["type"] != 'rolf')
3359  {
3360  $this->cloneNodes($child["ref_id"],$newRef,$mapping);
3361  }
3362  else
3363  {
3364  if (count($rolf = $tree->getChildsByType($newRef,"rolf")))
3365  {
3366  $mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
3367  }
3368  }
3369  }
3370  error_log(__METHOD__.' ...cloned srcRef='.$srcRef.' dstRef='.$dstRef.' newRef='.$newRef);
3371  return $newRef;
3372  }
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.
+ Here is the caller graph for this function:

◆ cloneWizardPageListObject()

ilContainerGUI::cloneWizardPageListObject ( )

public

Parameters

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

References cloneWizardPageObject().

3114  {
3115  $this->cloneWizardPageObject(false);
3116  }
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 3124 of file class.ilContainerGUI.php.

References $_REQUEST, $_SESSION, ilObjectGUI\$tree, ilCopyWizardPageFactory\_getInstanceByType(), ilObjectGUI\createObject(), ilUtil\getImagePath(), and ilUtil\sendFailure().

Referenced by cloneWizardPageListObject(), and cloneWizardPageTreeObject().

3125  {
3126  include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
3127 
3128  global $ilObjDataCache,$tree;
3129 
3130  if(!$_REQUEST['clone_source'])
3131  {
3132  ilUtil::sendFailure($this->lng->txt('select_one'));
3133  if(isset($_SESSION['wizard_search_title']))
3134  {
3135  $this->searchCloneSourceObject();
3136  }
3137  else
3138  {
3139  $this->createObject();
3140  }
3141  return false;
3142  }
3143  $source_id = $_REQUEST['clone_source'];
3144  $new_type = $_REQUEST['new_type'];
3145  $this->ctrl->setParameter($this,'clone_source',(int) $_REQUEST['clone_source']);
3146  $this->ctrl->setParameter($this,'new_type',$new_type);
3147 
3148 
3149  // Generell JavaScript
3150  $this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
3151  $this->tpl->setVariable('BODY_ATTRIBUTES','onload="ilDisableChilds(\'cmd\');"');
3152 
3153 
3154  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.container_wizard_page.html',
3155  "Services/Container");
3156  $this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
3157  $this->tpl->setVariable('TYPE_IMG',ilUtil::getImagePath('icon_'.$new_type.'.png'));
3158  $this->tpl->setVariable('ALT_IMG',$this->lng->txt('obj_'.$new_type));
3159  $this->tpl->setVariable('TXT_DUPLICATE',$this->lng->txt($new_type.'_wizard_page'));
3160  $this->tpl->setVariable('INFO_DUPLICATE',$this->lng->txt($new_type.'_copy_threads_info'));
3161  $this->tpl->setVariable('BTN_COPY',$this->lng->txt('obj_'.$new_type.'_duplicate'));
3162  $this->tpl->setVariable('BTN_BACK',$this->lng->txt('btn_back'));
3163  if(isset($_SESSION['wizard_search_title']))
3164  {
3165  $this->tpl->setVariable('CMD_BACK','searchCloneSource');
3166  }
3167  else
3168  {
3169  $this->tpl->setVariable('CMD_BACK','create');
3170  }
3171 
3172  $this->tpl->setVariable('BTN_TREE',$this->lng->txt('treeview'));
3173  $this->tpl->setVariable('BTN_LIST',$this->lng->txt('flatview'));
3174 
3175  // Fill item rows
3176  // tree view
3177  if($a_tree_view)
3178  {
3179  $first = true;
3180  $has_items = false;
3181  foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),true) as $node)
3182  {
3183  if($first == true)
3184  {
3185  $first = false;
3186  continue;
3187  }
3188 
3189  if($node['type'] == 'rolf')
3190  {
3191  continue;
3192  }
3193 
3194  $has_items = true;
3195 
3196  for($i = $source_node['depth'];$i < $node['depth']; $i++)
3197  {
3198  $this->tpl->touchBlock('padding');
3199  $this->tpl->touchBlock('end_padding');
3200  }
3201  // fill options
3202  $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$node['type']);
3203  $copy_wizard_page->fillTreeSelection($node['ref_id'],$node['type'],$node['depth']);
3204 
3205  $this->tpl->setCurrentBlock('tree_row');
3206  $this->tpl->setVariable('TREE_IMG',ilUtil::getImagePath('icon_'.$node['type'].'_s.png'));
3207  $this->tpl->setVariable('TREE_ALT_IMG',$this->lng->txt('obj_'.$node['type']));
3208  $this->tpl->setVariable('TREE_TITLE',$node['title']);
3209  $this->tpl->parseCurrentBlock();
3210  }
3211  if(!$has_items)
3212  {
3213  $this->tpl->setCurrentBlock('no_content');
3214  $this->tpl->setVariable('TXT_NO_CONTENT',$this->lng->txt('container_no_items'));
3215  $this->tpl->parseCurrentBlock();
3216  }
3217  else
3218  {
3219  $this->tpl->setCurrentBlock('tree_footer');
3220  $this->tpl->setVariable('TXT_COPY_ALL',$this->lng->txt('copy_all'));
3221  $this->tpl->setVariable('TXT_LINK_ALL',$this->lng->txt('link_all'));
3222  $this->tpl->setVariable('TXT_OMIT_ALL',$this->lng->txt('omit_all'));
3223  $this->tpl->parseCurrentBlock();
3224 
3225  }
3226  }
3227  else
3228  {
3229  foreach($tree->getSubTreeTypes($source_id,array('rolf','crs')) as $type)
3230  {
3231  $copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$type);
3232  if(strlen($html = $copy_wizard_page->getWizardPageBlockHTML()))
3233  {
3234  $this->tpl->setCurrentBlock('obj_row');
3235  $this->tpl->setVariable('ITEM_BLOCK',$html);
3236  $this->tpl->parseCurrentBlock();
3237  }
3238  }
3239  }
3240  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by 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.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneWizardPageTreeObject()

ilContainerGUI::cloneWizardPageTreeObject ( )

public

Parameters

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

References cloneWizardPageObject().

3102  {
3103  $this->cloneWizardPageObject(true);
3104  }
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 3902 of file class.ilContainerGUI.php.

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

3903  {
3904  global $lng;
3905  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3906 
3907  if(!isset($_POST["trash_id"]))
3908  {
3909  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3910  $this->ctrl->redirect($this, "trash");
3911  }
3912 
3913  $ru = new ilRepUtilGUI($this);
3914  $ru->confirmRemoveFromSystemObject($_POST["trash_id"]);
3915  }
$_POST['username']
Definition: cron.php:12
Repository GUI Utilities.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ copyFile()

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

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

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

1876  {
1877  $newFilename = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1878 
1879  // copy to temporary directory
1880  $oldFilename = ilObjFile::_lookupAbsolutePath($obj_id);
1881  if (!copy($oldFilename, $newFilename))
1882  throw new ilFileException("Could not copy ".$oldFilename." to ".$newFilename);
1883 
1884  touch($newFilename, filectime($oldFilename));
1885  }
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
Class to report exception.
static _lookupAbsolutePath($obj_id, $a_version=null)
return absolute path for version
+ 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 1657 of file class.ilContainerGUI.php.

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$objDefinition, ilObjectGUI\$ref_id, ilObjectGUI\getTitlesByRefId(), initAndDisplayCopyIntoMultipleObjectsObject(), and ilUtil\sendInfo().

1658  {
1659  global $rbacsystem, $ilCtrl, $objDefinition;
1660 
1661  if ($_GET["item_ref_id"] != "")
1662  {
1663  $_POST["id"] = array($_GET["item_ref_id"]);
1664  }
1665 
1666  if (!isset($_POST["id"]))
1667  {
1668  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1669  }
1670 
1671  // FOR ALL OBJECTS THAT SHOULD BE COPIED
1672  $containers = 0;
1673  foreach ($_POST["id"] as $ref_id)
1674  {
1675  // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1676  $node_data = $this->tree->getNodeData($ref_id);
1677 
1678  // count containers
1679  if ($objDefinition->isContainer($node_data["type"]))
1680  {
1681  $containers++;
1682  }
1683 
1684  $subtree_nodes = $this->tree->getSubTree($node_data);
1685 
1686  $all_node_data[] = $node_data;
1687  $all_subtree_nodes[] = $subtree_nodes;
1688 
1689  // CHECK COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1690  foreach ($subtree_nodes as $node)
1691  {
1692  if($node['type'] == 'rolf')
1693  {
1694  continue;
1695  }
1696 
1697  if (!$rbacsystem->checkAccess('visible,read,copy',$node["ref_id"]))
1698  {
1699  $no_copy[] = $node["ref_id"];
1700  }
1701  }
1702  }
1703 
1704  if ($containers > 0 && count($_POST["id"]) > 1)
1705  {
1706  $this->ilias->raiseError($this->lng->txt("cntr_container_only_on_their_own"), $this->ilias->error_obj->MESSAGE);
1707  }
1708 
1709  // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1710  if (count($no_copy))
1711  {
1712  $this->ilias->raiseError(
1713  $this->lng->txt("msg_no_perm_copy") . " " . implode(',',$this->getTitlesByRefId($no_copy)),
1714  $this->ilias->error_obj->MESSAGE);
1715  }
1716 
1717  // if we have a single container, set it as source id and redirect to ilObjectCopyGUI
1718  if (count($_POST["id"]) == 1)
1719  {
1720  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $_POST["id"][0]);
1721  $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1722  }
1723  else
1724  {
1725  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($_POST["id"],"_"));
1726  $ilCtrl->redirectByClass("ilobjectcopygui", "initTargetSelection");
1727  }
1728 
1729  $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1730  $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1731  $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1732 
1733  ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"), true);
1734 
1736  } // END COPY
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
getTitlesByRefId($a_ref_ids)
get Titles of objects this method is used for error messages in methods cut/copy/paste ...
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ createStyleObject()

ilContainerGUI::createStyleObject ( )

Create Style.

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

References $ilCtrl.

3536  {
3537  global $ilCtrl;
3538 
3539  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
3540  }
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 1595 of file class.ilContainerGUI.php.

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$ref_id, ilObjectGUI\getTitlesByRefId(), initAndDisplayMoveIntoObjectObject(), and ilUtil\sendInfo().

1596  {
1597  global $rbacsystem, $ilCtrl;
1598 
1599  if ($_GET["item_ref_id"] != "")
1600  {
1601  $_POST["id"] = array($_GET["item_ref_id"]);
1602  }
1603 
1604  //$this->ilias->raiseError("move operation does not work at the moment and is disabled",$this->ilias->error_obj->MESSAGE);
1605 
1606  if (!isset($_POST["id"]))
1607  {
1608  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1609  }
1610 
1611  // FOR ALL OBJECTS THAT SHOULD BE COPIED
1612  foreach ($_POST["id"] as $ref_id)
1613  {
1614  // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
1615  $node_data = $this->tree->getNodeData($ref_id);
1616  $subtree_nodes = $this->tree->getSubTree($node_data);
1617 
1618  $all_node_data[] = $node_data;
1619  $all_subtree_nodes[] = $subtree_nodes;
1620 
1621  // CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
1622  foreach ($subtree_nodes as $node)
1623  {
1624  if($node['type'] == 'rolf')
1625  {
1626  continue;
1627  }
1628 
1629  if (!$rbacsystem->checkAccess('delete',$node["ref_id"]))
1630  {
1631  $no_cut[] = $node["ref_id"];
1632  }
1633  }
1634  }
1635  // IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
1636  if (count($no_cut))
1637  {
1638  $this->ilias->raiseError($this->lng->txt("msg_no_perm_cut")." ".implode(',',$this->getTitlesByRefId($no_cut)),
1639  $this->ilias->error_obj->MESSAGE);
1640  }
1641  $_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
1642  $_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
1643  $_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
1644 
1645  ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"),true);
1646 
1647  return $this->initAndDisplayMoveIntoObjectObject();
1648  } // END CUT
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
getTitlesByRefId($a_ref_ids)
get Titles of objects this method is used for error messages in methods cut/copy/paste ...
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ deleteStyleObject()

ilContainerGUI::deleteStyleObject ( )

Delete Style.

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

References $ilCtrl.

3556  {
3557  global $ilCtrl;
3558 
3559  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
3560  }
global $ilCtrl
Definition: ilias.php:18

◆ disableAdministrationPanelObject()

ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

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

References $_SESSION.

Referenced by clearObject().

1479  {
1480  $_SESSION["il_cont_admin_panel"] = false;
1481  $this->ctrl->redirect($this, "render");
1482  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

◆ downloadMultipleObjects()

ilContainerGUI::downloadMultipleObjects (   $a_ref_ids)
private

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

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

Referenced by downloadObject().

1791  {
1792  global $lng, $rbacsystem, $ilAccess;
1793 
1794  include_once "./Services/Utilities/classes/class.ilUtil.php";
1795  include_once 'Modules/Folder/classes/class.ilObjFolder.php';
1796  include_once 'Modules/File/classes/class.ilObjFile.php';
1797  include_once 'Modules/File/classes/class.ilFileException.php';
1798 
1799  // create temporary file to download
1800  $zip = PATH_TO_ZIP;
1801  $tmpdir = ilUtil::ilTempnam();
1802  ilUtil::makeDir($tmpdir);
1803 
1804  try
1805  {
1806  // copy each selected object
1807  foreach ($a_ref_ids as $ref_id)
1808  {
1809  if (!$ilAccess->checkAccess("read", "", $ref_id))
1810  continue;
1811 
1812  if (ilObject::_isInTrash($ref_id))
1813  continue;
1814 
1815  // get object
1816  $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1817  $obj_type = $object->getType();
1818  if ($obj_type == "fold")
1819  {
1820  // copy folder to temp directory
1821  self::recurseFolder($ref_id, $object->getTitle(), $tmpdir);
1822  }
1823  else if ($obj_type == "file")
1824  {
1825  // copy file to temp directory
1826  self::copyFile($object->getId(), $object->getTitle(), $tmpdir);
1827  }
1828  }
1829 
1830  // compress the folder
1831  $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) . ".zip";
1832  $tmpzipfile = ilUtil::ilTempnam() . ".zip";
1833  ilUtil::zip($tmpdir, $tmpzipfile, true);
1834  ilUtil::delDir($tmpdir);
1835  ilUtil::deliverFile($tmpzipfile, $deliverFilename, '', false, true, true);
1836  }
1837  catch (ilFileException $e)
1838  {
1839  ilUtil::sendInfo($e->getMessage(), true);
1840  }
1841  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class to report exception.
redirection script todo: (a better solution should control the processing via a xml file) ...
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
_isInTrash($a_ref_id)
checks wether object is in trash
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static ilTempnam()
Create a temporary file in an ILIAS writable directory.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ downloadObject()

ilContainerGUI::downloadObject ( )

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

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$object, ilObjectGUI\$ref_id, and downloadMultipleObjects().

1739  {
1740  global $rbacsystem, $ilCtrl;
1741 
1742  if ($_GET["item_ref_id"] != "")
1743  {
1744  $_POST["id"] = array($_GET["item_ref_id"]);
1745  }
1746 
1747  if (!isset($_POST["id"]))
1748  {
1749  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1750  }
1751 
1752  // FOR ALL OBJECTS THAT SHOULD BE DOWNLOADED
1753  foreach ($_POST["id"] as $ref_id)
1754  {
1755  $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1756  $obj_type = $object->getType();
1757  if (!in_array($obj_type, array("fold", "file")))
1758  {
1759  $no_download[] = $object->getType();
1760  }
1761  else if (!$rbacsystem->checkAccess('read', $ref_id))
1762  {
1763  $no_perm[] = $ref_id;
1764  }
1765  }
1766 
1767  // IF THERE IS ANY OBJECT THAT CANNOT BE DOWNLOADED
1768  if (count($no_download))
1769  {
1770  $no_download = array_unique($no_download);
1771  foreach ($no_download as $type)
1772  {
1773  $txt_objs[] = $this->lng->txt("objs_".$type);
1774  }
1775  $this->ilias->raiseError(implode(', ',$txt_objs)." ".$this->lng->txt("msg_obj_no_download"),$this->ilias->error_obj->MESSAGE);
1776  }
1777 
1778  // NO ACCESS
1779  if (count($no_perm))
1780  {
1781  $this->ilias->raiseError(
1782  $this->lng->txt("msg_obj_perm_download")." ".implode(',',$no_perm),
1783  $this->ilias->error_obj->MESSAGE);
1784  }
1785 
1786  // download the objects
1787  $this->downloadMultipleObjects($_POST["id"]);
1788  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
downloadMultipleObjects($a_ref_ids)
+ Here is the call graph for this function:

◆ editOrderObject()

ilContainerGUI::editOrderObject ( )

Edit order.

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

References $_SESSION, and renderObject().

1488  {
1489  global $ilTabs;
1490 
1491  $this->edit_order = true;
1492  $_SESSION["il_cont_admin_panel"] = false;
1493  $this->renderObject();
1494 
1495  $ilTabs->activateSubTab("ordering");
1496  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
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 818 of file class.ilContainerGUI.php.

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

819  {
820  global $rbacsystem, $tpl, $lng, $ilCtrl;
821 
822  if (!$rbacsystem->checkAccess("write", $this->ref_id))
823  {
824  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
825  }
826 
827  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
828  "xhtml_page");
829  if ($xpage_id > 0)
830  {
831  include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
832  $xpage = new ilXHTMLPage($xpage_id);
833  $content = $xpage->getContent();
834  }
835 
836  // get template
837  $tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.container_edit_page_content.html",
838  "Services/Container");
839  $tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
840  $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
841  $tpl->setVariable("TXT_EDIT_PAGE_CONTENT",
842  $this->lng->txt("edit_page_content"));
843  $tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
844  $tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
845  $tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
846  $tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
847  $tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert_s.png"));
848  $tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
849  $tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
850 
851  include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
852  include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
853  //$ta = new ilTextAreaInputGUI();
854  //$tags = $ta->getRteTagSet("extended_table_img");
855 
856  // add rte support
857  include_once "./Services/RTE/classes/class.ilRTE.php";
858  $rtestring = ilRTE::_getRTEClassname();
859  include_once "./Services/RTE/classes/class.$rtestring.php";
860  $rte = new $rtestring();
861  //$rte->addPlugin("latex");
862  include_once "./Services/Object/classes/class.ilObject.php";
864  $obj_type = ilObject::_lookupType($_GET["ref_id"], TRUE);
865  $rte->addRTESupport($obj_id, $obj_type);
866  //$rte->setStyleSelect(true);
867  //$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
868  }
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)
redirection script todo: (a better solution should control the processing via a xml file) ...
static _lookupType($a_id, $a_reference=false)
lookup object type
XHTML Page class.
_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 783 of file class.ilContainerGUI.php.

References $_SESSION, ilContainer\_lookupContainerSetting(), and exit.

784  {
785  include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
786  $fs_gui = new ilFramesetGUI();
787 
788  $fs_gui->setFramesetTitle($this->object->getTitle());
789  $fs_gui->setMainFrameName("content");
790  $fs_gui->setSideFrameName("tree");
791 
792  // old tiny stuff
793  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
794  "xhtml_page");
795  if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std")
796  {
797  $fs_gui->setMainFrameSource(
798  $this->ctrl->getLinkTarget(
799  $this, "editPageContent"));
800  $fs_gui->setSideFrameSource(
801  $this->ctrl->getLinkTarget($this, "showLinkList"));
802  }
803  else
804  {
805  $this->ctrl->redirectByClass(array("ilcontainerpagegui"), "edit");
806  exit;
807  }
808 
809  $fs_gui->show();
810  exit;
811  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
exit
Definition: login.php:54
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
Class ilFramesetGUI.
+ Here is the call graph for this function:

◆ editStyleObject()

ilContainerGUI::editStyleObject ( )

Edit Style.

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

References $ilCtrl.

3546  {
3547  global $ilCtrl;
3548 
3549  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
3550  }
global $ilCtrl
Definition: ilias.php:18

◆ editStylePropertiesObject()

ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

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

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

3419  {
3420  global $ilTabs, $tpl;
3421 
3422  $this->checkPermission("write");
3423 
3424  $this->initStylePropertiesForm();
3425  $tpl->setContent($this->form->getHTML());
3426 
3427  $ilTabs->activateTab("obj_sty");
3428  }
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 1469 of file class.ilContainerGUI.php.

References $_SESSION.

1470  {
1471  $_SESSION["il_cont_admin_panel"] = true;
1472  $this->ctrl->redirect($this, "render");
1473  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ enableMultiDownloadObject()

ilContainerGUI::enableMultiDownloadObject ( )

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

References renderObject().

1546  {
1547  $this->multi_download_enabled = true;
1548  $this->renderObject();
1549  }
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 50 of file class.ilContainerGUI.php.

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

51  {
52  global $tpl;
53 
54  $next_class = $this->ctrl->getNextClass();
55  $cmd = $this->ctrl->getCmd("render");
56 
57  switch($next_class)
58  {
59  // page editing
60  case "ilcontainerpagegui":
61  if ($_GET["redirectSource"] != "ilinternallinkgui")
62  {
63  $ret = $this->forwardToPageObject();
64  $tpl->setContent($ret);
65  }
66  else
67  {
68  return "";
69  }
70  break;
71 
72  case "ilobjstylesheetgui":
73  $this->forwardToStyleSheet();
74  break;
75 
76  default:
77  $this->prepareOutput();
78  $cmd .= "Object";
79  $this->$cmd();
80  break;
81  }
82  return true;
83  }
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
prepareOutput()
prepare output
+ Here is the call graph for this function:

◆ fileManagerLaunchObject()

ilContainerGUI::fileManagerLaunchObject ( )
protected

Launch jnlp.

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

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

3786  {
3787  global $ilUser;
3788 
3789  $tpl = new ilTemplate('tpl.fm_launch_ws.html',false,false,'Services/WebServices/FileManager');
3790  $tpl->setVariable('JNLP_URL',ILIAS_HTTP_PATH.'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3791  $tpl->setVariable('SESSION_ID', $_COOKIE['PHPSESSID'].'::'.CLIENT_ID);
3792  $tpl->setVariable('UID',$ilUser->getId());
3793  $tpl->setVariable('REF_ID', $this->object->getRefId());
3794  $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH.'/webservice/soap/server.php?wsdl');
3795  $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
3796  $tpl->setVariable('REST_URI',ILIAS_HTTP_PATH.'/Services/WebServices/Rest/server.php');
3797  $tpl->setVariable('FILE_LOCKS',0);
3798  $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
3799 
3800  include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3801  $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3802  $tpl->setVariable('HEADER_TITLE',$header_top_title ? $header_top_title : '');
3803  echo $tpl->get();
3804  exit;
3805  }
exit
Definition: login.php:54
$_COOKIE["ilClientId"]
Definition: cron.php:11
special template class to simplify handling of ITX/PEAR
static getInstance()
Get singleton instance.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ forwardToPageObject()

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

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

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

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

170  {
171  global $lng, $ilTabs, $ilCtrl;
172 
173  $cmd = $ilCtrl->getCmd();
174 
175  if (in_array($cmd, array("displayMediaFullscreen", "downloadFile")))
176  {
177  $this->checkPermission("read");
178  }
179  else
180  {
181  $this->checkPermission("write");
182  }
183 
184  $ilTabs->clearTargets();
185 
186  if ($_GET["redirectSource"] == "ilinternallinkgui")
187  {
188  exit;
189  }
190 
191  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
192  "xhtml_page");
193  if ($xpage_id > 0)
194  {
195  $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
196  $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
197  }
198  else
199  {
200  $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
201  $this->object->getRefId(), "_top");
202  }
203 
204  // page object
205  include_once("./Services/Container/classes/class.ilContainerPage.php");
206  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
207 
208  $lng->loadLanguageModule("content");
209 
210  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
211  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
212  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
213  $this->tpl->setCurrentBlock("SyntaxStyle");
214  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
216  $this->tpl->parseCurrentBlock();
217 
218  if (!ilContainerPage::_exists("cont",
219  $this->object->getId()))
220  {
221  // doesn't exist -> create new one
222  $new_page_object = new ilContainerPage();
223  $new_page_object->setParentId($this->object->getId());
224  $new_page_object->setId($this->object->getId());
225  $new_page_object->createFromXML();
226  }
227 
228  // get page object
229  $this->ctrl->setReturnByClass("ilcontainerpagegui", "edit");
230  $page_gui = new ilContainerPageGUI($this->object->getId());
231  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
232  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
233  $this->object->getStyleSheetId(), $this->object->getType()));
234 
235  $page_gui->setTemplateTargetVar("ADM_CONTENT");
236  $page_gui->setLinkXML($link_xml);
237  $page_gui->setFileDownloadLink("");
238  $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
239  //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
240  $page_gui->setPresentationTitle("");
241  $page_gui->setTemplateOutput(false);
242 
243  // old editor information text
244  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
245  "xhtml_page");
246  if ($xpage_id > 0)
247  {
248  $wtpl = new ilTemplate("tpl.cntr_old_editor_message.html", true,
249  true, "Services/Container");
250  $wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
251  $wtpl->setVariable("IMG_WARNING",
252  ilUtil::getImagePath("icon_alert_s.png"));
253  $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
254  $wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
255  $wtpl->setVariable("HREF_SWITCH_TO_NEW_EDITOR",
256  $ilCtrl->getLinkTarget($this, "useNewEditor"));
257  $wtpl->setVariable("TXT_MIGRATION_SWITCH",
258  $lng->txt("cntr_switch_to_new_editor_cmd"));
259  $page_gui->setPrependingHtml($wtpl->get());
260  }
261 
262  // style tab
263  $page_gui->setTabHook($this, "addPageTabs");
264 
265  $ret =& $this->ctrl->forwardCommand($page_gui);
266 
267  //$ret =& $page_gui->executeCommand();
268  return $ret;
269  }
exit
Definition: login.php:54
Container page GUI class.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
getSyntaxStylePath()
get syntax style path
global $ilCtrl
Definition: ilias.php:18
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
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.
getContentStylePath($a_style_id)
get content style path
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ 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 132 of file class.ilContainerGUI.php.

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

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

133  {
134  global $ilCtrl, $ilTabs;
135 
136  $ilTabs->clearTargets();
137 
138  $cmd = $ilCtrl->getCmd();
139  include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
140  $this->ctrl->setReturn($this, "editStyleProperties");
141  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
142  $style_gui->omitLocator();
143  if ($cmd == "create" || $_GET["new_type"]=="sty")
144  {
145  $style_gui->setCreationMode(true);
146  }
147 
148  if ($cmd == "confirmedDelete")
149  {
150  $this->object->setStyleSheetId(0);
151  $this->object->update();
152  }
153 
154  $ret = $this->ctrl->forwardCommand($style_gui);
155 
156  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
157  {
158  $style_id = $ret;
159  $this->object->setStyleSheetId($style_id);
160  $this->object->update();
161  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
162  }
163  }
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
omitLocator($a_omit=true)
Class ilObjStyleSheetGUI.
+ 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 3584 of file class.ilContainerGUI.php.

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

3585  {
3586  global $ilCtrl;
3587 
3588  $ref_id = $_GET["cmdrefid"];
3590  $type = ilObject::_lookupType($obj_id);
3591 
3592  // this should be done via container-object->getSubItem in the future
3593  $data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
3594  "type" => $type);
3595  include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
3596  $item_list_gui = ilObjectListGUIFactory::_getListGUIByType($type);
3597  $item_list_gui->setContainerObject($this);
3598 
3599  $item_list_gui->enableComments(true);
3600  $item_list_gui->enableNotes(true);
3601  $item_list_gui->enableTags(true);
3602 
3603  $this->modifyItemGUI($item_list_gui, $data, false);
3604  $html = $item_list_gui->getListItemHTML($ref_id,
3605  $obj_id, "", "", true, true);
3606 
3607  // include plugin slot for async item list
3608  global $ilPluginAdmin;
3609  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
3610  foreach ($pl_names as $pl)
3611  {
3612  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
3613  $gui_class = $ui_plugin->getUIClassInstance();
3614  $resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
3615  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
3616  {
3617  $html = $gui_class->modifyHTML($html, $resp);
3618  }
3619  }
3620 
3621  echo $html;
3622  exit;
3623  }
exit
Definition: login.php:54
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
modifyItemGUI(&$a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container.
static _lookupObjId($a_id)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static _lookupType($a_id, $a_reference=false)
lookup object type
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ getContainerPageHTML()

ilContainerGUI::getContainerPageHTML ( )

Get container page HTML.

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

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

Referenced by renderItemList().

286  {
287  global $ilSetting, $ilUser;
288 
289  if (!$ilSetting->get("enable_cat_page_edit"))
290  {
291  return;
292  }
293 
294  // old page editor content
295  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
296  "xhtml_page");
297  if ($xpage_id > 0)
298  {
299  include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
300  $xpage = new ilXHTMLPage($xpage_id);
301  return $xpage->getContent();
302  }
303 
304 
305  // page object
306 
307 
308  // if page does not exist, return nothing
309  include_once("./Services/COPage/classes/class.ilPageUtil.php");
310  if (!ilPageUtil::_existsAndNotEmpty("cont",
311  $this->object->getId()))
312  {
313  return "";
314  }
315  include_once("./Services/Container/classes/class.ilContainerPage.php");
316  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
317 
318  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
319  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
320  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
321  $this->tpl->setCurrentBlock("SyntaxStyle");
322  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
324  $this->tpl->parseCurrentBlock();
325 
326  // get page object
327  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
328  $ot = ilObjectTranslation::getInstance($this->object->getId());
329  $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
330  $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
331  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
332  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
333  $this->object->getStyleSheetId(), $this->object->getType()));
334 
335  $page_gui->setPresentationTitle("");
336  $page_gui->setTemplateOutput(false);
337  $page_gui->setHeader("");
338  $ret = $page_gui->showPage();
339 
340  //$ret =& $page_gui->executeCommand();
341  return $ret;
342  }
Container page GUI class.
getSyntaxStylePath()
get syntax style path
_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.
XHTML Page class.
global $ilUser
Definition: imgupload.php:15
getContentStylePath($a_style_id)
get content style path
global $ilSetting
Definition: privfeed.php:40
static getInstance($a_obj_id)
Get instance.
_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:

◆ getContentGUI()

ilContainerGUI::getContentGUI ( )

Get content gui object.

Parameters

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

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

Referenced by redrawListItemObject(), and renderObject().

436  {
437  switch ($this->object->getViewMode())
438  {
439  // all items in one block
441  include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
442  $container_view = new ilContainerSimpleContentGUI($this);
443  break;
444 
446  include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
447  $container_view = new ilContainerObjectiveGUI($this);
448  break;
449 
450  // all items in one block
452  case IL_CRS_VIEW_TIMING: // not nice this workaround
453  include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
454  $container_view = new ilContainerSessionsContentGUI($this);
455  break;
456 
457  // ILinc courses
459  include_once 'Services/Container/classes/class.ilContainerILincContentGUI.php';
460  $container_view = new ilContainerILincContentGUI($this);
461  break;
462 
463  // all items in one block
465  default:
466  include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
467  $container_view = new ilContainerByTypeContentGUI($this);
468  break;
469  }
470 
471  return $container_view;
472  }
Shows all items grouped by type.
const IL_CRS_VIEW_TIMING
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 90 of file class.ilContainerGUI.php.

91  {
92  $values = parent::getEditFormValues();
93 
94  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
95  $values['didactic_type'] =
96  'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
97 
98  return $values;
99  }

◆ getTabs()

ilContainerGUI::getTabs ( $tabs_gui)

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

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

References $_GET, $_SESSION, and $ilCtrl.

1437  {
1438  global $rbacsystem, $ilCtrl;
1439 
1440  // edit permissions
1441  if ($rbacsystem->checkAccess('edit_permission',$this->ref_id))
1442  {
1443  $tabs_gui->addTarget("perm_settings",
1444  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1445  array("perm","info","owner"), 'ilpermissiongui');
1446  if ($ilCtrl->getNextClass() == "ilpermissiongui")
1447  {
1448  $tabs_gui->activateTab("perm_settings");
1449  }
1450  }
1451 
1452  // show clipboard
1453  if (strtolower($_GET["baseClass"]) == "ilrepositorygui" && !empty($_SESSION["clipboard"]))
1454  {
1455  $tabs_gui->addTarget("clipboard",
1456  $this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
1457  }
1458 
1459  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ ilContainerGUI()

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

Constructor public.

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

References ilObjectGUI\$lng, ilObjectGUI\$tree, and ilObjectGUI\ilObjectGUI().

Referenced by ilObjGroupGUI\__construct(), ilObjCategoryGUI\ilObjCategoryGUI(), ilObjCourseGUI\ilObjCourseGUI(), ilObjiLincCourseGUI\ilObjiLincCourseGUI(), and ilObjRootFolderGUI\ilObjRootFolderGUI().

29  {
30  global $rbacsystem, $lng, $tree;
31 
32  $this->rbacsystem =& $rbacsystem;
33 
34  $lng->loadLanguageModule("cntr");
35 
36  //$this->ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
37 
38  // Activate tree cache when rendering the container to improve performance
39  //$tree->useCache(false);
40 
41  // prepare output things should generally be made in executeCommand
42  // method (maybe dependent on current class/command
43  $this->ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
44  }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayCopyIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayCopyIntoMultipleObjectsObject ( )

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

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

Referenced by copyObject().

2390  {
2391  global $tree;
2392 
2393  // empty session on init
2394  $_SESSION['paste_copy_repexpand'] = array();
2395 
2396  // copy opend nodes from repository explorer
2397  $_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2398 
2399  // open current position
2400  $path = $tree->getPathId((int)$_GET['ref_id']);
2401  foreach((array)$path as $node_id)
2402  {
2403  if(!in_array($node_id, $_SESSION['paste_copy_repexpand']))
2404  $_SESSION['paste_copy_repexpand'][] = $node_id;
2405  }
2406 
2407  return $this->showPasteTreeObject();
2408  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
showPasteTreeObject()
Show paste tree.
$path
Definition: index.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayLinkIntoMultipleObjectsObject()

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

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

Referenced by linkObject().

2242  {
2243  global $tree;
2244 
2245  // empty session on init
2246  $_SESSION['paste_linked_repexpand'] = array();
2247 
2248  // copy opend nodes from repository explorer
2249  $_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2250 
2251  // open current position
2252  $path = $tree->getPathId((int)$_GET['ref_id']);
2253  foreach((array)$path as $node_id)
2254  {
2255  if(!in_array($node_id, $_SESSION['paste_linked_repexpand']))
2256  $_SESSION['paste_linked_repexpand'][] = $node_id;
2257  }
2258 
2259  return $this->showPasteTreeObject();
2260  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
showPasteTreeObject()
Show paste tree.
$path
Definition: index.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAndDisplayMoveIntoObjectObject()

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

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

Referenced by cutObject().

2459  {
2460  global $tree;
2461 
2462  // empty session on init
2463  $_SESSION['paste_cut_repexpand'] = array();
2464 
2465  // copy opend nodes from repository explorer
2466  $_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
2467 
2468  // open current position
2469  $path = $tree->getPathId((int)$_GET['ref_id']);
2470  foreach((array)$path as $node_id)
2471  {
2472  if(!in_array($node_id, $_SESSION['paste_cut_repexpand']))
2473  $_SESSION['paste_cut_repexpand'][] = $node_id;
2474  }
2475 
2476  return $this->showPasteTreeObject();
2477  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
showPasteTreeObject()
Show paste tree.
$path
Definition: index.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormPasswordInstruction()

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

Returns

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

References ilFormPropertyGUI\setRequired().

Referenced by savePasswordObject(), and showPasswordInstructionObject().

3657  {
3658  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3659  $this->form = new ilPropertyFormGUI();
3660  $this->form->setFormAction($this->ctrl->getFormAction($this));
3661 
3662  // new password
3663  $ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
3664  $ipass->setRequired(true);
3665 
3666  $this->form->addItem($ipass);
3667  $this->form->addCommandButton("savePassword", $this->lng->txt("save"));
3668  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
3669 
3670  $this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
3671  $this->form->setFormAction($this->ctrl->getFormAction($this));
3672 
3673  return $this->form;
3674  }
This class represents a property form user interface.
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 3765 of file class.ilContainerGUI.php.

References ilFMSettings\getInstance().

3766  {
3767  $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3768 
3769  // begin-patch fm
3770  include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3771  if(ilFMSettings::getInstance()->isEnabled())
3772  {
3773  if($lg instanceof ilObjectListGUI)
3774  {
3775  $lg->addCustomCommand($this->ctrl->getLinkTarget($this,'fileManagerLaunch'), 'fm_start','_blank');
3776  }
3777  }
3778  // end-patch fm
3779  return $lg;
3780  }
Class ilObjectListGUI.
static getInstance()
Get singleton instance.
+ Here is the call graph for this function:

◆ initStylePropertiesForm()

ilContainerGUI::initStylePropertiesForm ( )

Init style properties form.

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

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, 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().

3434  {
3435  global $ilCtrl, $lng, $ilTabs, $ilSetting, $tpl;
3436 
3437  $tpl->setTreeFlatIcon("", "");
3438  $ilTabs->clearTargets();
3439  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
3440  "xhtml_page");
3441  if ($xpage_id > 0)
3442  {
3443  $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
3444  $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
3445  }
3446  else
3447  {
3448  $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
3449  $this->object->getRefId(), "_top");
3450  }
3451 
3452  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
3453  $page_gui = new ilContainerPageGUI($this->object->getId());
3454  $style_id = $this->object->getStyleSheetId();
3455  if (ilObject::_lookupType($style_id) == "sty")
3456  {
3457  $page_gui->setStyleId($style_id);
3458  }
3459  else
3460  {
3461  $style_id = 0;
3462  }
3463  $page_gui->setTabHook($this, "addPageTabs");
3464 // $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
3465 // $tpl->setTitle($this->lng->txt("page").": ".$this->obj->getTitle());
3466  $ilCtrl->getHTML($page_gui);
3467  $ilTabs->setTabActive("obj_sty");
3468 
3469  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
3470  $lng->loadLanguageModule("style");
3471 
3472  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
3473  $this->form = new ilPropertyFormGUI();
3474 
3475  $fixed_style = $ilSetting->get("fixed_content_style_id");
3476 // $style_id = $this->object->getStyleSheetId();
3477 
3478  if ($fixed_style > 0)
3479  {
3480  $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
3481  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
3482  $this->lng->txt("global_fixed").")");
3483  $this->form->addItem($st);
3484  }
3485  else
3486  {
3487  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
3488  $_GET["ref_id"]);
3489 
3490  $st_styles[0] = $this->lng->txt("default");
3491  ksort($st_styles);
3492 
3493  if ($style_id > 0)
3494  {
3495  // individual style
3496  if (!ilObjStyleSheet::_lookupStandard($style_id))
3497  {
3498  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
3499  $st->setValue(ilObject::_lookupTitle($style_id));
3500  $this->form->addItem($st);
3501 
3502 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
3503 
3504  // delete command
3505  $this->form->addCommandButton("editStyle",
3506  $lng->txt("style_edit_style"));
3507  $this->form->addCommandButton("deleteStyle",
3508  $lng->txt("style_delete_style"));
3509 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
3510  }
3511  }
3512 
3513  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
3514  {
3515  $style_sel = ilUtil::formSelect ($style_id, "style_id",
3516  $st_styles, false, true);
3517  $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
3518  $style_sel->setOptions($st_styles);
3519  $style_sel->setValue($style_id);
3520  $this->form->addItem($style_sel);
3521 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
3522  $this->form->addCommandButton("saveStyleSettings",
3523  $lng->txt("save"));
3524  $this->form->addCommandButton("createStyle",
3525  $lng->txt("sty_create_ind_style"));
3526  }
3527  }
3528  $this->form->setTitle($lng->txt("obj_sty"));
3529  $this->form->setFormAction($ilCtrl->getFormAction($this));
3530  }
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
global $ilCtrl
Definition: ilias.php:18
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.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
setOptions($a_options)
Set Options.
static _lookupType($a_id, $a_reference=false)
lookup object type
_lookupStandard($a_id)
Lookup standard flag.
setStyleId($a_styleid)
Set Style Id.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:40
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
setTabHook($a_object, $a_function)
Set tab hook.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilContainerGUI::isActiveAdministrationPanel ( )

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

References $_SESSION.

Referenced by addStandardContainerSubTabs(), addStandardRow(), renderItemList(), renderObject(), setColumnSettings(), ilObjCourseGUI\setContentSubTabs(), setPageEditorTabs(), and showAdministrationPanel().

3030  {
3031  global $ilAccess;
3032 
3033  // #10081
3034  if($_SESSION["il_cont_admin_panel"] &&
3035  $this->object->getRefId() &&
3036  !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
3037  {
3038  return false;
3039  }
3040 
3041  return $_SESSION["il_cont_admin_panel"];
3042  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

◆ isActiveOrdering()

ilContainerGUI::isActiveOrdering ( )

Check if ordering is enabled.

Returns
bool

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

1503  {
1504  return $this->edit_order ? true : false;
1505  }

◆ isMultiDownloadEnabled()

ilContainerGUI::isMultiDownloadEnabled ( )

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

References $multi_download_enabled.

Referenced by showAdministrationPanel().

1552  {
1554  }
+ Here is the caller graph for this function:

◆ keepObjectsInClipboardObject()

ilContainerGUI::keepObjectsInClipboardObject ( )

Keep objects in the clipboard.

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

References $GLOBALS, and ilUtil\sendSuccess().

2383  {
2384  ilUtil::sendSuccess($this->lng->txt("obj_inserted_clipboard"), true);
2385  $GLOBALS['ilCtrl']->returnToParent($this);
2386  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['ct_recipient']
+ Here is the call 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 1893 of file class.ilContainerGUI.php.

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$object, ilObjectGUI\$ref_id, initAndDisplayLinkIntoMultipleObjectsObject(), and ilUtil\sendInfo().

1894  {
1895  global $clipboard, $rbacsystem, $rbacadmin, $ilCtrl;
1896 
1897  if ($_GET["item_ref_id"] != "")
1898  {
1899  $_POST["id"] = array($_GET["item_ref_id"]);
1900  }
1901 
1902  if (!isset($_POST["id"]))
1903  {
1904  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1905  }
1906 
1907  // CHECK ACCESS
1908  foreach ($_POST["id"] as $ref_id)
1909  {
1910  if (!$rbacsystem->checkAccess('delete',$ref_id))
1911  {
1912  $no_cut[] = $ref_id;
1913  }
1914 
1915  $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1916 
1917  if (!$this->objDefinition->allowLink($object->getType()))
1918  {
1919  $no_link[] = $object->getType();
1920  }
1921  }
1922 
1923  // NO ACCESS
1924  if (count($no_cut))
1925  {
1926  $this->ilias->raiseError($this->lng->txt("msg_no_perm_link")." ".
1927  implode(',',$no_cut),$this->ilias->error_obj->MESSAGE);
1928  }
1929 
1930  if (count($no_link))
1931  {
1932  //#12203
1933  $this->ilias->raiseError($this->lng->txt("msg_obj_no_link"),$this->ilias->error_obj->MESSAGE);
1934 
1935  //$this->ilias->raiseError($this->lng->txt("msg_not_possible_link")." ".
1936  // implode(',',$no_link),$this->ilias->error_obj->MESSAGE);
1937  }
1938 
1939  // WRITE TO CLIPBOARD
1940  $clipboard["parent"] = $_GET["ref_id"];
1941  $clipboard["cmd"] = $ilCtrl->getCmd();
1942 
1943  foreach ($_POST["id"] as $ref_id)
1944  {
1945  $clipboard["ref_ids"][] = $ref_id;
1946  }
1947 
1948  $_SESSION["clipboard"] = $clipboard;
1949 
1950  ilUtil::sendInfo($this->lng->txt("msg_link_clipboard"),true);
1951 
1953 
1954  } // END LINK
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ lockObject()

ilContainerGUI::lockObject ( )

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

References $_GET, $ilUser, $result, ilObjectGUI\$tree, ilDAVServer\_isActionsVisible(), ilDAVServer\_isActive(), renderObject(), and ilUtil\sendInfo().

1558  {
1559  global $tree, $ilUser, $rbacsystem;
1560 
1561  if (!$rbacsystem->checkAccess("write",$_GET['item_ref_id']))
1562  {
1563  $this->ilErr->raiseError($this->lng->txt('err_no_permission'),$this->ilErr->MESSAGE);
1564  }
1565 
1566 
1567  require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
1569  {
1570  require_once 'Services/WebDAV/classes/class.ilDAVLocks.php';
1571  $locks = new ilDAVLocks();
1572 
1573  $result = $locks->lockRef($_GET['item_ref_id'],
1574  $ilUser->getId(), $ilUser->getLogin(),
1575  'ref_'.$_GET['item_ref_id'].'_usr_'.$ilUser->getId(),
1576  time() + /*30*24*60**/60, 0, 'exclusive'
1577  );
1578 
1580  $this->lng->txt(
1581  ($result === true) ? 'object_locked' : $result
1582  ),
1583  true);
1584  }
1585  $this->renderObject();
1586  }
static _isActionsVisible()
Static getter.
$result
renderObject()
render the object
$_GET["client_id"]
static _isActive()
Static getter.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ modifyItemGUI()

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

Modify Item ListGUI for presentation in container.

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

References ilObjectGUI\$lng.

Referenced by getAsynchItemListObject().

3379  {
3380  global $lng;
3381 
3382  if($a_show_path)
3383  {
3384  $a_item_list_gui->addCustomProperty($lng->txt('path'),
3385  ilContainer::buildPath($a_item_data['ref_id'], $this->object->getRefId()),
3386  false, true);
3387  }
3388  }
+ 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 1206 of file class.ilContainerGUI.php.

References ilObjectGUI\$tpl.

Referenced by renderItemList().

1207  {
1208  $tpl = new ilTemplate("tpl.container_list_block.html", true, true,
1209  "Services/Container");
1210  $this->cur_row_type = "row_type_1";
1211  return $tpl;
1212  }
special template class to simplify handling of ITX/PEAR
+ Here is the caller graph for this function:

◆ pasteObject()

ilContainerGUI::pasteObject ( )

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

public

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

References $_GET, $_SESSION, $ilCtrl, $ilUser, ilObjectGUI\$lng, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChangeEvent\_recordWriteEvent(), clearObject(), and ilUtil\sendSuccess().

2535  {
2536  global $rbacsystem, $rbacadmin, $rbacreview, $log,$tree;
2537  global $ilUser, $lng, $ilCtrl;
2538 
2539  // BEGIN ChangeEvent: Record paste event.
2540  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2541  // END ChangeEvent: Record paste event.
2542 
2543 //var_dump($_SESSION["clipboard"]);exit;
2544  if (!in_array($_SESSION["clipboard"]["cmd"],array("cut","link","copy")))
2545  {
2546  $message = get_class($this)."::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2547  $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
2548  }
2549 
2550  // this loop does all checks
2551  foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id)
2552  {
2553  $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
2554 
2555  // CHECK ACCESS
2556  if (!$rbacsystem->checkAccess('create',$this->object->getRefId(), $obj_data->getType()))
2557  {
2558  $no_paste[] = $ref_id;
2559  $no_paste_titles[] = $obj_data->getTitle();
2560  }
2561 
2562  // CHECK IF REFERENCE ALREADY EXISTS
2563  if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
2564  {
2565  $exists[] = $ref_id;
2566  break;
2567  }
2568 
2569  // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
2570  if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
2571  {
2572  $is_child[] = ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id));
2573  }
2574 
2575  if ($ref_id == $this->object->getRefId())
2576  {
2577  $is_child[] = ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id));
2578  }
2579 
2580  // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
2581  $obj_type = $obj_data->getType();
2582 
2583  if (!in_array($obj_type, array_keys($this->objDefinition->getSubObjects($this->object->getType()))))
2584  {
2585  $not_allowed_subobject[] = $obj_data->getType();
2586  }
2587  }
2588 
2590  // process checking results
2591  // BEGIN WebDAV: Copying an object into the same container is allowed
2592  if (count($exists) && $_SESSION["clipboard"]["cmd"] != "copy")
2593  // END WebDAV: Copying an object into the same container is allowed
2594  {
2595  $this->ilias->raiseError($this->lng->txt("msg_obj_exists"),$this->ilias->error_obj->MESSAGE);
2596  }
2597 
2598  if (count($is_child))
2599  {
2600  $this->ilias->raiseError($this->lng->txt("msg_not_in_itself")." ".implode(',',$is_child),
2601  $this->ilias->error_obj->MESSAGE);
2602  }
2603 
2604  if (count($not_allowed_subobject))
2605  {
2606  $this->ilias->raiseError($this->lng->txt("msg_may_not_contain")." ".implode(',',$not_allowed_subobject),
2607  $this->ilias->error_obj->MESSAGE);
2608  }
2609 
2610  if (count($no_paste))
2611  {
2612  $this->ilias->raiseError($this->lng->txt("msg_no_perm_paste")." ".
2613  implode(',',$no_paste),$this->ilias->error_obj->MESSAGE);
2614  }
2615 
2616  // log pasteObject call
2617  $log->write("ilObjectGUI::pasteObject(), cmd: ".$_SESSION["clipboard"]["cmd"]);
2618 
2620  // everything ok: now paste the objects to new location
2621 
2622  // to prevent multiple actions via back/reload button
2623  $ref_ids = $_SESSION["clipboard"]["ref_ids"];
2624  unset($_SESSION["clipboard"]["ref_ids"]);
2625 
2626  // BEGIN WebDAV: Support a copy command in the repository
2627  // process COPY command
2628  if ($_SESSION["clipboard"]["cmd"] == "copy")
2629  {
2630  unset($_SESSION["clipboard"]["cmd"]);
2631 
2632  // new implementation, redirects to ilObjectCopyGUI
2633  if (count($ref_ids) == 1)
2634  {
2635  $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2636  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_id", $ref_ids[0]);
2637  $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2638  }
2639  else
2640  {
2641  $ilCtrl->setParameterByClass("ilobjectcopygui", "target", $this->object->getRefId());
2642  $ilCtrl->setParameterByClass("ilobjectcopygui", "source_ids", implode($ref_ids, "_"));
2643  $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget");
2644  }
2645 
2646 
2647 
2648  /* old implementation
2649 
2650  foreach($ref_ids as $ref_id)
2651  {
2652  $revIdMapping = array();
2653 
2654  $oldNode_data = $tree->getNodeData($ref_id);
2655  if ($oldNode_data['parent'] == $this->object->getRefId())
2656  {
2657  require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2658  $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2659  $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2660  }
2661  else
2662  {
2663  $newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2664  }
2665 
2666  // BEGIN ChangeEvent: Record copy event.
2667  $old_parent_data = $tree->getParentNodeData($ref_id);
2668  $newNode_data = $tree->getNodeData($newRef);
2669  ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2670  $oldNode_data['obj_id'], $ilUser->getId());
2671  ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2672  $this->object->getId());
2673  ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2674  // END ChangeEvent: Record copy event.
2675  }*/
2676 
2677  $log->write("ilObjectGUI::pasteObject(), copy finished");
2678  }
2679  // END WebDAV: Support a Copy command in the repository
2680 
2681  // process CUT command
2682  if ($_SESSION["clipboard"]["cmd"] == "cut")
2683  {
2684 
2685  foreach($ref_ids as $ref_id)
2686  {
2687  // Store old parent
2688  $old_parent = $tree->getParentId($ref_id);
2689  $this->tree->moveTree($ref_id,$this->object->getRefId());
2690  $rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
2691 
2692  include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
2694 
2695  // BEGIN ChangeEvent: Record cut event.
2696  $node_data = $tree->getNodeData($ref_id);
2697  $old_parent_data = $tree->getNodeData($old_parent);
2698  ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
2699  $old_parent_data['obj_id']);
2700  ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2701  $this->object->getId());
2702  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2703  // END PATCH ChangeEvent: Record cut event.
2704  }
2705  } // END CUT
2706 
2707  // process LINK command
2708  if ($_SESSION["clipboard"]["cmd"] == "link")
2709  {
2710  foreach ($ref_ids as $ref_id)
2711  {
2712  // get node data
2713  $top_node = $this->tree->getNodeData($ref_id);
2714 
2715  // get subnodes of top nodes
2716  $subnodes[$ref_id] = $this->tree->getSubtree($top_node);
2717  }
2718 
2719  // now move all subtrees to new location
2720  foreach ($subnodes as $key => $subnode)
2721  {
2722  // first paste top_node....
2723  $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($key);
2724  $new_ref_id = $obj_data->createReference();
2725  $obj_data->putInTree($_GET["ref_id"]);
2726  $obj_data->setPermissions($_GET["ref_id"]);
2727 
2728  // BEGIN ChangeEvent: Record link event.
2729  $node_data = $tree->getNodeData($new_ref_id);
2730  ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2731  $this->object->getId());
2732  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2733  // END PATCH ChangeEvent: Record link event.
2734  }
2735 
2736  $log->write("ilObjectGUI::pasteObject(), link finished");
2737 
2738  // inform other objects in hierarchy about link operation
2739  //$this->object->notify("link",$this->object->getRefId(),$_SESSION["clipboard"]["parent_non_rbac_id"],$this->object->getRefId(),$subnodes);
2740  } // END LINK
2741 
2742  // save cmd for correct message output after clearing the clipboard
2743  $last_cmd = $_SESSION["clipboard"]["cmd"];
2744 
2745 
2746  // clear clipboard
2747  $this->clearObject();
2748 
2749  if ($last_cmd == "cut")
2750  {
2751  ilUtil::sendSuccess($this->lng->txt("msg_cut_copied"),true);
2752  }
2753  // BEGIN WebDAV: Support a copy command in repository
2754  else if ($last_cmd == "copy")
2755  {
2756  ilUtil::sendSuccess($this->lng->txt("msg_cloned"),true);
2757  }
2758  else if ($last_cmd == 'link')
2759  // END WebDAV: Support copy command in repository
2760  {
2761  ilUtil::sendSuccess($this->lng->txt("msg_linked"),true);
2762  }
2763 
2764  $this->ctrl->returnToParent($this);
2765 
2766  } // END PASTE
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
clearObject()
clear clipboard and go back to last object
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
+ Here is the call graph for this function:

◆ performPasteIntoMultipleObjectsObject()

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

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

References $_POST, $_SESSION, $GLOBALS, $ilUser, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), clearObject(), cloneNodes(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilRbacLog\isActive(), ilRbacLog\LINK_OBJECT, ilUtil\sendFailure(), ilUtil\sendSuccess(), and showPasteTreeObject().

Referenced by ilObjOrgUnitGUI\performPaste().

1981  {
1982  global $rbacsystem, $rbacadmin, $rbacreview, $log, $tree, $ilObjDataCache, $ilUser;
1983 
1984  $command = $_SESSION['clipboard']['cmd'];
1985  if(!in_array($command, array('cut', 'link', 'copy')))
1986  {
1987  $message = __METHOD__.": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1988  $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1989  }
1990 
1991  if($command == 'cut')
1992  {
1993  if(isset($_POST['node']) && (int)$_POST['node'])
1994  $_POST['nodes'] = array($_POST['node']);
1995  }
1996 
1997  if(!is_array($_POST['nodes']) || !count($_POST['nodes']))
1998  {
1999  ilUtil::sendFailure($this->lng->txt('select_at_least_one_object'));
2000  switch ($command)
2001  {
2002  case 'cut':
2003  $this->showPasteTreeObject();
2004  break;
2005  case 'copy':
2006  $this->showPasteTreeObject();
2007  break;
2008  case 'link':
2009  $this->showPasteTreeObject();
2010  break;
2011  }
2012  return;
2013  }
2014 
2015  // this loop does all checks
2016  $folder_objects_cache = array();
2017  foreach($_SESSION['clipboard']['ref_ids'] as $ref_id)
2018  {
2019  $obj_data = ilObjectFactory::getInstanceByRefId($ref_id);
2020  $current_parent_id = $tree->getParentId($obj_data->getRefId());
2021 
2022  foreach($_POST['nodes'] as $folder_ref_id)
2023  {
2024  if(!array_key_exists($folder_ref_id, $folder_objects_cache))
2025  {
2026  $folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
2027  }
2028 
2029  // CHECK ACCESS
2030  if(!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType()))
2031  {
2032  $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().']');
2033  }
2034 
2035  // CHECK IF REFERENCE ALREADY EXISTS
2036  if($folder_ref_id == $current_parent_id)
2037  {
2038  $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().']');
2039  }
2040 
2041  // CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
2042  if ($tree->isGrandChild($ref_id, $folder_ref_id) ||
2043  $ref_id == $folder_ref_id)
2044  {
2045  $is_child[] = sprintf($this->lng->txt('msg_paste_object_not_in_itself'), $obj_data->getTitle().' ['.$obj_data->getRefId().']');
2046  }
2047 
2048  // CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
2049  if(!in_array($obj_data->getType(), array_keys($this->objDefinition->getSubObjects($folder_objects_cache[$folder_ref_id]->getType()))))
2050  {
2051  $not_allowed_subobject[] = sprintf($this->lng->txt('msg_obj_may_not_contain_objects_of_type'), $folder_objects_cache[$folder_ref_id]->getTitle().' ['.$folder_objects_cache[$folder_ref_id]->getRefId().']',
2052  $GLOBALS['lng']->txt('obj_'.$obj_data->getType()));
2053  }
2054  }
2055  }
2056 
2058  // process checking results
2059  if(count($exists) && $command != "copy")
2060  {
2061  $error .= implode('<br />', $exists);
2062  }
2063 
2064  if(count($is_child))
2065  {
2066  $error .= $error != '' ? '<br />' : '';
2067  $error .= implode('<br />', $is_child);
2068  }
2069 
2070  if(count($not_allowed_subobject))
2071  {
2072  $error .= $error != '' ? '<br />' : '';
2073  $error .= implode('<br />', $not_allowed_subobject);
2074  }
2075 
2076  if(count($no_paste))
2077  {
2078  $error .= $error != '' ? '<br />' : '';
2079  $error .= implode('<br />', $no_paste);
2080  }
2081 
2082  if($error != '')
2083  {
2084  ilUtil::sendFailure($error);
2085  switch ($command)
2086  {
2087  case 'cut':
2088  $this->showPasteTreeObject();
2089  break;
2090  case 'copy':
2091  $this->showPasteTreeObject();
2092  break;
2093  case 'link':
2094  $this->showPasteTreeObject();
2095  break;
2096  }
2097  return;
2098  }
2099 
2100  // log pasteObject call
2101  $log->write(__METHOD__.", cmd: ".$command);
2102 
2104  // everything ok: now paste the objects to new location
2105 
2106  // to prevent multiple actions via back/reload button
2107  $ref_ids = $_SESSION['clipboard']['ref_ids'];
2108  unset($_SESSION['clipboard']['ref_ids']);
2109 
2110  // BEGIN ChangeEvent: Record paste event.
2111  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
2112  // END ChangeEvent: Record paste event.
2113 
2114  // process COPY command
2115  if($command == 'copy')
2116  {
2117  foreach($_POST['nodes'] as $folder_ref_id)
2118  {
2119  foreach($ref_ids as $ref_id)
2120  {
2121  $revIdMapping = array();
2122 
2123  $oldNode_data = $tree->getNodeData($ref_id);
2124  if ($oldNode_data['parent'] == $folder_ref_id)
2125  {
2126  require_once 'Modules/File/classes/class.ilObjFileAccess.php';
2127  $newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
2128  $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
2129  }
2130  else
2131  {
2132  $newRef = $this->cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
2133  }
2134 
2135  // BEGIN ChangeEvent: Record copy event.
2136  $old_parent_data = $tree->getParentNodeData($ref_id);
2137  $newNode_data = $tree->getNodeData($newRef);
2138  ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
2139  $oldNode_data['obj_id'], $ilUser->getId());
2140  ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
2141  $ilObjDataCache->lookupObjId($folder_ref_id));
2142  ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
2143  // END PATCH ChangeEvent: Record cut event.
2144  }
2145  }
2146 
2147  ilUtil::sendSuccess($this->lng->txt('msg_cloned'), true);
2148  } // END COPY
2149 
2150  // process CUT command
2151  if($command == 'cut')
2152  {
2153  foreach($_POST['nodes'] as $folder_ref_id)
2154  {
2155  foreach($ref_ids as $ref_id)
2156  {
2157  // Store old parent
2158  $old_parent = $tree->getParentId($ref_id);
2159  $tree->moveTree($ref_id, $folder_ref_id);
2160  $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
2161 
2162  include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
2164 
2165  // BEGIN ChangeEvent: Record cut event.
2166  $node_data = $tree->getNodeData($ref_id);
2167  $old_parent_data = $tree->getNodeData($old_parent);
2168  ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
2169  $old_parent_data['obj_id']);
2170  ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2171  $ilObjDataCache->lookupObjId($folder_ref_id));
2172  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2173  // END PATCH ChangeEvent: Record cut event.
2174  }
2175 
2176  // prevent multiple iterations for cut cmommand
2177  break;
2178  }
2179 
2180  ilUtil::sendSuccess($this->lng->txt('msg_cut_copied'), true);
2181  } // END CUT
2182 
2183  // process LINK command
2184  if($command == 'link')
2185  {
2186  $linked_to_folders = array();
2187 
2188  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
2189  $rbac_log_active = ilRbacLog::isActive();
2190 
2191  foreach($_POST['nodes'] as $folder_ref_id)
2192  {
2193  $linked_to_folders[] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2194 
2195  foreach($ref_ids as $ref_id)
2196  {
2197  // get node data
2198  $top_node = $tree->getNodeData($ref_id);
2199 
2200  // get subnodes of top nodes
2201  $subnodes[$ref_id] = $tree->getSubtree($top_node);
2202  }
2203 
2204  // now move all subtrees to new location
2205  foreach($subnodes as $key => $subnode)
2206  {
2207  // first paste top_node....
2208  $obj_data = ilObjectFactory::getInstanceByRefId($key);
2209  $new_ref_id = $obj_data->createReference();
2210  $obj_data->putInTree($folder_ref_id);
2211  $obj_data->setPermissions($folder_ref_id);
2212 
2213  // rbac log
2214  if($rbac_log_active)
2215  {
2216  $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
2217  $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
2218  ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
2219  }
2220 
2221  // BEGIN ChangeEvent: Record link event.
2222  $node_data = $tree->getNodeData($new_ref_id);
2223  ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
2224  $ilObjDataCache->lookupObjId($folder_ref_id));
2225  ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
2226  // END PATCH ChangeEvent: Record link event.
2227  }
2228 
2229  $log->write(__METHOD__.', link finished');
2230  }
2231 
2232  ilUtil::sendSuccess(sprintf($this->lng->txt('mgs_objects_linked_to_the_following_folders'), implode(', ', $linked_to_folders)), true);
2233  } // END LINK
2234 
2235  // clear clipboard
2236  $this->clearObject();
2237 
2238  $this->ctrl->returnToParent($this);
2239  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
clearObject()
clear clipboard and go back to last object
$_POST['username']
Definition: cron.php:12
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static isActive()
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null)
Appends the text " - Copy" to a filename in the language of the current user.
$GLOBALS['ct_recipient']
showPasteTreeObject()
Show paste tree.
redirection script todo: (a better solution should control the processing via a xml file) ...
const LINK_OBJECT
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
_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.
global $ilUser
Definition: imgupload.php:15
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)
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
+ 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 347 of file class.ilContainerGUI.php.

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

348  {
349  if (parent::prepareOutput()) // return false in admin mode
350  {
351  if ($this->getCreationMode() != true && $a_show_subobjects)
352  {
353  // This method is called directly from ilContainerGUI::renderObject
354  #$this->showPossibleSubObjects();
355  $this->showTreeFlatIcon();
356 
357  // Member view
358  include_once './Services/Container/classes/class.ilMemberViewGUI.php';
359  ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
360  }
361  }
362  }
static showMemberViewSwitch($a_ref_id)
Show member view switch.
getCreationMode()
get creation mode
+ Here is the call 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 1851 of file class.ilContainerGUI.php.

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

1852  {
1853  global $rbacsystem, $tree, $ilAccess;
1854 
1855  $tmpdir = $tmpdir . DIRECTORY_SEPARATOR . ilUtil::getASCIIFilename($title);
1856  ilUtil::makeDir($tmpdir);
1857 
1858  $subtree = $tree->getChildsByTypeFilter($refid, array("fold","file"));
1859 
1860  foreach ($subtree as $child)
1861  {
1862  if (!$ilAccess->checkAccess("read", "", $child["ref_id"]))
1863  continue;
1864 
1865  if (ilObject::_isInTrash($child["ref_id"]))
1866  continue;
1867 
1868  if ($child["type"] == "fold")
1869  self::recurseFolder($child["ref_id"], $child["title"], $tmpdir);
1870  else
1871  self::copyFile($child["obj_id"], $child["title"], $tmpdir);
1872  }
1873  }
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
_isInTrash($a_ref_id)
checks wether object is in trash
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 3702 of file class.ilContainerGUI.php.

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

3703  {
3704  global $tpl;
3705 
3706  $html = null;
3707 
3708  $item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
3709  $container_view = $this->getContentGUI();
3710 
3711  // list item is session material (not part of "_all"-items - see below)
3712  include_once './Modules/Session/classes/class.ilEventItems.php';
3713  $event_items = ilEventItems::_getItemsOfContainer($this->object->getRefId());
3714  if(in_array((int)$_GET["child_ref_id"], $event_items))
3715  {
3716  include_once('./Services/Object/classes/class.ilObjectActivation.php');
3717  foreach ($this->object->items["sess"] as $id)
3718  {
3719  $items = ilObjectActivation::getItemsByEvent($id['obj_id']);
3720  foreach($items as $event_item)
3721  {
3722  if ($event_item["child"] == (int)$_GET["child_ref_id"])
3723  {
3724  // sessions
3725  if((int)$_GET["parent_ref_id"])
3726  {
3727  $event_item["parent"] = (int)$_GET["parent_ref_id"];
3728  }
3729  $html = $container_view->renderItem($event_item);
3730  }
3731  }
3732  }
3733  }
3734 
3735  // "normal" list item
3736  if(!$html)
3737  {
3738  foreach ($this->object->items["_all"] as $id)
3739  {
3740  if ($id["child"] == (int) $_GET["child_ref_id"])
3741  {
3742  $html = $container_view->renderItem($id);
3743  }
3744  }
3745  }
3746 
3747  if($html)
3748  {
3749  echo $html;
3750 
3751  // we need to add onload code manually (rating, comments, etc.)
3752  echo $tpl->getOnLoadCodeForAsynch();
3753  }
3754 
3755  exit;
3756  }
getContentGUI()
Get content gui object.
exit
Definition: login.php:54
static getItemsByEvent($a_event_id)
Get session material / event items.
$_GET["client_id"]
_getItemsOfContainer($a_ref_id)
+ Here is the call graph for this function:

◆ removeFromDeskObject()

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

Implements ilDesktopItemHandling.

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

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

1531  {
1532  global $ilSetting, $lng;
1533 
1534  if((int)$ilSetting->get('disable_my_offers'))
1535  {
1536  return $this->renderObject();
1537  }
1538 
1539  include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1541  ilUtil::sendSuccess($lng->txt("removed_from_desktop"));
1542  $this->renderObject();
1543  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
renderObject()
render the object
static removeFromDesktop()
Remove item from personal desktop public.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call 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 3878 of file class.ilContainerGUI.php.

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

3879  {
3880  global $log, $ilAppEventHandler, $lng;
3881 
3882  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3883  $ru = new ilRepUtilGUI($this);
3884  $ru->removeObjectsFromSystem($_POST["trash_id"]);
3885  $this->ctrl->redirect($this, "trash");
3886  }
$_POST['username']
Definition: cron.php:12
Repository GUI Utilities.

◆ renderItemList()

ilContainerGUI::renderItemList (   $a_type = "all")

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

References $ilBench, $ilSetting, ilObjectGUI\$objDefinition, ilObjectGUI\$tpl, ilObjectListGUIFactory\_getListGUIByType(), addHeaderRow(), addMessageRow(), addStandardRow(), clearAdminCommandsDetermination(), getContainerPageHTML(), isActiveAdministrationPanel(), newBlockTemplate(), and resetRowType().

919  {
921 
922  include_once("Services/Object/classes/class.ilObjectListGUIFactory.php");
923 
924  $output_html = "";
926 
927  $type_grps = $this->object->getGroupedObjTypes();
928 
929  switch ($a_type)
930  {
931  // render all items list
932  case "all":
933 
934  // new behaviour
935  $output_html.= $this->getContainerPageHTML();
936 
937  // all item types
938  /*
939  $type_ordering = array(
940  "cat", "fold", "crs","rcrs", "icrs", "icla", "grp", "chat", "frm", "lres",
941  "glo", "webr", "mcst", "wiki", "file", "exc",
942  "tst", "svy", "mep", "qpl", "spl");*/
943 
944  $cur_obj_type = "";
945  $overall_tpl =& $this->newBlockTemplate();
946  $this->type_template = array();
947  $first = true;
948 
949  // iterate all types
950  foreach ($type_grps as $type => $v)
951  {
952  // set template (overall or type specific)
953  if (is_int(strpos($output_html, "[list-".$type."]")))
954  {
955  $tpl =& $this->newBlockTemplate();
956  $overall = false; // individual
957  }
958  else
959  {
960  $tpl =& $overall_tpl;
961  $overall = true; // put to the rest
962  }
963 
964  if (is_array($this->items[$type]))
965  {
966 
967  $item_html = array();
968 
969  foreach($this->items[$type] as $key => $item)
970  {
971  // get list gui class for each object type
972  if ($cur_obj_type != $item["type"])
973  {
974  $item_list_gui =& ilObjectListGUIFactory::_getListGUIByType($item["type"]);
975  $item_list_gui->setContainerObject($this);
976  }
977  // render item row
978  $ilBench->start("ilContainerGUI", "0210_getListHTML");
979 
980  // show administration command buttons (or not)
981  if (!$this->isActiveAdministrationPanel())
982  {
983  $item_list_gui->enableDelete(false);
984  $item_list_gui->enableLink(false);
985  $item_list_gui->enableCut(false);
986  $item_list_gui->enableCopy(false);
987  }
988 
989  // activate common social commands
990  $item_list_gui->enableComments(true);
991  $item_list_gui->enableNotes(true);
992  $item_list_gui->enableTags(true);
993  $item_list_gui->enableRating(true);
994 
995  $html = $item_list_gui->getListItemHTML($item["ref_id"],
996  $item["obj_id"], $item["title"], $item["description"]);
997 
998  // check whether any admin command is allowed for
999  // the items
1000  $this->determineAdminCommands($item["ref_id"],
1001  $item_list_gui->adminCommandsIncluded());
1002  $ilBench->stop("ilContainerGUI", "0210_getListHTML");
1003  if ($html != "")
1004  {
1005  // BEGIN WebDAV: Use $item_list_gui to determine icon image type
1006  $item_html[] = array(
1007  "html" => $html,
1008  "item_ref_id" => $item["ref_id"],
1009  "item_obj_id" => $item["obj_id"],
1010  'item_icon_image_type' => (method_exists($item_list_gui, 'getIconImageType')) ?
1011  $item_list_gui->getIconImageType() :
1012  $item['type']
1013  );
1014  // END WebDAV: Use $item_list_gui to determine icon image type
1015  }
1016  }
1017 
1018  // output block for resource type
1019  if (count($item_html) > 0)
1020  {
1021  // separator row
1022  if (!$first && $overall)
1023  {
1024  $this->addSeparatorRow($tpl);
1025  }
1026 
1027  if ($overall)
1028  {
1029  $first = false;
1030  }
1031 
1032  // add a header for each resource type
1033  if ($this->ilias->getSetting("icon_position_in_lists") == "item_rows")
1034  {
1035  $this->addHeaderRow($tpl, $type, false);
1036  }
1037  else
1038  {
1039  $this->addHeaderRow($tpl, $type);
1040  }
1041  $this->resetRowType();
1042 
1043  // content row
1044  $this->current_position = 1;
1045  foreach($item_html as $item)
1046  {
1047  // BEGIN WebDAV: Use $item_list_gui to determine image type
1048  $this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], $item['item_icon_image_type']);
1049  // END WebDAV: Use $item_list_gui to determine image type
1050  }
1051 
1052  // store type specific templates in array
1053  if (is_int(strpos($output_html, "[list-".$type."]")))
1054  {
1055  $this->type_template[$type] = $tpl;
1056  }
1057  }
1058  else
1059  {
1060  // [list-...] tag available, but no item of type accessible
1061  if (!$overall)
1062  {
1063  $this->addHeaderRow($tpl, $type);
1064  $this->resetRowType();
1065  $this->addMessageRow($tpl,
1066  $this->lng->txt("msg_no_type_accessible"), $type);
1067  $this->type_template[$type] = $tpl;
1068  }
1069  }
1070  }
1071  else
1072  {
1073  // [list-...] tag available, but no item of type exists
1074  if (!$overall)
1075  {
1076  $this->addHeaderRow($tpl, $type);
1077  $this->resetRowType();
1078  $this->addMessageRow($tpl,
1079  $this->lng->txt("msg_no_type_available"), $type);
1080  $this->type_template[$type] = $tpl;
1081  }
1082  }
1083 
1084  }
1085 
1086 
1087  // I don't know why but executing this
1088  // line before the following foreach loop seems to be crucial
1089  if ($output_html != "")
1090  {
1091  //$output_html.= "<br /><br />";
1092  }
1093  $output_html.= $overall_tpl->get();
1094  //$output_html = str_replace("<br>++", "++", $output_html);
1095  //$output_html = str_replace("<br>++", "++", $output_html);
1096  //$output_html = str_replace("++<br>", "++", $output_html);
1097  //$output_html = str_replace("++<br>", "++", $output_html);
1098  foreach ($this->type_template as $type => $tpl)
1099  {
1100  $output_html = eregi_replace("\[list-".$type."\]",
1101  "</p>".$tpl->get()."<p class=\"ilc_Standard\">",
1102  $output_html);
1103  }
1104 
1105  if ($xpage_id > 0)
1106  {
1107  $page_block = new ilTemplate("tpl.container_page_block.html", false, false,
1108  "Services/Container");
1109  $page_block->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
1110  $output_html = $page_block->get();
1111  }
1112 
1113  break;
1114 
1115  default:
1116  // to do:
1117  break;
1118  }
1119  return $output_html;
1120  }
addMessageRow(&$a_tpl, $a_message, $a_type)
add message row
addStandardRow(&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
adds a standard row to a block template
& newBlockTemplate()
determin admin commands
addHeaderRow(&$a_tpl, $a_type, $a_show_image=true)
adds a header row to a block template
clearAdminCommandsDetermination()
cleaer administration commands determination
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilSetting
Definition: privfeed.php:40
global $ilBench
Definition: ilias.php:18
getContainerPageHTML()
Get container page HTML.
+ Here is the call graph for this function:

◆ renderObject()

ilContainerGUI::renderObject ( )

render the object

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

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$tpl, getContentGUI(), isActiveAdministrationPanel(), setContentSubTabs(), showAdministrationPanel(), showPermanentLink(), and showPossibleSubObjects().

Referenced by addToDeskObject(), editOrderObject(), enableMultiDownloadObject(), lockObject(), removeFromDeskObject(), and ilObjiLincCourseGUI\viewObject().

480  {
481  global $ilDB, $tpl, $ilTabs, $ilCtrl, $ilSetting;
482 
483  $container_view = $this->getContentGUI();
484 
485  $this->setContentSubTabs();
486  if ($this->isActiveAdministrationPanel())
487  {
488  $ilTabs->activateSubTab("manage");
489  }
490  else
491  {
492  $ilTabs->activateSubTab("view_content");
493  }
494 
495  $container_view->setOutput();
496 
497  $this->adminCommands = $container_view->adminCommands;
498 
499  // it is important not to show the subobjects/admin panel here, since
500  // we will create nested forms in case, e.g. a news/calendar item is added
501  if ($ilCtrl->getNextClass() != "ilcolumngui")
502  {
503  $this->showAdministrationPanel($tpl);
504  $this->showPossibleSubObjects();
505  }
506 
507  $this->showPermanentLink($tpl);
508 
509  // add tree updater javascript
510  if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize"))
511  {
512  $ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
513  /*$tpl->addOnloadCode("
514  if (parent && parent.tree && parent.tree.updater)
515  {
516  parent.tree.updater('tree_div', '".
517  $ilCtrl->getLinkTarget($this, "showTree", "", true, false)
518  ."');
519  }");*/
520  }
521  }
getContentGUI()
Get content gui object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
showPermanentLink(&$tpl)
show permanent link
showPossibleSubObjects()
show possible sub objects selection list
setContentSubTabs()
Set content sub tabs.
global $ilSetting
Definition: privfeed.php:40
showAdministrationPanel(&$tpl)
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 1332 of file class.ilContainerGUI.php.

Referenced by renderItemList().

1333  {
1334  $this->cur_row_type = "";
1335  }
+ Here is the caller graph for this function:

◆ savePageContentObject()

ilContainerGUI::savePageContentObject ( )

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

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

871  {
872  include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
873  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
874  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
875  "xhtml_page");
876 
877  /*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
878  include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
879  $ta = new ilTextAreaInputGUI();
880  $ta->setRteTagSet("extended_table_img");
881  $tags = $ta->getRteTagString();*/
882 
883  //$text = ilUtil::stripSlashes($_POST["page_content"],
884  // true,
885  // $tags);
886 
887  $text = ilUtil::stripSlashes($_POST["page_content"],
888  true,
890  if ($xpage_id > 0)
891  {
892  $xpage = new ilXHTMLPage($xpage_id);
893  $xpage->setContent($text);
894  $xpage->save();
895  }
896  else
897  {
898  $xpage = new ilXHTMLPage();
899  $xpage->setContent($text);
900  $xpage->save();
901  ilContainer::_writeContainerSetting($this->object->getId(),
902  "xhtml_page", $xpage->getId());
903  }
904 
905  include_once("Services/RTE/classes/class.ilRTE.php");
906  ilRTE::_cleanupMediaObjectUsage($text, $this->object->getType().":html",
907  $this->object->getId());
908 
909  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
910  $this->ctrl->redirect($this, "");
911  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
& _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
_writeContainerSetting($a_id, $a_keyword, $a_value)
_cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
synchronises appearances of media objects in $a_text with media object usage table ...
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
XHTML Page class.
_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 3680 of file class.ilContainerGUI.php.

References $ilUser, initFormPasswordInstruction(), ilUtil\sendSuccess(), and showPasswordInstructionObject().

3681  {
3682  global $ilUser;
3683 
3684  $form = $this->initFormPasswordInstruction();
3685  if($form->checkInput())
3686  {
3687  $ilUser->resetPassword($this->form->getInput('new_password'),$this->form->getInput('new_password'));
3688  ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'),true);
3689  $this->showPasswordInstructionObject(false);
3690  return true;
3691  }
3692  $form->setValuesByPost();
3694  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.
initFormPasswordInstruction()
Init password form.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ saveSortingObject()

ilContainerGUI::saveSortingObject ( )

Save Sorting.

public

Parameters

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

References $_POST, ilContainerSorting\_getInstance(), and ilUtil\sendSuccess().

3305  {
3306  include_once('Services/Container/classes/class.ilContainerSorting.php');
3307  $sorting = ilContainerSorting::_getInstance($this->object->getId());
3308 
3309  // Allow comma
3310  $positions = str_replace(',','.',$_POST['position']);
3311 
3312  $sorting->savePost($positions);
3313  ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
3314  $this->ctrl->redirect($this, "editOrder");
3315  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static _getInstance($a_obj_id)
get instance by obj_id
+ Here is the call graph for this function:

◆ saveStyleSettingsObject()

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

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

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

3566  {
3567  global $ilSetting;
3568 
3569  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
3570  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
3571  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
3572  || $this->object->getStyleSheetId() == 0))
3573  {
3574  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
3575  $this->object->update();
3576  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
3577  }
3578  $this->ctrl->redirect($this, "editStyleProperties");
3579  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_lookupStandard($a_id)
Lookup standard flag.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setColumnSettings()

ilContainerGUI::setColumnSettings (   $column_gui)

May be overwritten in subclasses.

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

References allowBlocksMoving(), and isActiveAdministrationPanel().

3048  {
3049  global $ilAccess;
3050  parent::setColumnSettings($column_gui);
3051 
3052  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
3053  $this->isActiveAdministrationPanel() &&
3054  $this->allowBlocksMoving())
3055  {
3056  $column_gui->setEnableMovement(true);
3057  }
3058 
3059  $column_gui->setRepositoryItems(
3060  $this->object->getSubItems($this->isActiveAdministrationPanel(), true));
3061 
3062  //if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
3063  // && $this->allowBlocksConfigure())
3064  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
3065  {
3066  $column_gui->setBlockProperty("news", "settings", true);
3067  //$column_gui->setBlockProperty("news", "public_notifications_option", true);
3068  $column_gui->setBlockProperty("news", "default_visibility_option", true);
3069  $column_gui->setBlockProperty("news", "hide_news_block_option", true);
3070  }
3071 
3072  if ($this->isActiveAdministrationPanel())
3073  {
3074  $column_gui->setAdminCommands(true);
3075  }
3076  }
allowBlocksMoving()
Standard is to allow blocks moving.
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilContainerGUI::setContentSubTabs ( )

Set content sub tabs.

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

References addStandardContainerSubTabs().

Referenced by renderObject().

527  {
529  }
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 1341 of file class.ilContainerGUI.php.

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

1342  {
1343  global $lng;
1344 
1345  if (!$this->isActiveAdministrationPanel()
1346  || strtolower($this->ctrl->getCmdClass()) != "ilcontainerpagegui")
1347  {
1348  return;
1349  }
1350 
1351  $lng->loadLanguageModule("content");
1352  //$tabs_gui = new ilTabsGUI();
1353  //$tabs_gui->setSubTabs();
1354 
1355  // back to upper context
1356  $this->tabs_gui->setBackTarget($this->lng->txt("obj_cat"),
1357  $this->ctrl->getLinkTarget($this, "frameset"),
1358  ilFrameTargetInfo::_getFrame("MainContent"));
1359 
1360  $this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilcontainerpagegui", "view")
1361  , array("", "view"), "ilcontainerpagegui");
1362 
1363  //$this->tpl->setTabs($tabs_gui->getHTML());
1364  }
static _getFrame($a_class, $a_type='')
Get content frame name.
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

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

References ilObjectGUI\$ilias, $path, ilObject\_getIcon(), ilObjectListGUIFactory\_getListGUIByType(), ilContainer\_lookupContainerSetting(), and ilContainer\_lookupIconPath().

391  {
392  global $ilias;
393 
394  if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"))
395  {
396  $this->tpl->setTitle($this->object->getTitle());
397  $this->tpl->setDescription($this->object->getLongDescription());
398 
399  // set tile icon
400  $icon = ilObject::_getIcon($this->object->getId(), "big", $this->object->getType());
401  if ($ilias->getSetting("custom_icons") &&
402  in_array($this->object->getType(), array("cat","grp","crs", "root")))
403  {
404  require_once("./Services/Container/classes/class.ilContainer.php");
405  if (($path = ilContainer::_lookupIconPath($this->object->getId(), "big")) != "")
406  {
407  $icon = $path;
408  }
409  }
410  $this->tpl->setTitleIcon($icon, $this->lng->txt("obj_".$this->object->getType()));
411 
412  include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
413  $lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
414  $lgui->initItem($this->object->getRefId(), $this->object->getId());
415  $this->tpl->setAlertProperties($lgui->getAlertProperties());
416  }
417  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
_lookupIconPath($a_id, $a_size="big")
lookup icon path
$path
Definition: index.php:22
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
+ Here is the call graph for this function:

◆ showAdministrationPanel()

ilContainerGUI::showAdministrationPanel ( $tpl)

show administration panel

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

References $_SESSION, $GLOBALS, ilObjectGUI\$lng, ilUtil\getImagePath(), isActiveAdministrationPanel(), isMultiDownloadEnabled(), and ilContainer\SORT_MANUAL.

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

535  {
536  global $ilAccess, $lng;
537 
538  $lng->loadLanguageModule('cntr');
539 
540  if ($this->isActiveAdministrationPanel())
541  {
542  // #11545
543  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
544 
545  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
546  $toolbar = new ilToolbarGUI();
547  $this->ctrl->setParameter($this, "type", "");
548  $this->ctrl->setParameter($this, "item_ref_id", "");
549 
550  if (!$_SESSION["clipboard"])
551  {
552  if ($this->object->gotItems())
553  {
554  $toolbar->setLeadingImage(
555  ilUtil::getImagePath("arrow_upright.png"),
556  $lng->txt("actions")
557  );
558  $toolbar->addFormButton(
559  $this->lng->txt('delete_selected_items'),
560  'delete'
561  );
562  $toolbar->addFormButton(
563  $this->lng->txt('move_selected_items'),
564  'cut'
565  );
566  $toolbar->addFormButton(
567  $this->lng->txt('copy_selected_items'),
568  'copy'
569  );
570  $toolbar->addFormButton(
571  $this->lng->txt('link_selected_items'),
572  'link'
573  );
574  // add download button if multi download enabled
575  $folder_set = new ilSetting("fold");
576  if ($folder_set->get("enable_multi_download") == true)
577  {
578  $toolbar->addSeparator();
579  $toolbar->addFormButton(
580  $this->lng->txt('download_selected_items'),
581  'download'
582  );
583  }
584  }
585  if($this->object->getType() == 'crs')
586  {
587  if($this->object->gotItems())
588  {
589  $toolbar->addSeparator();
590  }
591 
592  $toolbar->addButton(
593  $this->lng->txt('cntr_adopt_content'),
594  $this->ctrl->getLinkTargetByClass(
595  'ilObjectCopyGUI',
596  'initSourceSelection')
597  );
598  }
599  }
600  else
601  {
602  //$GLOBALS["tpl"]->addAdminPanelCommand("paste",
603  // $this->lng->txt("paste_clipboard_items"));
604 
605  $toolbar->addFormButton(
606  $this->lng->txt('paste_clipboard_items'),
607  'paste'
608  );
609 
610  if($_SESSION["clipboard"]["cmd"] == "link")
611  {
612  //$GLOBALS["tpl"]->addAdminPanelCommand("initAndDisplayLinkIntoMultipleObjects",
613  // $this->lng->txt("paste_clipboard_items_into_multiple_objects"));
614  /*$toolbar->addFormButton(
615  $this->lng->txt('paste_clipboard_items_into_multiple_objects'),
616  'initAndDisplayLinkIntoMultipleObjects'
617  );*/
618  }
619 
620  $toolbar->addFormButton(
621  $this->lng->txt('clear_clipboard'),
622  'clear'
623  );
624 
625  if ($this->isMultiDownloadEnabled())
626  {
627  $toolbar->addSeparator();
628  $toolbar->addFormButton(
629  $this->lng->txt('download_selected_items'),
630  'download'
631  );
632  }
633  }
634 
635  $GLOBALS['tpl']->addAdminPanelToolbar(
636  $toolbar,
637  ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false,
638  ($this->object->gotItems() && !$_SESSION["clipboard"]) ? true : false
639  );
640 
641  // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
642  if ($this->object->gotItems())
643  {
644  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
645  }
646  }
647  else
648  {
649  if ($this->edit_order)
650  {
651  if($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId()))
652  {
653  include_once('./Services/Container/classes/class.ilContainer.php');
654 
655  if ($this->object->getOrderType() == ilContainer::SORT_MANUAL)
656  {
657  // #11843
658  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
659 
660  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
661  $toolbar = new ilToolbarGUI();
662  $this->ctrl->setParameter($this, "type", "");
663  $this->ctrl->setParameter($this, "item_ref_id", "");
664 
665  $toolbar->addFormButton(
666  $this->lng->txt('sorting_save'),
667  'saveSorting'
668  );
669 
670  $GLOBALS['tpl']->addAdminPanelToolbar($toolbar, true, false);
671 
672  /*
673  $GLOBALS["tpl"]->addAdminPanelCommand("saveSorting",
674  $this->lng->txt('sorting_save'));
675 
676  // button should appear at bottom, too
677  $GLOBALS["tpl"]->admin_panel_bottom = true;
678  */
679  }
680  }
681  }
682  else if ($this->isMultiDownloadEnabled())
683  {
684  // #11843
685  $GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
686 
687  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
688  $toolbar = new ilToolbarGUI();
689  $this->ctrl->setParameter($this, "type", "");
690  $this->ctrl->setParameter($this, "item_ref_id", "");
691 
692  $toolbar->addFormButton(
693  $this->lng->txt('download_selected_items'),
694  'download'
695  );
696 
697  $GLOBALS['tpl']->addAdminPanelToolbar(
698  $toolbar,
699  $this->object->gotItems() ? true : false,
700  $this->object->gotItems() ? true : false
701  );
702  }
703  }
704  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
ILIAS Setting Class.
$GLOBALS['ct_recipient']
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:

◆ showCustomIconsEditing()

ilContainerGUI::showCustomIconsEditing (   $a_input_colspan = 1,
ilPropertyFormGUI  $a_form = null,
  $a_as_section = true 
)

show edit section of custom icons for container

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

Referenced by ilObjCourseGUI\initCourseIconsForm(), ilObjRootFolderGUI\initEditForm(), ilObjGroupGUI\initGroupIconsForm(), ilObjFolderGUI\initIconsForm(), and ilObjCategoryGUI\initIconsForm().

2910  {
2911  if ($this->ilias->getSetting("custom_icons"))
2912  {
2913  if(!$a_form)
2914  {
2915  $this->tpl->addBlockFile("CONTAINER_ICONS", "container_icon_settings",
2916  "tpl.container_icon_settings.html", "Services/Container");
2917 
2918  if (($big_icon = $this->object->getBigIconPath()) != "")
2919  {
2920  $this->tpl->setCurrentBlock("big_icon");
2921  $this->tpl->setVariable("SRC_BIG_ICON", $big_icon);
2922  $this->tpl->parseCurrentBlock();
2923  }
2924  if ($this->object->getType() != "root")
2925  {
2926  if (($small_icon = $this->object->getSmallIconPath()) != "")
2927  {
2928  $this->tpl->setCurrentBlock("small_icon");
2929  $this->tpl->setVariable("SRC_SMALL_ICON", $small_icon);
2930  $this->tpl->parseCurrentBlock();
2931  }
2932  $this->tpl->setCurrentBlock("small_icon_row");
2933  $this->tpl->setVariable("SMALL_ICON", $this->lng->txt("standard_icon"));
2934  $this->tpl->setVariable("SMALL_SIZE", "(".
2935  $this->ilias->getSetting("custom_icon_small_width")."x".
2936  $this->ilias->getSetting("custom_icon_small_height").")");
2937  $this->tpl->setVariable("TXT_REMOVE_S", $this->lng->txt("remove"));
2938  $this->tpl->parseCurrentBlock();
2939  }
2940  if (($tiny_icon = $this->object->getTinyIconPath()) != "")
2941  {
2942  $this->tpl->setCurrentBlock("tiny_icon");
2943  $this->tpl->setVariable("SRC_TINY_ICON", $tiny_icon);
2944  $this->tpl->parseCurrentBlock();
2945  }
2946  $this->tpl->setCurrentBlock("container_icon_settings");
2947  $this->tpl->setVariable("SPAN_TITLE", $a_input_colspan + 1);
2948  $this->tpl->setVariable("SPAN_INPUT", $a_input_colspan);
2949  $this->tpl->setVariable("ICON_SETTINGS", $this->lng->txt("icon_settings"));
2950  $this->tpl->setVariable("BIG_ICON", $this->lng->txt("big_icon"));
2951  $this->tpl->setVariable("TINY_ICON", $this->lng->txt("tiny_icon"));
2952  $this->tpl->setVariable("BIG_SIZE", "(".
2953  $this->ilias->getSetting("custom_icon_big_width")."x".
2954  $this->ilias->getSetting("custom_icon_big_height").")");
2955  $this->tpl->setVariable("TINY_SIZE", "(".
2956  $this->ilias->getSetting("custom_icon_tiny_width")."x".
2957  $this->ilias->getSetting("custom_icon_tiny_height").")");
2958  $this->tpl->setVariable("TXT_REMOVE", $this->lng->txt("remove"));
2959  $this->tpl->parseCurrentBlock();
2960  }
2961  else
2962  {
2963  $big_icon = $this->object->getBigIconPath();
2964  $small_icon = $this->object->getSmallIconPath();
2965  $tiny_icon = $this->object->getTinyIconPath();
2966 
2967  if($a_as_section)
2968  {
2969  $title = new ilFormSectionHeaderGUI();
2970  $title->setTitle($this->lng->txt("icon_settings"));
2971  }
2972  else
2973  {
2974  $title = new ilCustomInputGUI($this->lng->txt("icon_settings"), "");
2975  }
2976  $a_form->addItem($title);
2977 
2978  // big
2979  $caption = $this->lng->txt("big_icon")." (".
2980  $this->ilias->getSetting("custom_icon_big_width")."x".
2981  $this->ilias->getSetting("custom_icon_big_height").")";
2982  $icon = new ilImageFileInputGUI($caption, "cont_big_icon");
2983  $icon->setImage($big_icon);
2984  if($a_as_section)
2985  {
2986  $a_form->addItem($icon);
2987  }
2988  else
2989  {
2990  $title->addSubItem($icon);
2991  }
2992 
2993  // small/standard
2994  if ($this->object->getType() != "root")
2995  {
2996  $caption = $this->lng->txt("standard_icon")." (".
2997  $this->ilias->getSetting("custom_icon_small_width")."x".
2998  $this->ilias->getSetting("custom_icon_small_height").")";
2999  $icon = new ilImageFileInputGUI($caption, "cont_small_icon");
3000  $icon->setImage($small_icon);
3001  if($a_as_section)
3002  {
3003  $a_form->addItem($icon);
3004  }
3005  else
3006  {
3007  $title->addSubItem($icon);
3008  }
3009  }
3010 
3011  // tiny
3012  $caption = $this->lng->txt("tiny_icon")." (".
3013  $this->ilias->getSetting("custom_icon_tiny_width")."x".
3014  $this->ilias->getSetting("custom_icon_tiny_height").")";
3015  $icon = new ilImageFileInputGUI($caption, "cont_tiny_icon");
3016  $icon->setImage($tiny_icon);
3017  if($a_as_section)
3018  {
3019  $a_form->addItem($icon);
3020  }
3021  else
3022  {
3023  $title->addSubItem($icon);
3024  }
3025  }
3026  }
3027  }
This class represents a section header in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
redirection script todo: (a better solution should control the processing via a xml file) ...
This class represents an image file property in a property form.
This class represents a custom property in a property form.
+ Here is the caller graph for this function:

◆ showLinkListObject()

ilContainerGUI::showLinkListObject ( )

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

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

1123  {
1124  global $lng, $tree;
1125 
1126  $tpl = new ilTemplate("tpl.container_link_help.html", true, true,
1127  "Services/Container");
1128 
1129  $type_ordering = array(
1130  "cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres",
1131  "glo", "webr", "file", "exc",
1132  "tst", "svy", "mep", "qpl", "spl");
1133 
1134  $childs = $tree->getChilds($_GET["ref_id"]);
1135  foreach($childs as $child)
1136  {
1137  if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm")))
1138  {
1139  $cnt["lres"]++;
1140  }
1141  else
1142  {
1143  $cnt[$child["type"]]++;
1144  }
1145  }
1146 
1147  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
1148  $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
1149  foreach($type_ordering as $type)
1150  {
1151  $tpl->setCurrentBlock("row");
1152  $tpl->setVariable("ROWCOL", "tblrow".((($i++)%2)+1));
1153  if ($type != "lres")
1154  {
1155  $tpl->setVariable("TYPE", $lng->txt("objs_".$type).
1156  " (".((int)$cnt[$type]).")");
1157  }
1158  else
1159  {
1160  $tpl->setVariable("TYPE", $lng->txt("learning_resources").
1161  " (".((int)$cnt["lres"]).")");
1162  }
1163  $tpl->setVariable("TXT_LINK", "[list-".$type."]");
1164  $tpl->parseCurrentBlock();
1165  }
1166  $tpl->show();
1167  exit;
1168 
1169  }
exit
Definition: login.php:54
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
+ Here is the call graph for this function:

◆ showPasswordInstructionObject()

ilContainerGUI::showPasswordInstructionObject (   $a_init = true)
protected

Show webdav password instruction.

Returns

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

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

Referenced by savePasswordObject().

3630  {
3631  global $tpl,$ilToolbar;
3632 
3633  if($a_init)
3634  {
3635  ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
3636  $this->initFormPasswordInstruction();
3637  }
3638 
3639  include_once ('Services/WebDAV/classes/class.ilDAVServer.php');
3640  $davServer = ilDAVServer::getInstance();
3641  $ilToolbar->addButton(
3642  $this->lng->txt('mount_webfolder'),
3643  $davServer->getMountURI($this->object->getRefId()),
3644  '_blank',
3645  '',
3646  $davServer->getFolderURI($this->object->getRefId())
3647  );
3648 
3649  $tpl->setContent($this->form->getHTML());
3650  }
initFormPasswordInstruction()
Init password form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getInstance()
Get singelton iunstance.
+ 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 2265 of file class.ilContainerGUI.php.

References $_SESSION, $cmd, $t, and ilUtil\getImagePath().

Referenced by initAndDisplayCopyIntoMultipleObjectsObject(), initAndDisplayLinkIntoMultipleObjectsObject(), initAndDisplayMoveIntoObjectObject(), and performPasteIntoMultipleObjectsObject().

2266  {
2267  global $ilTabs, $ilToolbar;
2268 
2269  $ilTabs->setTabActive('view_content');
2270 
2271  if(!in_array($_SESSION['clipboard']['cmd'], array('link', 'copy', 'cut')))
2272  {
2273  $message = __METHOD__.": Unknown action.";
2274  $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
2275  }
2276  $cmd = $_SESSION['clipboard']['cmd'];
2277 
2278  //
2279  include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
2280  $exp = new ilRepositorySelectorExplorerGUI($this, "showPasteTree");
2281  $exp->setTypeWhiteList(array("root", "cat", "grp", "crs", "fold"));
2282  if ($cmd == "link")
2283  {
2284  $exp->setSelectMode("nodes", true);
2285  }
2286  else
2287  {
2288  $exp->setSelectMode("nodes[]", false);
2289  }
2290  if ($exp->handleCommand())
2291  {
2292  return;
2293  }
2294  $output = $exp->getHTML();
2295 
2296  $txt_var = ($cmd == "copy")
2297  ? "copy"
2298  : "paste";
2299 
2300  // toolbars
2301  $t = new ilToolbarGUI();
2302  $t->setFormAction($this->ctrl->getFormAction($this, "performPasteIntoMultipleObjects"));
2303  $t->addFormButton($this->lng->txt($txt_var), "performPasteIntoMultipleObjects");
2304  $t->addSeparator();
2305  $t->addFormButton($this->lng->txt("obj_insert_into_clipboard"), "keepObjectsInClipboard");
2306  $t->addFormButton($this->lng->txt("cancel"), "cancelMoveLink");
2307  $t->setCloseFormTag(false);
2308  $t->setLeadingImage(ilUtil::getImagePath("arrow_upright.png"), " ");
2309  $output = $t->getHTML().$output;
2310  $t->setLeadingImage(ilUtil::getImagePath("arrow_downright.png"), " ");
2311  $t->setCloseFormTag(true);
2312  $t->setOpenFormTag(false);
2313  $output.= "<br />".$t->getHTML();
2314 
2315  $this->tpl->setContent($output);
2316  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
Explorer for selecting repository items.
$cmd
Definition: sahs_server.php:35
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPermanentLink()

ilContainerGUI::showPermanentLink ( $tpl)

show permanent link

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

References $GLOBALS.

Referenced by renderObject().

724  {
725  $GLOBALS["tpl"]->setPermanentLink($this->object->getType(),
726  $this->object->getRefId(), "", "_top");
727  }
$GLOBALS['ct_recipient']
+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilContainerGUI::showPossibleSubObjects ( )

show possible sub objects selection list

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

References ilObjectAddNewItemGUI\render().

Referenced by renderObject().

423  {
424  include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
425  $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
426  $gui->render();
427  }
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 (   $a_initial_call = false)

Show tree.

Parameters
boolean$a_initial_callshould be true if not called through standard $ilCtrl->getCmd() procedure

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

References $_GET, $_SESSION, $ilCtrl, $ilSetting, $ilUser, and ilObjectGUI\$tpl.

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

3815  {
3816  global $tpl, $ilUser, $ilSetting, $ilCtrl;
3817 
3818  // set current repository view mode
3819  if (!empty($_GET["set_mode"]))
3820  {
3821  $_SESSION["il_rep_mode"] = $_GET["set_mode"];
3822  if ($ilUser->getId() != ANONYMOUS_USER_ID)
3823  {
3824  $ilUser->writePref("il_rep_mode", $_GET["set_mode"]);
3825  }
3826  }
3827 
3828  // get user setting
3829  if ($_SESSION["il_rep_mode"] == "")
3830  {
3831  if ($ilUser->getId() != ANONYMOUS_USER_ID)
3832  {
3833  $_SESSION["il_rep_mode"] = $ilUser->getPref("il_rep_mode");
3834  }
3835  }
3836 
3837  // if nothing set, get default view
3838  if ($_SESSION["il_rep_mode"] == "")
3839  {
3840  $_SESSION["il_rep_mode"] = $ilSetting->get("default_repository_view");
3841  }
3842 
3843  $mode = ($_SESSION["il_rep_mode"] != "")
3844  ? $_SESSION["il_rep_mode"]
3845  : "flat";
3846 
3847  if ($mode == "tree")
3848  {
3849  include_once("./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3850  $exp = new ilRepositoryExplorerGUI($this, "showRepTree");
3851  if (!$exp->handleCommand())
3852  {
3853  $tpl->setLeftNavContent($exp->getHTML());
3854  }
3855  }
3856  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Repository explorer GUI class.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ showTreeFlatIcon()

ilContainerGUI::showTreeFlatIcon ( )

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

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

Referenced by prepareOutput().

365  {
366  global $tpl;
367 
368  // dont show icon, if role (permission gui->rolegui) is edited
369  if ($_GET["obj_id"] != "")
370  {
371  return;
372  }
373  // hide for member view
374  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
375  if(ilMemberViewSettings::getInstance()->isActive())
376  {
377  return;
378  }
379 
380  $mode = ($_SESSION["il_rep_mode"] == "flat")
381  ? "tree"
382  : "flat";
383  $link = "ilias.php?baseClass=ilRepositoryGUI&amp;cmd=frameset&amp;set_mode=".$mode."&amp;ref_id=".$this->object->getRefId();
384  $tpl->setTreeFlatIcon($link, $mode);
385  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_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 743 of file class.ilContainerGUI.php.

References $_SESSION, and $ilCtrl.

744  {
745  global $ilCtrl;
746 
747  $_SESSION["il_cntr_editor"] = "old";
748  $ilCtrl->redirect($this, "editPageFrame");
749  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18

◆ switchToStdEditorObject()

ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

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

References $_SESSION, and $ilCtrl.

733  {
734  global $ilCtrl;
735 
736  $_SESSION["il_cntr_editor"] = "std";
737  $ilCtrl->redirect($this, "editPageFrame");
738  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18

◆ trashObject()

ilContainerGUI::trashObject ( )

Show trash content of object.

public

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

References $_GET, and ilObjectGUI\$tpl.

3865  {
3866  global $tpl;
3867 
3868  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3869  $ru = new ilRepUtilGUI($this);
3870  $ru->showTrashTable($_GET["ref_id"]);
3871  }
$_GET["client_id"]
Repository GUI Utilities.

◆ undeleteObject()

ilContainerGUI::undeleteObject ( )

Get objects back from trash.

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

References $_GET, and $_POST.

3892  {
3893  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
3894  $ru = new ilRepUtilGUI($this);
3895  $ru->restoreObjects($_GET["ref_id"], $_POST["trash_id"]);
3896  $this->ctrl->redirect($this, "trash");
3897  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Repository GUI Utilities.

◆ useNewEditorObject()

ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

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

References $ilCtrl, ilObjectGUI\$lng, ilContainer\_writeContainerSetting(), and ilUtil\sendSuccess().

755  {
756  global $ilCtrl, $ilAccess, $lng, $ilCtrl;
757 
758  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
759  {
760  include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
761 
762  /* keep old page content for now...
763  $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
764  "xhtml_page");
765  if ($xpage_id)
766  {
767  $xpage = new ilXHTMLPage($xpage_id);
768  }
769  */
770 
771  ilContainer::_writeContainerSetting($this->object->getId(),
772  "xhtml_page", 0);
773 
774  ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
775  }
776 
777  $ilCtrl->redirect($this, "editPageFrame");
778  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
_writeContainerSetting($a_id, $a_keyword, $a_value)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $bl_cnt

ilContainerGUI::$bl_cnt = 1

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

◆ $multi_download_enabled

ilContainerGUI::$multi_download_enabled = false

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

Referenced by isMultiDownloadEnabled().


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