ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups 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.
executeCommand ()
 execute command note: this method is overwritten in all container objects
 forwardToStyleSheet ()
 Forward to style object.
forwardToPageObject ()
 forward command to page object
 addPageTabs ()
 Add page tabs.
 getContainerPageHTML ()
 Get container page HTML.
 prepareOutput ($a_show_subobjects=true)
 prepare output
 showTreeFlatIcon ()
 setTitleAndDescription ()
 called by prepare output
 showPossibleSubObjects ()
 show possible sub objects selection list
 getContentGUI ()
 Get content gui object.
 renderObject ()
 render the object
 setContentSubTabs ()
 Set content sub tabs.
 showAdministrationPanel (&$tpl)
 show administration panel
 __showTimingsButton (&$tpl)
 showPermanentLink (&$tpl)
 show permanent link
 switchToStdEditorObject ()
 Switch to standard page editor.
 switchToOldEditorObject ()
 Switch to old page editor.
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page)
 editPageFrameObject ()
 show page editor frameset
 editPageContentObject ()
 edit page content (for repository root node and categories)
 savePageContentObject ()
 cancelPageContentObject ()
 renderItemList ($a_type="all")
 showLinkListObject ()
 clearAdminCommandsDetermination ()
 cleaer administration commands determination
newBlockTemplate ()
 determin admin commands
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row
 resetRowType ()
 setPageEditorTabs ()
 Add page editor tabs.
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link.
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method
 enableAdministrationPanelObject ()
 enable administration panel
 disableAdministrationPanelObject ()
 enable administration panel
 editOrderObject ()
 Edit order.
 isActiveOrdering ()
 Check if ordering is enabled.
 addToDeskObject ()
 removeFromDeskObject ()
 lockObject ()
 cutObject ()
 cut object(s) out from a container and write the information to clipboard
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix
 clearObject ()
 clear clipboard and go back to last object
 performPasteIntoMultipleObjectsObject ()
 initAndDisplayLinkIntoMultipleObjectsObject ()
 showLinkIntoMultipleObjectsTreeObject ()
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent.
 initAndDisplayMoveIntoObjectObject ()
 showMoveIntoObjectTreeObject ()
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.
 clipboardObject ()
 show clipboard
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container
 isActiveAdministrationPanel ()
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 allowBlocksMoving ()
 Standard is to allow blocks moving.
 allowBlocksConfigure ()
 Standard is to allow blocks configuration.
 cloneWizardPageTreeObject ()
 public
 cloneWizardPageListObject ()
 public
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects.
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects.
 copyWizardHasOptions ($a_mode)
 public
 saveSortingObject ()
 Save Sorting.
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree.
 modifyItemGUI (&$a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container.
 editStylePropertiesObject ()
 Edit style properties.
 initStylePropertiesForm ()
 Init style properties form.
 createStyleObject ()
 Create Style.
 editStyleObject ()
 Edit Style.
 deleteStyleObject ()
 Delete Style.
 saveStyleSettingsObject ()
 Save style settings.
 getAsynchItemListObject ()
 Get item list command drop down asynchronously.
 redrawListItemObject ()
 Redraw a list item (ajax)
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.

Static Public Member Functions

static _buildPath ($a_ref_id, $a_course_ref_id)
 build path

Data Fields

 $bl_cnt = 1
- 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.
 afterUpdate ()
 Post (successful) object update hook.
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction.
 initFormPasswordInstruction ()
 Init password form.
 savePasswordObject ()
 Save password.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showUpperIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.

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:
class.ilContainerGUI.php 46360 2013-11-21 17:14:49Z akill

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

Member Function Documentation

ilContainerGUI::__showTimingsButton ( $tpl)

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

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

{
global $tree;
if(!$tree->checkForParentType($this->object->getRefId(),'crs'))
{
return false;
}
$tpl->setCurrentBlock("custom_button");
$tpl->setVariable("ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','editTimings'));
$tpl->setVariable("TXT_ADMIN_MODE",$this->lng->txt('timings_edit'));
$tpl->parseCurrentBlock();
return true;
}
static ilContainerGUI::_buildPath (   $a_ref_id,
  $a_course_ref_id 
)
static

build path

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

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

Referenced by ilObjCourseGUI\_modifyItemGUI().

{
global $tree;
$path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
$counter = 0;
foreach($path_arr as $data)
{
if($counter++)
{
$path .= " > ";
}
$path .= $data['title'];
}
return $path;
}

+ Here is the caller graph for this function:

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

References $title, and ilUtil\getImagePath().

Referenced by renderItemList().

{
$icon = ilUtil::getImagePath("icon_".$a_type.".gif");
$title = $this->lng->txt("objs_".$a_type);
if ($a_show_image)
{
$a_tpl->setCurrentBlock("container_header_row_image");
$a_tpl->setVariable("HEADER_IMG", $icon);
$a_tpl->setVariable("HEADER_ALT", $title);
}
else
{
$a_tpl->setCurrentBlock("container_header_row");
}
$a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

add message row

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

Referenced by renderItemList().

{
$this->cur_row_type = ($this->cur_row_type == "row_type_1")
? "row_type_2"
: "row_type_1";
$a_tpl->touchBlock($this->cur_row_type);
$type = $this->lng->txt("obj_".$a_type);
$a_message = str_replace("[type]", $type, $a_message);
$a_tpl->setVariable("ROW_NBSP", " ");
$a_tpl->setCurrentBlock("container_standard_row");
$a_tpl->setVariable("BLOCK_ROW_CONTENT",
$a_message);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the caller graph for this function:

ilContainerGUI::addPageTabs ( )

Add page tabs.

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

References $ilCtrl.

{
global $ilTabs, $ilCtrl;
$ilTabs->addTarget("obj_sty",
$ilCtrl->getLinkTarget($this, 'editStyleProperties'), "editStyleProperties");
}
ilContainerGUI::addStandardContainerSubTabs (   $a_include_view = true)

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

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

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

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

{
global $ilTabs, $ilAccess, $lng, $ilCtrl, $ilUser, $ilSetting;
if (!is_object($this->object))
{
return;
}
if ($a_include_view && $ilAccess->checkAccess("read", "", $this->object->getRefId()))
{
{
$ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, ""));
}
else
{
$ilTabs->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTarget($this, "disableAdministrationPanel"));
}
}
if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
($this->adminCommands ||
(is_object($this->object) &&
($ilAccess->checkAccess("write", "", $this->object->getRefId())))
||
(is_object($this->object) &&
($this->object->getHiddenFilesFound())) ||
$_SESSION["clipboard"]
)
)
{
{
$ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, ""));
}
else
{
$ilTabs->addSubTab("manage", $lng->txt("cntr_manage"), $ilCtrl->getLinkTarget($this, "enableAdministrationPanel"));
}
}
if ($ilUser->getId() != ANONYMOUS_USER_ID &&
is_object($this->object) &&
$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
$this->object->getOrderType() == ilContainer::SORT_MANUAL
)
{
$ilTabs->addSubTab("ordering", $lng->txt("cntr_ordering"), $ilCtrl->getLinkTarget($this, "editOrder"));
}
if ($ilUser->getId() != ANONYMOUS_USER_ID &&
is_object($this->object) &&
$ilAccess->checkAccess("write", "", $this->object->getRefId())
)
{
if ($ilSetting->get("enable_cat_page_edit"))
{
$ilTabs->addSubTab("page_editor", $lng->txt("cntr_text_media_editor"), $ilCtrl->getLinkTarget($this, "editPageFrame"),
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

Referenced by renderItemList().

{
$this->cur_row_type = ($this->cur_row_type == "row_type_1")
? "row_type_2"
: "row_type_1";
$a_tpl->touchBlock($this->cur_row_type);
$nbsp = true;
if ($this->ilias->getSetting("icon_position_in_lists") == "item_rows")
{
$icon = ilUtil::getImagePath("icon_".$a_image_type.".gif");
$alt = $this->lng->txt("obj_".$a_image_type);
// custom icon
if ($this->ilias->getSetting("custom_icons") &&
in_array($a_image_type, array("cat","grp","crs")))
{
require_once("./Services/Container/classes/class.ilContainer.php");
if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "")
{
$icon = $path;
}
}
$a_tpl->setCurrentBlock("block_row_image");
$a_tpl->setVariable("ROW_IMG", $icon);
$a_tpl->setVariable("ROW_ALT", $alt);
$a_tpl->parseCurrentBlock();
$nbsp = false;
}
{
$a_tpl->setCurrentBlock("block_row_check");
$a_tpl->setVariable("ITEM_ID", $a_item_ref_id);
$a_tpl->parseCurrentBlock();
$nbsp = false;
}
include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
{
$a_tpl->setCurrentBlock('block_position');
$a_tpl->setVariable('POS_TYPE',$a_image_type);
$a_tpl->setVariable('POS_ID',$a_item_ref_id);
$a_tpl->setVariable('POSITION',sprintf('%.1f',$this->current_position++));
$a_tpl->parseCurrentBlock();
}
if ($nbsp)
{
$a_tpl->setVariable("ROW_NBSP", " ");
}
$a_tpl->setCurrentBlock("container_standard_row");
$a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ilDesktopItemHandling.

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

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

{
global $ilSetting, $lng;
if((int)$ilSetting->get('disable_my_offers'))
{
return $this->renderObject();
}
include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
ilUtil::sendSuccess($lng->txt("added_to_desktop"));
$this->renderObject();
}

+ Here is the call graph for this function:

ilContainerGUI::afterUpdate ( )
protected

Post (successful) object update hook.

Reimplemented from ilObjectGUI.

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

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

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

{
// check if template is changed
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
$this->object->getRefId()
);
$new_tpl_id = (int) $this->getDidacticTemplateVar('dtpl');
if($new_tpl_id != $current_tpl_id)
{
$_REQUEST['tplid'] = $new_tpl_id;
// redirect to didactic template confirmation
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
$this->ctrl->setReturn($this,'edit');
$this->ctrl->setCmdClass('ildidactictemplategui');
$this->ctrl->setCmd('confirmTemplateSwitch');
$dtpl_gui = new ilDidacticTemplateGUI($this);
return $this->ctrl->forwardCommand($dtpl_gui);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::allowBlocksConfigure ( )

Standard is to allow blocks configuration.

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

{
true;
}
ilContainerGUI::allowBlocksMoving ( )

Standard is to allow blocks moving.

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

Referenced by setColumnSettings().

{
true;
}

+ Here is the caller graph for this function:

ilContainerGUI::cancelMoveLinkObject ( )

Cancel move|link empty clipboard and return to parent.

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

References $_SESSION, and $GLOBALS.

{
unset($_SESSION['clipboard']);
$GLOBALS['ilCtrl']->returnToParent($this);
}
ilContainerGUI::cancelPageContentObject ( )

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

{
$this->ctrl->redirect($this, "");
}
ilContainerGUI::clearAdminCommandsDetermination ( )

cleaer administration commands determination

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

Referenced by renderItemList().

{
$this->adminCommands = false;
}

+ Here is the caller graph for this function:

ilContainerGUI::clearObject ( )

clear clipboard and go back to last object

public

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

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

Referenced by pasteObject(), and performPasteIntoMultipleObjectsObject().

{
unset($_SESSION["clipboard"]);
unset($_SESSION["il_rep_clipboard"]);
//var_dump($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
// only redirect if clipboard was cleared
if (isset($_POST["cmd"]["clear"]))
{
ilUtil::sendSuccess($this->lng->txt("msg_clear_clipboard"),true);
//$this->ctrl->returnToParent($this);
//ilUtil::redirect($this->getReturnLocation("clear",$this->ctrl->getLinkTarget($this)),get_class($this));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::clipboardObject ( )

show clipboard

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

References $_SESSION, $ilErr, $ilLog, ilObjectGUI\$ref_id, ilObjectGUI\__showClipboardTable(), and ilObjectFactory\getInstanceByRefId().

{
global $ilErr,$ilLog;
// function should not be called if clipboard is empty
if (empty($_SESSION['clipboard']) or !is_array($_SESSION['clipboard']))
{
$message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
$ilLog->write($message,$ilLog->FATAL);
$ilErr->raiseError($this->lng->txt("permission_denied"),$ilErr->WARNING);
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.rep_clipboard.html");
// FORMAT DATA
$counter = 0;
$f_result = array();
foreach($_SESSION["clipboard"]["ref_ids"] as $ref_id)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($ref_id,false))
{
continue;
}
//$f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
$f_result[$counter][] = $this->lng->txt("obj_".$tmp_obj->getType());
$f_result[$counter][] = $tmp_obj->getTitle();
//$f_result[$counter][] = $tmp_obj->getDescription();
$f_result[$counter][] = ($_SESSION["clipboard"]["cmd"] == "cut") ? $this->lng->txt("move") :$this->lng->txt($_SESSION["clipboard"]["cmd"]);
unset($tmp_obj);
++$counter;
}
$this->__showClipboardTable($f_result, "clipboardObject");
return true;
}

+ Here is the call graph for this function:

ilContainerGUI::cloneAllObject ( )

Clone all object Overwritten method for copying container objects.

public

Reimplemented from ilObjectGUI.

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

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

{
global $ilLog;
include_once('classes/class.ilLink.php');
include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
global $ilAccess,$ilErr,$rbacsystem,$tree,$ilUser;
$new_type = $_REQUEST['new_type'];
$ref_id = (int) $_GET['ref_id'];
$clone_source = (int) $_REQUEST['clone_source'];
if(!$rbacsystem->checkAccess('create', $ref_id,$new_type))
{
$ilErr->raiseError($this->lng->txt('permission_denied'));
}
if(!$clone_source)
{
ilUtil::sendFailure($this->lng->txt('select_one'));
$this->createObject();
return false;
}
if(!$ilAccess->checkAccess('write','', $clone_source,$new_type))
{
$ilErr->raiseError($this->lng->txt('permission_denied'));
}
$options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
$orig = ilObjectFactory::getInstanceByRefId($clone_source);
$result = $orig->cloneAllObject($_COOKIE['PHPSESSID'], $_COOKIE['ilClientId'], $new_type, $ref_id, $clone_source, $options);
// Check if copy is in progress
if ($result == $ref_id)
{
ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"),true);
ilUtil::redirect('repository.php?ref_id='.$ref_id);
}
else
{
ilUtil::sendSuccess($this->lng->txt("object_duplicated"),true);
ilUtil::redirect('repository.php?ref_id='.$result);
}
}

+ Here is the call graph for this function:

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

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

Referenced by pasteObject().

{
global $tree;
global $ilias;
// clone the source node
$srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
error_log(__METHOD__.' cloning srcRef='.$srcRef.' dstRef='.$dstRef.'...');
$newRef = $srcObj->cloneObject($dstRef)->getRefId();
error_log(__METHOD__.' ...cloning... newRef='.$newRef.'...');
// We must immediately apply a new name to the object, to
// prevent confusion of WebDAV clients about having two objects with identical
// name in the repository.
if (! is_null($newName))
{
$newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
$newObj->setTitle($newName);
$newObj->update();
unset($newObj);
}
unset($srcObj);
$mapping[$newRef] = $srcRef;
// clone all children of the source node
$children = $tree->getChilds($srcRef);
foreach ($tree->getChilds($srcRef) as $child)
{
// Don't clone role folders, because it does not make sense to clone local roles
// FIXME - Maybe it does make sense (?)
if ($child["type"] != 'rolf')
{
$this->cloneNodes($child["ref_id"],$newRef,$mapping);
}
else
{
if (count($rolf = $tree->getChildsByType($newRef,"rolf")))
{
$mapping[$rolf[0]["ref_id"]] = $child["ref_id"];
}
}
}
error_log(__METHOD__.' ...cloned srcRef='.$srcRef.' dstRef='.$dstRef.' newRef='.$newRef);
return $newRef;
}

+ Here is the caller graph for this function:

ilContainerGUI::cloneWizardPageListObject ( )

public

Parameters

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

References cloneWizardPageObject().

{
$this->cloneWizardPageObject(false);
}

+ Here is the call graph for this function:

ilContainerGUI::cloneWizardPageObject (   $a_tree_view = true)

Show clone wizard page for container objects.

public

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

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

Referenced by cloneWizardPageListObject(), and cloneWizardPageTreeObject().

{
include_once('Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
global $ilObjDataCache,$tree;
if(!$_REQUEST['clone_source'])
{
ilUtil::sendFailure($this->lng->txt('select_one'));
if(isset($_SESSION['wizard_search_title']))
{
$this->searchCloneSourceObject();
}
else
{
$this->createObject();
}
return false;
}
$source_id = $_REQUEST['clone_source'];
$new_type = $_REQUEST['new_type'];
$this->ctrl->setParameter($this,'clone_source',(int) $_REQUEST['clone_source']);
$this->ctrl->setParameter($this,'new_type',$new_type);
// Generell JavaScript
$this->tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
$this->tpl->setVariable('BODY_ATTRIBUTES','onload="ilDisableChilds(\'cmd\');"');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.container_wizard_page.html');
$this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
$this->tpl->setVariable('TYPE_IMG',ilUtil::getImagePath('icon_'.$new_type.'.gif'));
$this->tpl->setVariable('ALT_IMG',$this->lng->txt('obj_'.$new_type));
$this->tpl->setVariable('TXT_DUPLICATE',$this->lng->txt($new_type.'_wizard_page'));
$this->tpl->setVariable('INFO_DUPLICATE',$this->lng->txt($new_type.'_copy_threads_info'));
$this->tpl->setVariable('BTN_COPY',$this->lng->txt('obj_'.$new_type.'_duplicate'));
$this->tpl->setVariable('BTN_BACK',$this->lng->txt('btn_back'));
if(isset($_SESSION['wizard_search_title']))
{
$this->tpl->setVariable('CMD_BACK','searchCloneSource');
}
else
{
$this->tpl->setVariable('CMD_BACK','create');
}
$this->tpl->setVariable('BTN_TREE',$this->lng->txt('treeview'));
$this->tpl->setVariable('BTN_LIST',$this->lng->txt('flatview'));
// Fill item rows
// tree view
if($a_tree_view)
{
$first = true;
$has_items = false;
foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),true) as $node)
{
if($first == true)
{
$first = false;
continue;
}
if($node['type'] == 'rolf')
{
continue;
}
$has_items = true;
for($i = $source_node['depth'];$i < $node['depth']; $i++)
{
$this->tpl->touchBlock('padding');
$this->tpl->touchBlock('end_padding');
}
// fill options
$copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$node['type']);
$copy_wizard_page->fillTreeSelection($node['ref_id'],$node['type'],$node['depth']);
$this->tpl->setCurrentBlock('tree_row');
$this->tpl->setVariable('TREE_IMG',ilUtil::getImagePath('icon_'.$node['type'].'_s.gif'));
$this->tpl->setVariable('TREE_ALT_IMG',$this->lng->txt('obj_'.$node['type']));
$this->tpl->setVariable('TREE_TITLE',$node['title']);
$this->tpl->parseCurrentBlock();
}
if(!$has_items)
{
$this->tpl->setCurrentBlock('no_content');
$this->tpl->setVariable('TXT_NO_CONTENT',$this->lng->txt('container_no_items'));
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock('tree_footer');
$this->tpl->setVariable('TXT_COPY_ALL',$this->lng->txt('copy_all'));
$this->tpl->setVariable('TXT_LINK_ALL',$this->lng->txt('link_all'));
$this->tpl->setVariable('TXT_OMIT_ALL',$this->lng->txt('omit_all'));
$this->tpl->parseCurrentBlock();
}
}
else
{
foreach($tree->getSubTreeTypes($source_id,array('rolf','crs')) as $type)
{
$copy_wizard_page = ilCopyWizardPageFactory::_getInstanceByType($source_id,$type);
if(strlen($html = $copy_wizard_page->getWizardPageBlockHTML()))
{
$this->tpl->setCurrentBlock('obj_row');
$this->tpl->setVariable('ITEM_BLOCK',$html);
$this->tpl->parseCurrentBlock();
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::cloneWizardPageTreeObject ( )

public

Parameters

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

References cloneWizardPageObject().

{
$this->cloneWizardPageObject(true);
}

+ Here is the call graph for this function:

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$ref_id, $title, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObjectGUI\getTitlesByRefId(), ilUtil\sendFailure(), and ilUtil\sendInfo().

{
global $ilAccess,$ilObjDefinition;
if(!$ilAccess->checkAccess('copy','',$_GET['item_ref_id']))
{
ilUtil::sendFailure($this->lng->txt('msg_no_perm_copy').' '.$title,true);
$this->ctrl->returnToParent($this);
}
$_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
$_SESSION["clipboard"]["cmd"] = 'copy';
ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"),true);
return $this->initAndDisplayCopyIntoObjectObject();
// FOR ALL OBJECTS THAT SHOULD BE COPIED
foreach ($_POST["id"] as $ref_id)
{
// GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
$node_data = $this->tree->getNodeData($ref_id);
$subtree_nodes = $this->tree->getSubTree($node_data);
$all_node_data[] = $node_data;
$all_subtree_nodes[] = $subtree_nodes;
// CHECK VIEW, READ AND COPY PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
foreach ($subtree_nodes as $node)
{
if($node['type'] == 'rolf')
{
continue;
}
if (!$rbacsystem->checkAccess('visible,read,copy',$node["ref_id"]))
{
$no_copy[] = $node["ref_id"];
}
}
}
// IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'view,read'
if (count($no_copy))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_copy")." ".implode(',',$this->getTitlesByRefId($no_copy)),
$this->ilias->error_obj->MESSAGE);
}
$_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
$_SESSION["clipboard"]["cmd"] = ($_GET["cmd"] != "" && $_GET["cmd"] != "post")
? $_GET["cmd"]
: key($_POST["cmd"]);
$_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
ilUtil::sendInfo($this->lng->txt("msg_copy_clipboard"),true);
$this->ctrl->returnToParent($this);
} // END COPY

+ Here is the call graph for this function:

ilContainerGUI::copyWizardHasOptions (   $a_mode)

public

Parameters

Reimplemented from ilObjectGUI.

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

{
switch($a_mode)
{
case self::COPY_WIZARD_NEEDS_PAGE:
return true;
default:
return false;
}
}
ilContainerGUI::createStyleObject ( )

Create Style.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
}
ilContainerGUI::cutObject ( )

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

public

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

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

{
global $rbacsystem, $ilCtrl;
if ($_GET["item_ref_id"] != "")
{
$_POST["id"] = array($_GET["item_ref_id"]);
}
//$this->ilias->raiseError("move operation does not work at the moment and is disabled",$this->ilias->error_obj->MESSAGE);
//echo "CUT";
//echo $_SESSION["referer"];
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// FOR ALL OBJECTS THAT SHOULD BE COPIED
foreach ($_POST["id"] as $ref_id)
{
// GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
$node_data = $this->tree->getNodeData($ref_id);
$subtree_nodes = $this->tree->getSubTree($node_data);
$all_node_data[] = $node_data;
$all_subtree_nodes[] = $subtree_nodes;
// CHECK DELETE PERMISSION OF ALL OBJECTS IN ACTUAL SUBTREE
foreach ($subtree_nodes as $node)
{
if($node['type'] == 'rolf')
{
continue;
}
if (!$rbacsystem->checkAccess('delete',$node["ref_id"]))
{
$no_cut[] = $node["ref_id"];
}
}
}
// IF THERE IS ANY OBJECT WITH NO PERMISSION TO 'delete'
if (count($no_cut))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_cut")." ".implode(',',$this->getTitlesByRefId($no_cut)),
$this->ilias->error_obj->MESSAGE);
}
//echo "GET";var_dump($_GET);echo "POST";var_dump($_POST);
$_SESSION["clipboard"]["parent"] = $_GET["ref_id"];
$_SESSION["clipboard"]["cmd"] = $ilCtrl->getCmd();
//echo "-".$clipboard["cmd"]."-";
$_SESSION["clipboard"]["ref_ids"] = $_POST["id"];
//echo "-".$_SESSION["clipboard"]["cmd"]."-";
ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"),true);
} // END CUT

+ Here is the call graph for this function:

ilContainerGUI::deleteStyleObject ( )

Delete Style.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
}
ilContainerGUI::disableAdministrationPanelObject ( )

enable administration panel

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

References $_SESSION.

Referenced by clearObject().

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

+ Here is the caller graph for this function:

ilContainerGUI::editOrderObject ( )

Edit order.

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

References $_SESSION, and renderObject().

{
global $ilTabs;
$this->edit_order = true;
$_SESSION["il_cont_admin_panel"] = false;
$this->renderObject();
$ilTabs->activateSubTab("ordering");
}

+ Here is the call graph for this function:

ilContainerGUI::editPageContentObject ( )

edit page content (for repository root node and categories)

public

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

{
global $rbacsystem, $tpl, $lng, $ilCtrl;
if (!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id > 0)
{
include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
$xpage = new ilXHTMLPage($xpage_id);
$content = $xpage->getContent();
}
// get template
$tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.container_edit_page_content.html",
"Services/Container");
$tpl->setVariable("VAL_CONTENT", ilUtil::prepareFormOutput($content));
$tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tpl->setVariable("TXT_EDIT_PAGE_CONTENT",
$this->lng->txt("edit_page_content"));
$tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$tpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_old_editor_warning"));
$tpl->setVariable("TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt("cntr_old_editor_open_standard_editor"));
$tpl->setVariable("IMG_WARNING", ilUtil::getImagePath("icon_alert_s.gif"));
$tpl->setVariable("HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, "switchToStdEditor"));
$tpl->setVariable("ALT_WARNING", $lng->txt("warning"));
include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
//$ta = new ilTextAreaInputGUI();
//$tags = $ta->getRteTagSet("extended_table_img");
// add rte support
include_once "./Services/RTE/classes/class.ilRTE.php";
$rtestring = ilRTE::_getRTEClassname();
include_once "./Services/RTE/classes/class.$rtestring.php";
$rte = new $rtestring();
//$rte->addPlugin("latex");
include_once "./classes/class.ilObject.php";
$obj_type = ilObject::_lookupType($_GET["ref_id"], TRUE);
$rte->addRTESupport($obj_id, $obj_type);
//$rte->setStyleSelect(true);
//$rte->addCustomRTESupport($obj_id, $obj_type, $tags);
}

+ Here is the call graph for this function:

ilContainerGUI::editPageFrameObject ( )

show page editor frameset

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

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

{
include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
$fs_gui = new ilFramesetGUI();
$fs_gui->setFramesetTitle($this->object->getTitle());
$fs_gui->setMainFrameName("content");
$fs_gui->setSideFrameName("tree");
// old tiny stuff
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id > 0 && $_SESSION["il_cntr_editor"] != "std")
{
$fs_gui->setMainFrameSource(
$this->ctrl->getLinkTarget(
$this, "editPageContent"));
$fs_gui->setSideFrameSource(
$this->ctrl->getLinkTarget($this, "showLinkList"));
}
else
{
$this->ctrl->redirectByClass(array("ilpageobjectgui"), "edit");
}
$fs_gui->show();
}

+ Here is the call graph for this function:

ilContainerGUI::editStyleObject ( )

Edit Style.

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

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
}
ilContainerGUI::editStylePropertiesObject ( )

Edit style properties.

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

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

{
global $ilTabs, $tpl;
$this->checkPermission("write");
$tpl->setContent($this->form->getHTML());
$ilTabs->activateTab("obj_sty");
}

+ Here is the call graph for this function:

ilContainerGUI::enableAdministrationPanelObject ( )

enable administration panel

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

References $_SESSION.

{
$_SESSION["il_cont_admin_panel"] = true;
$this->ctrl->redirect($this, "render");
}
& ilContainerGUI::executeCommand ( )

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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, ilObjiLincCourseGUI, ilObjRootFolderGUI, ilObjFolderGUI, ilObjRecoveryFolderGUI, ilObjCategoryGUI, and ilObjGroupGUI.

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

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

{
global $tpl;
$next_class = $this->ctrl->getNextClass();
$cmd = $this->ctrl->getCmd("render");
switch($next_class)
{
// page editing
case "ilpageobjectgui":
if ($_GET["redirectSource"] != "ilinternallinkgui")
{
$tpl->setContent($ret);
}
else
{
return "";
}
break;
case "ilobjstylesheetgui":
break;
default:
$this->prepareOutput();
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

& ilContainerGUI::forwardToPageObject ( )

forward command to page object

Definition at line 168 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(), ilObjStyleSheet\getSyntaxStylePath(), and ilPageObject\setParentId().

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

{
global $lng, $ilTabs, $ilCtrl;
$cmd = $ilCtrl->getCmd();
if (in_array($cmd, array("displayMediaFullscreen", "downloadFile")))
{
$this->checkPermission("read");
}
else
{
$this->checkPermission("write");
}
$ilTabs->clearTargets();
if ($_GET["redirectSource"] == "ilinternallinkgui")
{
}
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id > 0)
{
$ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
$ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
}
else
{
$ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
$this->object->getRefId(), "_top");
}
// page object
include_once("./Services/COPage/classes/class.ilPageObject.php");
include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
$lng->loadLanguageModule("content");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
//echo "-".ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())."-";
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
if (!ilPageObject::_exists($this->object->getType(),
$this->object->getId()))
{
// doesn't exist -> create new one
$new_page_object = new ilPageObject($this->object->getType());
$new_page_object->setParentId($this->object->getId());
$new_page_object->setId($this->object->getId());
$new_page_object->createFromXML();
}
// get page object
// $page_object = new ilPageObject($this->object->getType(),
// $this->object->getId(), 0, true);
$this->ctrl->setReturnByClass("ilpageobjectgui", "edit");
//$page_object =& $this->obj->getPageObject();
// $page_object->buildDom();
//$page_object->addUpdateListener($this, "updateHistory");
// $int_links = $page_object->getInternalLinks();
//$link_xml = $this->getLinkXML($int_links);
$page_gui =& new ilPageObjectGUI($this->object->getType(),
$this->object->getId());
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->object->getStyleSheetId(), $this->object->getType()));
//echo "--".$this->object->getStyleSheetId()."-";
// $view_frame = ilFrameTargetInfo::_getFrame("MainContent");
//$page_gui->setViewPageLink(ILIAS_HTTP_PATH."/goto.php?target=pg_".$this->obj->getId(),
// $view_frame);
$page_gui->setIntLinkHelpDefault("RepositoryItem", $_GET["ref_id"]);
$page_gui->setTemplateTargetVar("ADM_CONTENT");
$page_gui->setLinkXML($link_xml);
//$page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
$page_gui->setFileDownloadLink("");
$page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
//$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
// $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this, ""));
$page_gui->setPresentationTitle("");
$page_gui->setTemplateOutput(false);
//$page_gui->setLocator($contObjLocator);
$page_gui->setHeader("");
$page_gui->setEnabledRepositoryObjects(true);
$page_gui->setEnabledFileLists(false);
$page_gui->setEnabledMaps(true);
$page_gui->setEnabledPCTabs(true);
$page_gui->setEnabledInternalLinks(true);
// old editor information text
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id > 0)
{
$wtpl = new ilTemplate("tpl.cntr_old_editor_message.html", true,
true, "Services/Container");
$wtpl->setVariable("ALT_WARNING", $lng->txt("warning"));
$wtpl->setVariable("IMG_WARNING",
ilUtil::getImagePath("icon_alert_s.gif"));
$wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
$wtpl->setVariable("TXT_MIGRATION_INFO", $lng->txt("cntr_switch_to_new_editor_message"));
$wtpl->setVariable("HREF_SWITCH_TO_NEW_EDITOR",
$ilCtrl->getLinkTarget($this, "useNewEditor"));
$wtpl->setVariable("TXT_MIGRATION_SWITCH",
$lng->txt("cntr_switch_to_new_editor_cmd"));
$page_gui->setPrependingHtml($wtpl->get());
}
// style tab
$page_gui->setTabHook($this, "addPageTabs");
$ret =& $this->ctrl->forwardCommand($page_gui);
//$ret =& $page_gui->executeCommand();
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::forwardToStyleSheet ( )

Forward to style object.

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

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

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

{
global $ilCtrl, $ilTabs;
$ilTabs->clearTargets();
$cmd = $ilCtrl->getCmd();
include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
$this->ctrl->setReturn($this, "editStyleProperties");
$style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
$style_gui->omitLocator();
if ($cmd == "create" || $_GET["new_type"]=="sty")
{
$style_gui->setCreationMode(true);
}
if ($cmd == "confirmedDelete")
{
$this->object->setStyleSheetId(0);
$this->object->update();
}
$ret = $this->ctrl->forwardCommand($style_gui);
if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
{
$style_id = $ret;
$this->object->setStyleSheetId($style_id);
$this->object->update();
$this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::getAsynchItemListObject ( )

Get item list command drop down asynchronously.

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

{
global $ilCtrl;
$ref_id = $_GET["cmdrefid"];
// this should be done via container-object->getSubItem in the future
$data = array("child" => $ref_id, "ref_id" => $ref_id, "obj_id" => $obj_id,
"type" => $type);
include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
$item_list_gui->setContainerObject($this);
$item_list_gui->enableComments(true);
$item_list_gui->enableNotes(true);
$item_list_gui->enableTags(true);
$this->modifyItemGUI($item_list_gui, $data, false);
$html = $item_list_gui->getListItemHTML($ref_id,
$obj_id, "", "", true, true);
// include plugin slot for async item list
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->getHTML("Services/Container", "async_item_list", array("html" => $html));
if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
{
$html = $gui_class->modifyHTML($html, $resp);
}
}
echo $html;
}

+ Here is the call graph for this function:

ilContainerGUI::getContainerPageHTML ( )

Get container page HTML.

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

References $_GET, $ilSetting, $ret, ilPageUtil\_existsAndNotEmpty(), ilContainer\_lookupContainerSetting(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by renderItemList().

{
global $ilSetting;
if (!$ilSetting->get("enable_cat_page_edit"))
{
return;
}
// old page editor content
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id > 0)
{
include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
$xpage = new ilXHTMLPage($xpage_id);
return $xpage->getContent();
}
// page object
// if page does not exist, return nothing
include_once("./Services/COPage/classes/class.ilPageUtil.php");
if (!ilPageUtil::_existsAndNotEmpty($this->object->getType(),
$this->object->getId()))
{
return "";
}
include_once("./Services/COPage/classes/class.ilPageObject.php");
include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
// get page object
$page_gui =& new ilPageObjectGUI($this->object->getType(),
$this->object->getId());
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->object->getStyleSheetId(), $this->object->getType()));
$page_gui->setIntLinkHelpDefault("StructureObject", $_GET["ref_id"]);
$page_gui->setFileDownloadLink("");
//$page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
//$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
// $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this, ""));
$page_gui->setPresentationTitle("");
$page_gui->setTemplateOutput(false);
//$page_gui->setLocator($contObjLocator);
$page_gui->setHeader("");
$page_gui->setEnabledRepositoryObjects(true);
$page_gui->setEnabledFileLists(false);
$page_gui->setEnabledPCTabs(true);
$page_gui->setEnabledMaps(true);
$ret = $page_gui->showPage();
//$ret =& $page_gui->executeCommand();
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::getContentGUI ( )

Get content gui object.

Parameters
@return

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

{
switch ($this->object->getViewMode())
{
// all items in one block
include_once("./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
$container_view = new ilContainerSimpleContentGUI($this);
break;
include_once('./Services/Container/classes/class.ilContainerObjectiveGUI.php');
$container_view = new ilContainerObjectiveGUI($this);
break;
// all items in one block
case IL_CRS_VIEW_TIMING: // not nice this workaround
include_once("./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
$container_view = new ilContainerSessionsContentGUI($this);
break;
// ILinc courses
include_once 'Services/Container/classes/class.ilContainerILincContentGUI.php';
$container_view = new ilContainerILincContentGUI($this);
break;
// all items in one block
default:
include_once("./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
$container_view = new ilContainerByTypeContentGUI($this);
break;
}
return $container_view;
}

+ Here is the caller graph for this function:

ilContainerGUI::getEditFormValues ( )
protected

Get values for edit form.

Returns
array

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, ilObjCategoryGUI, and ilObjRootFolderGUI.

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

{
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
$values['didactic_type'] =
'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
return $values;
}
ilContainerGUI::getTabs ( $tabs_gui)

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

Reimplemented from ilObjectGUI.

Reimplemented in ilObjCourseGUI, ilObjGroupGUI, ilObjFolderGUI, ilObjiLincCourseGUI, ilObjCategoryGUI, and ilObjRootFolderGUI.

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

References $_SESSION, and $ilCtrl.

{
global $rbacsystem, $ilCtrl;
// edit permissions
if ($rbacsystem->checkAccess('edit_permission',$this->ref_id))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
array("perm","info","owner"), 'ilpermissiongui');
if ($ilCtrl->getNextClass() == "ilpermissiongui")
{
$tabs_gui->activateTab("perm_settings");
}
}
// show clipboard
if ($this->ctrl->getTargetScript() == "repository.php" and !empty($_SESSION["clipboard"]))
{
$tabs_gui->addTarget("clipboard",
$this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
}
}
ilContainerGUI::ilContainerGUI (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor public.

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

{
global $rbacsystem, $lng, $tree;
$this->rbacsystem =& $rbacsystem;
$lng->loadLanguageModule("cntr");
//$this->ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
// Activate tree cache when rendering the container to improve performance
//$tree->useCache(false);
// prepare output things should generally be made in executeCommand
// method (maybe dependent on current class/command
$this->ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::initAndDisplayLinkIntoMultipleObjectsObject ( )

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

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

Referenced by linkObject().

{
global $tree;
// empty session on init
$_SESSION['paste_linked_repexpand'] = array();
// copy opend nodes from repository explorer
$_SESSION['paste_linked_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
// open current position
$path = $tree->getPathId((int)$_GET['ref_id']);
foreach((array)$path as $node_id)
{
if(!in_array($node_id, $_SESSION['paste_linked_repexpand']))
$_SESSION['paste_linked_repexpand'][] = $node_id;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::initAndDisplayMoveIntoObjectObject ( )

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

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

Referenced by cutObject().

{
global $tree;
// empty session on init
$_SESSION['paste_cut_repexpand'] = array();
// copy opend nodes from repository explorer
$_SESSION['paste_cut_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
// open current position
$path = $tree->getPathId((int)$_GET['ref_id']);
foreach((array)$path as $node_id)
{
if(!in_array($node_id, $_SESSION['paste_cut_repexpand']))
$_SESSION['paste_cut_repexpand'][] = $node_id;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::initFormPasswordInstruction ( )
protected

Init password form.

Returns

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

References ilFormPropertyGUI\setRequired().

Referenced by savePasswordObject(), and showPasswordInstructionObject().

{
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this));
// new password
$ipass = new ilPasswordInputGUI($this->lng->txt("desired_password"), "new_password");
$ipass->setRequired(true);
$this->form->addItem($ipass);
$this->form->addCommandButton("savePassword", $this->lng->txt("save"));
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
$this->form->setTitle($this->lng->txt("chg_ilias_and_webfolder_password"));
$this->form->setFormAction($this->ctrl->getFormAction($this));
return $this->form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::initStylePropertiesForm ( )

Init style properties form.

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

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

Referenced by editStylePropertiesObject().

{
global $ilCtrl, $lng, $ilTabs, $ilSetting, $tpl;
$tpl->setTreeFlatIcon("", "");
$ilTabs->clearTargets();
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id > 0)
{
$ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"),
$ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
}
else
{
$ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=".$this->object->getType()."_".
$this->object->getRefId(), "_top");
}
include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
$page_gui =& new ilPageObjectGUI($this->object->getType(),
$this->object->getId());
$page_gui->setStyleId($this->object->getStyleSheetId());
$page_gui->setTabHook($this, "addPageTabs");
// $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.gif"));
// $tpl->setTitle($this->lng->txt("page").": ".$this->obj->getTitle());
$ilCtrl->getHTML($page_gui);
$ilTabs->setTabActive("obj_sty");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$lng->loadLanguageModule("style");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$fixed_style = $ilSetting->get("fixed_content_style_id");
$style_id = $this->object->getStyleSheetId();
if ($fixed_style > 0)
{
$st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
$st->setValue(ilObject::_lookupTitle($fixed_style)." (".
$this->lng->txt("global_fixed").")");
$this->form->addItem($st);
}
else
{
$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
$_GET["ref_id"]);
$st_styles[0] = $this->lng->txt("default");
ksort($st_styles);
if ($style_id > 0)
{
// individual style
{
$st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
$st->setValue(ilObject::_lookupTitle($style_id));
$this->form->addItem($st);
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
// delete command
$this->form->addCommandButton("editStyle",
$lng->txt("style_edit_style"));
$this->form->addCommandButton("deleteStyle",
$lng->txt("style_delete_style"));
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
}
}
if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
{
$style_sel = ilUtil::formSelect ($style_id, "style_id",
$st_styles, false, true);
$style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
$style_sel->setOptions($st_styles);
$style_sel->setValue($style_id);
$this->form->addItem($style_sel);
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
$this->form->addCommandButton("saveStyleSettings",
$lng->txt("save"));
$this->form->addCommandButton("createStyle",
$lng->txt("sty_create_ind_style"));
}
}
$this->form->setTitle($lng->txt("obj_sty"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::isActiveAdministrationPanel ( )

Reimplemented in ilObjiLincCourseGUI.

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

References $_SESSION.

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

{
return $_SESSION["il_cont_admin_panel"];
}

+ Here is the caller graph for this function:

ilContainerGUI::isActiveOrdering ( )

Check if ordering is enabled.

Returns
bool

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

{
return $this->edit_order ? true : false;
}
ilContainerGUI::linkObject ( )

create an new reference of an object in tree it's like a hard link of unix

public

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

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

{
global $clipboard, $rbacsystem, $rbacadmin, $ilCtrl;
if ($_GET["item_ref_id"] != "")
{
$_POST["id"] = array($_GET["item_ref_id"]);
}
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// CHECK ACCESS
foreach ($_POST["id"] as $ref_id)
{
if (!$rbacsystem->checkAccess('delete',$ref_id))
{
$no_cut[] = $ref_id;
}
$object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
if (!$this->objDefinition->allowLink($object->getType()))
{
$no_link[] = $object->getType();
}
}
// NO ACCESS
if (count($no_cut))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_link")." ".
implode(',',$no_cut),$this->ilias->error_obj->MESSAGE);
}
if (count($no_link))
{
$no_link = array_unique($no_link);
foreach ($no_link as $type)
{
$txt_objs[] = $this->lng->txt("objs_".$type);
}
$this->ilias->raiseError(implode(', ',$txt_objs)." ".$this->lng->txt("msg_obj_no_link"),$this->ilias->error_obj->MESSAGE);
//$this->ilias->raiseError($this->lng->txt("msg_not_possible_link")." ".
// implode(',',$no_link),$this->ilias->error_obj->MESSAGE);
}
// WRITE TO CLIPBOARD
$clipboard["parent"] = $_GET["ref_id"];
$clipboard["cmd"] = $ilCtrl->getCmd();
foreach ($_POST["id"] as $ref_id)
{
$clipboard["ref_ids"][] = $ref_id;
}
$_SESSION["clipboard"] = $clipboard;
ilUtil::sendInfo($this->lng->txt("msg_link_clipboard"),true);
} // END LINK

+ Here is the call graph for this function:

ilContainerGUI::lockObject ( )

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

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

{
global $tree, $ilUser, $rbacsystem;
if (!$rbacsystem->checkAccess("write",$_GET['item_ref_id']))
{
$this->ilErr->raiseError($this->lng->txt('err_no_permission'),$this->ilErr->MESSAGE);
}
require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
{
require_once 'Services/WebDAV/classes/class.ilDAVLocks.php';
$locks = new ilDAVLocks();
$result = $locks->lockRef($_GET['item_ref_id'],
$ilUser->getId(), $ilUser->getLogin(),
'ref_'.$_GET['item_ref_id'].'_usr_'.$ilUser->getId(),
time() + /*30*24*60**/60, 0, 'exclusive'
);
$this->lng->txt(
($result === true) ? 'object_locked' : $result
),
true);
}
$this->renderObject();
}

+ Here is the call graph for this function:

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

Modify Item ListGUI for presentation in container.

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

References ilObjectGUI\$lng.

Referenced by getAsynchItemListObject().

{
global $lng;
if($a_show_path)
{
$a_item_list_gui->addCustomProperty($lng->txt('path'),
ilContainer_buildPath($a_item_data['ref_id'], $this->object->getRefId()),
false, true);
}
}

+ Here is the caller graph for this function:

& ilContainerGUI::newBlockTemplate ( )

determin admin commands

returns a new list block template

private

Returns
object block template

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

References ilObjectGUI\$tpl.

Referenced by renderItemList().

{
$tpl = new ilTemplate ("tpl.container_list_block.html", true, true,
"Services/Container");
$this->cur_row_type = "row_type_1";
return $tpl;
}

+ Here is the caller graph for this function:

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

References $_GET, $_SESSION, ilObjectGUI\$lng, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilObjFileAccess\_appendNumberOfCopyToFilename(), ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordReadEvent(), ilChangeEvent\_recordWriteEvent(), clearObject(), cloneNodes(), and ilUtil\sendSuccess().

{
global $rbacsystem, $rbacadmin, $rbacreview, $log,$tree;
global $ilUser, $lng;
// BEGIN ChangeEvent: Record paste event.
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
// END ChangeEvent: Record paste event.
//var_dump($_SESSION["clipboard"]);exit;
if (!in_array($_SESSION["clipboard"]["cmd"],array("cut","link","copy")))
{
$message = get_class($this)."::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
$this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
}
// this loop does all checks
foreach ($_SESSION["clipboard"]["ref_ids"] as $ref_id)
{
$obj_data =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
// CHECK ACCESS
if (!$rbacsystem->checkAccess('create',$this->object->getRefId(), $obj_data->getType()))
{
$no_paste[] = $ref_id;
$no_paste_titles[] = $obj_data->getTitle();
}
// CHECK IF REFERENCE ALREADY EXISTS
if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
{
$exists[] = $ref_id;
break;
}
// CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
{
$is_child[] = $ref_id;
}
// CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
$obj_type = $obj_data->getType();
if (!in_array($obj_type, array_keys($this->objDefinition->getSubObjects($this->object->getType()))))
{
$not_allowed_subobject[] = $obj_data->getType();
}
}
// process checking results
// BEGIN WebDAV: Copying an object into the same container is allowed
if (count($exists) && $_SESSION["clipboard"]["cmd"] != "copy")
// END WebDAV: Copying an object into the same container is allowed
{
$this->ilias->raiseError($this->lng->txt("msg_obj_exists"),$this->ilias->error_obj->MESSAGE);
}
if (count($is_child))
{
$this->ilias->raiseError($this->lng->txt("msg_not_in_itself")." ".implode(',',$is_child),
$this->ilias->error_obj->MESSAGE);
}
if (count($not_allowed_subobject))
{
$this->ilias->raiseError($this->lng->txt("msg_may_not_contain")." ".implode(',',$not_allowed_subobject),
$this->ilias->error_obj->MESSAGE);
}
if (count($no_paste))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_paste")." ".
implode(',',$no_paste),$this->ilias->error_obj->MESSAGE);
}
// log pasteObject call
$log->write("ilObjectGUI::pasteObject(), cmd: ".$_SESSION["clipboard"]["cmd"]);
// everything ok: now paste the objects to new location
// to prevent multiple actions via back/reload button
$ref_ids = $_SESSION["clipboard"]["ref_ids"];
unset($_SESSION["clipboard"]["ref_ids"]);
// BEGIN WebDAV: Support a copy command in the repository
// process COPY command
if ($_SESSION["clipboard"]["cmd"] == "copy")
{
foreach($ref_ids as $ref_id)
{
$revIdMapping = array();
$oldNode_data = $tree->getNodeData($ref_id);
if ($oldNode_data['parent'] == $this->object->getRefId())
{
require_once 'Modules/File/classes/class.ilObjFileAccess.php';
$newTitle = ilObjFileAccess::_appendNumberOfCopyToFilename($oldNode_data['title'],null);
$newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
}
else
{
$newRef = $this->cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
}
// BEGIN ChangeEvent: Record copy event.
$old_parent_data = $tree->getParentNodeData($ref_id);
$newNode_data = $tree->getNodeData($newRef);
ilChangeEvent::_recordReadEvent($oldNode_data['type'], $ref_id,
$oldNode_data['obj_id'], $ilUser->getId());
ilChangeEvent::_recordWriteEvent($newNode_data['obj_id'], $ilUser->getId(), 'add',
$this->object->getId());
ilChangeEvent::_catchupWriteEvents($newNode_data['obj_id'], $ilUser->getId());
// END ChangeEvent: Record copy event.
}
$log->write("ilObjectGUI::pasteObject(), copy finished");
}
// END WebDAV: Support a Copy command in the repository
// process CUT command
if ($_SESSION["clipboard"]["cmd"] == "cut")
{
foreach($ref_ids as $ref_id)
{
// Store old parent
$old_parent = $tree->getParentId($ref_id);
$this->tree->moveTree($ref_id,$this->object->getRefId());
$rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
// BEGIN ChangeEvent: Record cut event.
$node_data = $tree->getNodeData($ref_id);
$old_parent_data = $tree->getNodeData($old_parent);
ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
$old_parent_data['obj_id']);
ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
$this->object->getId());
ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
// END PATCH ChangeEvent: Record cut event.
}
} // END CUT
// process LINK command
if ($_SESSION["clipboard"]["cmd"] == "link")
{
foreach ($ref_ids as $ref_id)
{
// get node data
$top_node = $this->tree->getNodeData($ref_id);
// get subnodes of top nodes
$subnodes[$ref_id] = $this->tree->getSubtree($top_node);
}
// now move all subtrees to new location
foreach ($subnodes as $key => $subnode)
{
// first paste top_node....
$obj_data =& $this->ilias->obj_factory->getInstanceByRefId($key);
$new_ref_id = $obj_data->createReference();
$obj_data->putInTree($_GET["ref_id"]);
$obj_data->setPermissions($_GET["ref_id"]);
// BEGIN ChangeEvent: Record link event.
$node_data = $tree->getNodeData($new_ref_id);
ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
$this->object->getId());
ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
// END PATCH ChangeEvent: Record link event.
}
$log->write("ilObjectGUI::pasteObject(), link finished");
// inform other objects in hierarchy about link operation
//$this->object->notify("link",$this->object->getRefId(),$_SESSION["clipboard"]["parent_non_rbac_id"],$this->object->getRefId(),$subnodes);
} // END LINK
// save cmd for correct message output after clearing the clipboard
$last_cmd = $_SESSION["clipboard"]["cmd"];
// clear clipboard
$this->clearObject();
if ($last_cmd == "cut")
{
ilUtil::sendSuccess($this->lng->txt("msg_cut_copied"),true);
}
// BEGIN WebDAV: Support a copy command in repository
else if ($last_cmd == "copy")
{
ilUtil::sendSuccess($this->lng->txt("msg_cloned"),true);
}
else if ($last_command == 'link')
// END WebDAV: Support copy command in repository
{
ilUtil::sendSuccess($this->lng->txt("msg_linked"),true);
}
$this->ctrl->returnToParent($this);
} // END PASTE

+ Here is the call graph for this function:

ilContainerGUI::performPasteIntoMultipleObjectsObject ( )

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

References $_POST, $_SESSION, $log, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilConditionHandler\_adjustMovedObjectConditions(), ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), clearObject(), ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), ilRbacLog\isActive(), ilRbacLog\LINK_OBJECT, ilUtil\sendFailure(), ilUtil\sendSuccess(), showLinkIntoMultipleObjectsTreeObject(), and showMoveIntoObjectTreeObject().

{
global $rbacsystem, $rbacadmin, $rbacreview, $log, $tree, $ilObjDataCache, $ilUser;
if(!in_array($_SESSION['clipboard']['cmd'], array('cut', 'link')))
{
$message = __METHOD__.": cmd was neither 'cut' nor 'link'; may be a hack attempt!";
$this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
}
if($_SESSION['clipboard']['cmd'] == 'cut')
{
if(isset($_POST['node']) && (int)$_POST['node'])
$_POST['nodes'] = array($_POST['node']);
}
if(!is_array($_POST['nodes']) || !count($_POST['nodes']))
{
ilUtil::sendFailure($this->lng->txt('select_at_least_one_object'));
if($_SESSION['clipboard']['cmd'] == 'cut')
else
return;
}
// this loop does all checks
$folder_objects_cache = array();
foreach($_SESSION['clipboard']['ref_ids'] as $ref_id)
{
$current_parent_id = $tree->getParentId($obj_data->getRefId());
foreach($_POST['nodes'] as $folder_ref_id)
{
if(!array_key_exists($folder_ref_id, $folder_objects_cache))
{
$folder_objects_cache[$folder_ref_id] = ilObjectFactory::getInstanceByRefId($folder_ref_id);
}
// CHECK ACCESS
if(!$rbacsystem->checkAccess('create', $folder_ref_id, $obj_data->getType()))
{
$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().']');
}
// CHECK IF REFERENCE ALREADY EXISTS
if($folder_ref_id == $current_parent_id)
{
$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().']');
}
// CHECK IF PASTE OBJECT SHALL BE CHILD OF ITSELF
if($tree->isGrandChild($ref_id, $folder_ref_id))
{
$is_child[] = sprintf($this->lng->txt('msg_paste_object_not_in_itself'), $obj_data->getTitle().' ['.$obj_data->getRefId().']');
}
// CHECK IF OBJECT IS ALLOWED TO CONTAIN PASTED OBJECT AS SUBOBJECT
if(!in_array($obj_data->getType(), array_keys($this->objDefinition->getSubObjects($folder_objects_cache[$folder_ref_id]->getType()))))
{
$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().']', $obj_data->getType());
}
}
}
// process checking results
if(count($exists))
{
$error .= implode('<br />', $exists);
}
if(count($is_child))
{
$error .= $error != '' ? '<br />' : '';
$error .= implode('<br />', $is_child);
}
if(count($not_allowed_subobject))
{
$error .= $error != '' ? '<br />' : '';
$error .= implode('<br />', $not_allowed_subobject);
}
if(count($no_paste))
{
$error .= $error != '' ? '<br />' : '';
$error .= implode('<br />', $no_paste);
}
if($error != '')
{
if($_SESSION['clipboard']['cmd'] == 'cut')
else
return;
}
// log pasteObject call
$log->write(__METHOD__.", cmd: ".$_SESSION["clipboard"]["cmd"]);
// everything ok: now paste the objects to new location
// to prevent multiple actions via back/reload button
$ref_ids = $_SESSION['clipboard']['ref_ids'];
unset($_SESSION['clipboard']['ref_ids']);
// BEGIN ChangeEvent: Record paste event.
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
// END ChangeEvent: Record paste event.
// process CUT command
if($_SESSION['clipboard']['cmd'] == 'cut')
{
foreach($_POST['nodes'] as $folder_ref_id)
{
foreach($ref_ids as $ref_id)
{
// Store old parent
$old_parent = $tree->getParentId($ref_id);
$tree->moveTree($ref_id, $folder_ref_id);
$rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
// BEGIN ChangeEvent: Record cut event.
$node_data = $tree->getNodeData($ref_id);
$old_parent_data = $tree->getNodeData($old_parent);
ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'remove',
$old_parent_data['obj_id']);
ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
$ilObjDataCache->lookupObjId($folder_ref_id));
ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
// END PATCH ChangeEvent: Record cut event.
}
// prevent multiple iterations for cut cmommand
break;
}
ilUtil::sendSuccess($this->lng->txt('msg_cut_copied'), true);
} // END CUT
// process LINK command
if($_SESSION['clipboard']['cmd'] == 'link')
{
$linked_to_folders = array();
include_once "Services/AccessControl/classes/class.ilRbacLog.php";
$rbac_log_active = ilRbacLog::isActive();
foreach($_POST['nodes'] as $folder_ref_id)
{
$linked_to_folders[] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
foreach($ref_ids as $ref_id)
{
// get node data
$top_node = $tree->getNodeData($ref_id);
// get subnodes of top nodes
$subnodes[$ref_id] = $tree->getSubtree($top_node);
}
// now move all subtrees to new location
foreach($subnodes as $key => $subnode)
{
// first paste top_node....
$new_ref_id = $obj_data->createReference();
$obj_data->putInTree($folder_ref_id);
$obj_data->setPermissions($folder_ref_id);
// rbac log
if($rbac_log_active)
{
$rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
$rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, $key);
}
// BEGIN ChangeEvent: Record link event.
$node_data = $tree->getNodeData($new_ref_id);
ilChangeEvent::_recordWriteEvent($node_data['obj_id'], $ilUser->getId(), 'add',
$ilObjDataCache->lookupObjId($folder_ref_id));
ilChangeEvent::_catchupWriteEvents($node_data['obj_id'], $ilUser->getId());
// END PATCH ChangeEvent: Record link event.
}
$log->write(__METHOD__.', link finished');
}
ilUtil::sendSuccess(sprintf($this->lng->txt('mgs_objects_linked_to_the_following_folders'), implode(', ', $linked_to_folders)), true);
} // END LINK
// clear clipboard
$this->clearObject();
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilContainerGUI::prepareOutput (   $a_show_subobjects = true)

prepare output

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

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

{
if (parent::prepareOutput()) // return false in admin mode
{
if ($this->getCreationMode() != true && $a_show_subobjects)
{
// This method is called directly from ilContainerGUI::renderObject
#$this->showPossibleSubObjects();
$this->showTreeFlatIcon();
// Member view
include_once './Services/Container/classes/class.ilMemberViewGUI.php';
ilMemberViewGUI::showMemberViewSwitch($this->object->getRefId());
}
}
}

+ Here is the call graph for this function:

ilContainerGUI::redrawListItemObject ( )

Redraw a list item (ajax)

Parameters
@return

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

References $_GET, exit, and getContentGUI().

{
$item_data = $this->object->getSubItems(false, false, (int) $_GET["child_ref_id"]);
$container_view = $this->getContentGUI();
foreach ($this->object->items["_all"] as $id)
{
if ($id["child"] == (int) $_GET["child_ref_id"])
{
$html = $container_view->renderItem($id);
echo $html;
}
}
}

+ Here is the call graph for this function:

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

Implements ilDesktopItemHandling.

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

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

{
global $ilSetting, $lng;
if((int)$ilSetting->get('disable_my_offers'))
{
return $this->renderObject();
}
include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
ilUtil::sendSuccess($lng->txt("removed_from_desktop"));
$this->renderObject();
}

+ Here is the call graph for this function:

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

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

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

{
include_once("Services/Object/classes/class.ilObjectListGUIFactory.php");
$output_html = "";
$type_grps = $this->object->getGroupedObjTypes();
switch ($a_type)
{
// render all items list
case "all":
// new behaviour
$output_html.= $this->getContainerPageHTML();
// all item types
/*
$type_ordering = array(
"cat", "fold", "crs","rcrs", "icrs", "icla", "grp", "chat", "frm", "lres",
"glo", "webr", "mcst", "wiki", "file", "exc",
"tst", "svy", "mep", "qpl", "spl");*/
$cur_obj_type = "";
$overall_tpl =& $this->newBlockTemplate();
$this->type_template = array();
$first = true;
// iterate all types
foreach ($type_grps as $type => $v)
{
// set template (overall or type specific)
if (is_int(strpos($output_html, "[list-".$type."]")))
{
$tpl =& $this->newBlockTemplate();
$overall = false; // individual
}
else
{
$tpl =& $overall_tpl;
$overall = true; // put to the rest
}
if (is_array($this->items[$type]))
{
$item_html = array();
foreach($this->items[$type] as $key => $item)
{
// get list gui class for each object type
if ($cur_obj_type != $item["type"])
{
$item_list_gui =& ilObjectListGUIFactory::_getListGUIByType($item["type"]);
$item_list_gui->setContainerObject($this);
}
// render item row
$ilBench->start("ilContainerGUI", "0210_getListHTML");
// show administration command buttons (or not)
{
$item_list_gui->enableDelete(false);
$item_list_gui->enableLink(false);
$item_list_gui->enableCut(false);
$item_list_gui->enableCopy(false);
}
// activate common social commands
$item_list_gui->enableComments(true);
$item_list_gui->enableNotes(true);
$item_list_gui->enableTags(true);
$html = $item_list_gui->getListItemHTML($item["ref_id"],
$item["obj_id"], $item["title"], $item["description"]);
// check whether any admin command is allowed for
// the items
$this->determineAdminCommands($item["ref_id"],
$item_list_gui->adminCommandsIncluded());
$ilBench->stop("ilContainerGUI", "0210_getListHTML");
if ($html != "")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$item_html[] = array(
"html" => $html,
"item_ref_id" => $item["ref_id"],
"item_obj_id" => $item["obj_id"],
'item_icon_image_type' => (method_exists($item_list_gui, 'getIconImageType')) ?
$item_list_gui->getIconImageType() :
$item['type']
);
// END WebDAV: Use $item_list_gui to determine icon image type
}
}
// output block for resource type
if (count($item_html) > 0)
{
// separator row
if (!$first && $overall)
{
$this->addSeparatorRow($tpl);
}
if ($overall)
{
$first = false;
}
// add a header for each resource type
if ($this->ilias->getSetting("icon_position_in_lists") == "item_rows")
{
$this->addHeaderRow($tpl, $type, false);
}
else
{
$this->addHeaderRow($tpl, $type);
}
$this->resetRowType();
// content row
$this->current_position = 1;
foreach($item_html as $item)
{
// BEGIN WebDAV: Use $item_list_gui to determine image type
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], $item['item_icon_image_type']);
// END WebDAV: Use $item_list_gui to determine image type
}
// store type specific templates in array
if (is_int(strpos($output_html, "[list-".$type."]")))
{
$this->type_template[$type] = $tpl;
}
}
else
{
// [list-...] tag available, but no item of type accessible
if (!$overall)
{
$this->addHeaderRow($tpl, $type);
$this->resetRowType();
$this->lng->txt("msg_no_type_accessible"), $type);
$this->type_template[$type] = $tpl;
}
}
}
else
{
// [list-...] tag available, but no item of type exists
if (!$overall)
{
$this->addHeaderRow($tpl, $type);
$this->resetRowType();
$this->lng->txt("msg_no_type_available"), $type);
$this->type_template[$type] = $tpl;
}
}
}
// I don't know why but executing this
// line before the following foreach loop seems to be crucial
if ($output_html != "")
{
//$output_html.= "<br /><br />";
}
$output_html.= $overall_tpl->get();
//$output_html = str_replace("<br>++", "++", $output_html);
//$output_html = str_replace("<br>++", "++", $output_html);
//$output_html = str_replace("++<br>", "++", $output_html);
//$output_html = str_replace("++<br>", "++", $output_html);
foreach ($this->type_template as $type => $tpl)
{
$output_html = eregi_replace("\[list-".$type."\]",
"</p>".$tpl->get()."<p class=\"ilc_Standard\">",
$output_html);
}
//if (ilPageObject::_exists($this->object->getType(),
// $this->object->getId()))
if ($xpage_id > 0)
{
$page_block = new ilTemplate("tpl.container_page_block.html", false, false,
"Services/Container");
$page_block->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
$output_html = $page_block->get();
}
break;
default:
// to do:
break;
}
return $output_html;
}

+ Here is the call graph for this function:

ilContainerGUI::renderObject ( )

render the object

Reimplemented in ilObjGroupGUI, ilObjCategoryGUI, ilObjRootFolderGUI, ilObjCourseGUI, and ilObjFolderGUI.

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

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

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

{
global $ilDB, $tpl, $ilTabs, $ilCtrl, $ilSetting;
$container_view = $this->getContentGUI();
{
$ilTabs->activateSubTab("manage");
}
else
{
$ilTabs->activateSubTab("view_content");
}
$container_view->setOutput();
$this->adminCommands = $container_view->adminCommands;
// it is important not to show the subobjects/admin panel here, since
// we will create nested forms in case, e.g. a news/calendar item is added
if ($ilCtrl->getNextClass() != "ilcolumngui")
{
}
$this->showPermanentLink($tpl);
// add tree updater javascript
if ((int) $_GET["ref_id"] > 1 && $ilSetting->get("rep_tree_synchronize"))
{
$ilCtrl->setParameter($this, "active_node", (int) $_GET["ref_id"]);
$tpl->addOnloadCode("
if (parent && parent.tree && parent.tree.updater)
{
parent.tree.updater('tree_div', '".
$ilCtrl->getLinkTarget($this, "showTree", "", true, false)
."');
}");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::resetRowType ( )

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

Referenced by renderItemList().

{
$this->cur_row_type = "";
}

+ Here is the caller graph for this function:

ilContainerGUI::savePageContentObject ( )

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

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

{
include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
/*include_once("./Services/Form/classes/class.ilFormPropertyGUI.php");
include_once("./Services/Form/classes/class.ilTextAreaInputGUI.php");
$ta = new ilTextAreaInputGUI();
$ta->setRteTagSet("extended_table_img");
$tags = $ta->getRteTagString();*/
//$text = ilUtil::stripSlashes($_POST["page_content"],
// true,
// $tags);
$text = ilUtil::stripSlashes($_POST["page_content"],
true,
if ($xpage_id > 0)
{
$xpage = new ilXHTMLPage($xpage_id);
$xpage->setContent($text);
$xpage->save();
}
else
{
$xpage = new ilXHTMLPage();
$xpage->setContent($text);
$xpage->save();
ilContainer::_writeContainerSetting($this->object->getId(),
"xhtml_page", $xpage->getId());
}
include_once("Services/RTE/classes/class.ilRTE.php");
ilRTE::_cleanupMediaObjectUsage($text, $this->object->getType().":html",
$this->object->getId());
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "");
}

+ Here is the call graph for this function:

ilContainerGUI::savePasswordObject ( )
protected

Save password.

Returns

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

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

{
global $ilUser;
$form = $this->initFormPasswordInstruction();
if($form->checkInput())
{
$ilUser->resetPassword($this->form->getInput('new_password'),$this->form->getInput('new_password'));
ilUtil::sendSuccess($this->lng->txt('webdav_pwd_instruction_success'),true);
return true;
}
$form->setValuesByPost();
}

+ Here is the call graph for this function:

ilContainerGUI::saveSortingObject ( )

Save Sorting.

public

Parameters

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

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

{
include_once('Services/Container/classes/class.ilContainerSorting.php');
$sorting = ilContainerSorting::_getInstance($this->object->getId());
// Allow comma
$positions = str_replace(',','.',$_POST['position']);
$sorting->savePost($positions);
ilUtil::sendSuccess($this->lng->txt('cntr_saved_sorting'), true);
$this->ctrl->redirect($this, "editOrder");
}

+ Here is the call graph for this function:

ilContainerGUI::saveStyleSettingsObject ( )

Save style settings.

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

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

{
global $ilSetting;
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
if ($ilSetting->get("fixed_content_style_id") <= 0 &&
(ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
|| $this->object->getStyleSheetId() == 0))
{
$this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
$this->object->update();
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
}
$this->ctrl->redirect($this, "editStyleProperties");
}

+ Here is the call graph for this function:

ilContainerGUI::setColumnSettings (   $column_gui)

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

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

References allowBlocksMoving(), and isActiveAdministrationPanel().

{
global $ilAccess;
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
{
$column_gui->setEnableMovement(true);
}
$column_gui->setRepositoryItems(
$this->object->getSubItems($this->isActiveAdministrationPanel(), true));
//if ($ilAccess->checkAccess("write", "", $this->object->getRefId())
// && $this->allowBlocksConfigure())
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$column_gui->setBlockProperty("news", "settings", true);
//$column_gui->setBlockProperty("news", "public_notifications_option", true);
$column_gui->setBlockProperty("news", "default_visibility_option", true);
$column_gui->setBlockProperty("news", "hide_news_block_option", true);
}
{
$column_gui->setAdminCommands(true);
}
}

+ Here is the call graph for this function:

ilContainerGUI::setContentSubTabs ( )

Set content sub tabs.

Reimplemented in ilObjCourseGUI.

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

References addStandardContainerSubTabs().

Referenced by renderObject().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::setPageEditorTabs ( )

Add page editor tabs.

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

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

{
global $lng;
|| strtolower($this->ctrl->getCmdClass()) != "ilpageobjectgui")
{
return;
}
$lng->loadLanguageModule("content");
//$tabs_gui = new ilTabsGUI();
//$tabs_gui->setSubTabs();
// back to upper context
$this->tabs_gui->setBackTarget($this->lng->txt("obj_cat"),
$this->ctrl->getLinkTarget($this, "frameset"),
$this->tabs_gui->addTarget("edit", $this->ctrl->getLinkTargetByClass("ilpageobjectgui", "view")
, array("", "view"), "ilpageobjectgui");
//$this->tpl->setTabs($tabs_gui->getHTML());
}

+ Here is the call graph for this function:

ilContainerGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjRootFolderGUI.

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

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

{
global $ilias;
if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"))
{
$this->tpl->setTitle($this->object->getTitle());
$this->tpl->setDescription($this->object->getLongDescription());
// set tile icon
$icon = ilUtil::getImagePath("icon_".$this->object->getType()."_b.gif");
if ($ilias->getSetting("custom_icons") &&
in_array($this->object->getType(), array("cat","grp","crs", "root")))
{
require_once("./Services/Container/classes/class.ilContainer.php");
if (($path = ilContainer::_lookupIconPath($this->object->getId(), "big")) != "")
{
$icon = $path;
}
}
$this->tpl->setTitleIcon($icon, $this->lng->txt("obj_".$this->object->getType()));
include_once './Services/Object/classes/class.ilObjectListGUIFactory.php';
$lgui = ilObjectListGUIFactory::_getListGUIByType($this->object->getType());
$lgui->initItem($this->object->getRefId(), $this->object->getId());
$this->tpl->setAlertProperties($lgui->getAlertProperties());
}
}

+ Here is the call graph for this function:

ilContainerGUI::showAdministrationPanel ( $tpl)

show administration panel

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

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

Referenced by renderObject().

{
global $ilAccess, $ilSetting;
global $ilUser, $lng;
$lng->loadLanguageModule('cntr');
{
include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
$toolbar = new ilToolbarGUI();
$this->ctrl->setParameter($this, "type", "");
$this->ctrl->setParameter($this, "item_ref_id", "");
if (!$_SESSION["clipboard"])
{
if ($this->object->gotItems())
{
$toolbar->setLeadingImage(
ilUtil::getImagePath("arrow_upright.gif"),
$lng->txt("actions")
);
$toolbar->addFormButton(
$this->lng->txt('delete_selected_items'),
'delete'
);
$toolbar->addFormButton(
$this->lng->txt('move_selected_items'),
'cut'
);
$toolbar->addFormButton(
$this->lng->txt('link_selected_items'),
'link'
);
}
if($this->object->getType() == 'crs')
{
if($this->object->gotItems())
{
$toolbar->addSeparator();
}
$toolbar->addButton(
$this->lng->txt('cntr_adopt_content'),
$this->ctrl->getLinkTargetByClass(
'ilObjectCopyGUI',
'initSourceSelection')
);
}
}
else
{
/*$GLOBALS["tpl"]->addAdminPanelCommand("paste",
$this->lng->txt("paste_clipboard_items"));
if($_SESSION["clipboard"]["cmd"] == "link")
{
$GLOBALS["tpl"]->addAdminPanelCommand("initAndDisplayLinkIntoMultipleObjects",
$this->lng->txt("paste_clipboard_items_into_multiple_objects"));
}*/
$toolbar->addFormButton(
$this->lng->txt('clear_clipboard'),
'clear'
);
}
$GLOBALS['tpl']->addAdminPanelToolbar(
$toolbar,
$this->object->gotItems() ? true : false,
$this->object->gotItems() ? true : false
);
// form action needed, see http://www.ilias.de/mantis/view.php?id=9630
if ($this->object->gotItems())
{
$GLOBALS['tpl']->setPageFormAction($this->ctrl->getFormAction($this));
}
}
if ($this->edit_order)
{
if($this->object->gotItems() and $ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
include_once('./Services/Container/classes/class.ilContainer.php');
if ($this->object->getOrderType() == ilContainer::SORT_MANUAL)
{
$GLOBALS["tpl"]->addAdminPanelCommand("saveSorting",
$this->lng->txt('sorting_save'));
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References $title.

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

{
if ($this->ilias->getSetting("custom_icons"))
{
if(!$a_form)
{
$this->tpl->addBlockFile("CONTAINER_ICONS", "container_icon_settings",
"tpl.container_icon_settings.html");
if (($big_icon = $this->object->getBigIconPath()) != "")
{
$this->tpl->setCurrentBlock("big_icon");
$this->tpl->setVariable("SRC_BIG_ICON", $big_icon);
$this->tpl->parseCurrentBlock();
}
if ($this->object->getType() != "root")
{
if (($small_icon = $this->object->getSmallIconPath()) != "")
{
$this->tpl->setCurrentBlock("small_icon");
$this->tpl->setVariable("SRC_SMALL_ICON", $small_icon);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("small_icon_row");
$this->tpl->setVariable("SMALL_ICON", $this->lng->txt("standard_icon"));
$this->tpl->setVariable("SMALL_SIZE", "(".
$this->ilias->getSetting("custom_icon_small_width")."x".
$this->ilias->getSetting("custom_icon_small_height").")");
$this->tpl->setVariable("TXT_REMOVE_S", $this->lng->txt("remove"));
$this->tpl->parseCurrentBlock();
}
if (($tiny_icon = $this->object->getTinyIconPath()) != "")
{
$this->tpl->setCurrentBlock("tiny_icon");
$this->tpl->setVariable("SRC_TINY_ICON", $tiny_icon);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("container_icon_settings");
$this->tpl->setVariable("SPAN_TITLE", $a_input_colspan + 1);
$this->tpl->setVariable("SPAN_INPUT", $a_input_colspan);
$this->tpl->setVariable("ICON_SETTINGS", $this->lng->txt("icon_settings"));
$this->tpl->setVariable("BIG_ICON", $this->lng->txt("big_icon"));
$this->tpl->setVariable("TINY_ICON", $this->lng->txt("tiny_icon"));
$this->tpl->setVariable("BIG_SIZE", "(".
$this->ilias->getSetting("custom_icon_big_width")."x".
$this->ilias->getSetting("custom_icon_big_height").")");
$this->tpl->setVariable("TINY_SIZE", "(".
$this->ilias->getSetting("custom_icon_tiny_width")."x".
$this->ilias->getSetting("custom_icon_tiny_height").")");
$this->tpl->setVariable("TXT_REMOVE", $this->lng->txt("remove"));
$this->tpl->parseCurrentBlock();
}
else
{
$big_icon = $this->object->getBigIconPath();
$small_icon = $this->object->getSmallIconPath();
$tiny_icon = $this->object->getTinyIconPath();
if($a_as_section)
{
$title->setTitle($this->lng->txt("icon_settings"));
}
else
{
$title = new ilCustomInputGUI($this->lng->txt("icon_settings"), "");
}
$a_form->addItem($title);
// big
$caption = $this->lng->txt("big_icon")." (".
$this->ilias->getSetting("custom_icon_big_width")."x".
$this->ilias->getSetting("custom_icon_big_height").")";
$icon = new ilImageFileInputGUI($caption, "cont_big_icon");
$icon->setImage($big_icon);
if($a_as_section)
{
$a_form->addItem($icon);
}
else
{
$title->addSubItem($icon);
}
// small/standard
if ($this->object->getType() != "root")
{
$caption = $this->lng->txt("standard_icon")." (".
$this->ilias->getSetting("custom_icon_small_width")."x".
$this->ilias->getSetting("custom_icon_small_height").")";
$icon = new ilImageFileInputGUI($caption, "cont_small_icon");
$icon->setImage($small_icon);
if($a_as_section)
{
$a_form->addItem($icon);
}
else
{
$title->addSubItem($icon);
}
}
// tiny
$caption = $this->lng->txt("tiny_icon")." (".
$this->ilias->getSetting("custom_icon_tiny_width")."x".
$this->ilias->getSetting("custom_icon_tiny_height").")";
$icon = new ilImageFileInputGUI($caption, "cont_tiny_icon");
$icon->setImage($tiny_icon);
if($a_as_section)
{
$a_form->addItem($icon);
}
else
{
$title->addSubItem($icon);
}
}
}
}

+ Here is the caller graph for this function:

ilContainerGUI::showLinkIntoMultipleObjectsTreeObject ( )

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

References $_GET, $_POST, $_SESSION, and ilPasteIntoMultipleItemsExplorer\SEL_TYPE_CHECK.

Referenced by initAndDisplayLinkIntoMultipleObjectsObject(), and performPasteIntoMultipleObjectsObject().

{
global $ilTabs, $ilToolbar;
$ilTabs->setTabActive('view_content');
if(!in_array($_SESSION['clipboard']['cmd'], array('link')))
{
$message = __METHOD__.": cmd was not 'link'; may be a hack attempt!";
$this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
}
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html');
require_once 'classes/class.ilPasteIntoMultipleItemsExplorer.php';
$exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_CHECK, 'repository.php?cmd=goto', 'paste_linked_repexpand');
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showLinkIntoMultipleObjectsTree'));
$exp->setTargetGet('ref_id');
$exp->setPostVar('nodes[]');
is_array($_POST['nodes']) ? $exp->setCheckedItems((array)$_POST['nodes']) : $exp->setCheckedItems(array());
if($_GET['paste_linked_repexpand'] == '')
{
$expanded = $this->tree->readRootId();
}
else
{
$expanded = $_GET['paste_linked_repexpand'];
}
$this->tpl->setVariable('FORM_TARGET', '_top');
$this->tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this, 'performPasteIntoMultipleObjects'));
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable('OBJECT_TREE', $output);
$this->tpl->setVariable('CMD_SUBMIT', 'performPasteIntoMultipleObjects');
$this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('paste'));
$ilToolbar->addButton($this->lng->txt('cancel'), $this->ctrl->getLinkTarget($this,'cancelMoveLink'));
}

+ Here is the caller graph for this function:

ilContainerGUI::showLinkListObject ( )

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

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

{
global $lng, $tree;
$tpl = new ilTemplate("tpl.container_link_help.html", true, true);
$type_ordering = array(
"cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres",
"glo", "webr", "file", "exc",
"tst", "svy", "mep", "qpl", "spl");
$childs = $tree->getChilds($_GET["ref_id"]);
foreach($childs as $child)
{
if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm")))
{
$cnt["lres"]++;
}
else
{
$cnt[$child["type"]]++;
}
}
$tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
foreach($type_ordering as $type)
{
$tpl->setCurrentBlock("row");
$tpl->setVariable("ROWCOL", "tblrow".((($i++)%2)+1));
if ($type != "lres")
{
$tpl->setVariable("TYPE", $lng->txt("objs_".$type).
" (".((int)$cnt[$type]).")");
}
else
{
$tpl->setVariable("TYPE", $lng->txt("learning_resources").
" (".((int)$cnt["lres"]).")");
}
$tpl->setVariable("TXT_LINK", "[list-".$type."]");
$tpl->parseCurrentBlock();
}
$tpl->show();
}

+ Here is the call graph for this function:

ilContainerGUI::showMoveIntoObjectTreeObject ( )

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

References $_GET, $_POST, $_SESSION, and ilPasteIntoMultipleItemsExplorer\SEL_TYPE_RADIO.

Referenced by initAndDisplayMoveIntoObjectObject(), and performPasteIntoMultipleObjectsObject().

{
global $ilTabs, $ilToolbar;
$ilTabs->setTabActive('view_content');
if(!in_array($_SESSION['clipboard']['cmd'], array('cut')))
{
$message = __METHOD__.": cmd was not 'cut'; may be a hack attempt!";
$this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
}
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html');
require_once 'classes/class.ilPasteIntoMultipleItemsExplorer.php';
$exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_RADIO, 'repository.php?cmd=goto', 'paste_cut_repexpand');
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showMoveIntoObjectTree'));
$exp->setTargetGet('ref_id');
$exp->setPostVar('node');
$exp->setCheckedItems(array((int)$_POST['node']));
if($_GET['paste_cut_repexpand'] == '')
{
$expanded = $this->tree->readRootId();
}
else
{
$expanded = $_GET['paste_cut_repexpand'];
}
$this->tpl->setVariable('FORM_TARGET', '_top');
$this->tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this, 'performPasteIntoMultipleObjects'));
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable('OBJECT_TREE', $output);
$this->tpl->setVariable('CMD_SUBMIT', 'performPasteIntoMultipleObjects');
$this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('paste'));
$ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this,'cancelMoveLink'));
}

+ Here is the caller graph for this function:

ilContainerGUI::showPasswordInstructionObject (   $a_init = true)
protected

Show webdav password instruction.

Returns

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

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

Referenced by savePasswordObject().

{
global $tpl,$ilToolbar;
if($a_init)
{
ilUtil::sendInfo($this->lng->txt('webdav_pwd_instruction'));
}
include_once ('Services/WebDAV/classes/class.ilDAVServer.php');
$davServer = ilDAVServer::getInstance();
$ilToolbar->addButton(
$this->lng->txt('mount_webfolder'),
$davServer->getMountURI($this->object->getRefId()),
'_blank',
'',
$davServer->getFolderURI($this->object->getRefId())
);
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::showPermanentLink ( $tpl)

show permanent link

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

References $GLOBALS.

Referenced by renderObject().

{
$GLOBALS["tpl"]->setPermanentLink($this->object->getType(),
$this->object->getRefId(), "", "_top");
}

+ Here is the caller graph for this function:

ilContainerGUI::showPossibleSubObjects ( )

show possible sub objects selection list

Reimplemented from ilObjectGUI.

Reimplemented in ilObjRecoveryFolderGUI.

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

References $cmd, $d, ilObjectGUI\$formaction, $ilCtrl, ilObjectGUI\$lng, $row, ilObject\_getIcon(), ilRepositoryObjectPluginSlot\addCreatableSubObjects(), and ilPlugin\lookupTxt().

Referenced by renderObject().

{
global $ilAccess,$ilCtrl,$lng;
$found = false;
$cmd = ($this->cmd != "")
? $this->cmd
: $this->ctrl->getCmd();
$type = $this->object->getType();
$d = $this->objDefinition->getCreatableSubObjects($type);
include_once("./Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php");
if ($type != "icrs")
{
}
if (count($d) > 0)
{
foreach ($d as $row)
{
$count = 0;
if ($row["max"] == "" || $count < $row["max"])
{
if (!in_array($row["name"], array("rolf")))
{
if ($this->rbacsystem->checkAccess("create", $this->object->getRefId(), $row["name"]))
{
if (!$row["plugin"])
{
$subobj[] = array("value" => $row["name"],
"title" => $lng->txt("obj_".$row["name"]),
"img" => ilObject::_getIcon("", "tiny", $row["name"]),
"alt" => $lng->txt("obj_".$row["name"]));
}
else
{
include_once("./Services/Component/classes/class.ilPlugin.php");
$subobj[] = array("value" => $row["name"],
"title" => ilPlugin::lookupTxt("rep_robj", $row["name"], "obj_".$row["name"]),
"img" => ilObject::_getIcon("", "tiny", $row["name"]),
"alt" => $lng->txt("obj_".$row["name"]));
}
}
}
}
}
}
if (is_array($subobj))
{
$formaction = "repository.php?ref_id=".$this->object->getRefId()."&cmd=post";
$formaction = $ilCtrl->appendRequestTokenParameterString($formaction);
$formaction = $this->ctrl->getFormAction($this);
//$opts = ilUtil::formSelect("", "new_type", $subobj);
$this->tpl->setCreationSelector($formaction,
$subobj, "create", $this->lng->txt("add"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::showTreeFlatIcon ( )

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

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

Referenced by prepareOutput().

{
global $tpl;
// dont show icon, if role (permission gui->rolegui) is edited
if ($_GET["obj_id"] != "")
{
return;
}
// hide for member view
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
{
return;
}
$mode = ($_SESSION["il_rep_mode"] == "flat")
? "tree"
: "flat";
$link = "repository.php?cmd=frameset&set_mode=".$mode."&ref_id=".$this->object->getRefId();
$tpl->setTreeFlatIcon($link, $mode);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerGUI::switchToOldEditorObject ( )

Switch to old page editor.

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

References $_SESSION, and $ilCtrl.

{
global $ilCtrl;
$_SESSION["il_cntr_editor"] = "old";
$ilCtrl->redirect($this, "editPageFrame");
}
ilContainerGUI::switchToStdEditorObject ( )

Switch to standard page editor.

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

References $_SESSION, and $ilCtrl.

{
global $ilCtrl;
$_SESSION["il_cntr_editor"] = "std";
$ilCtrl->redirect($this, "editPageFrame");
}
ilContainerGUI::useNewEditorObject ( )

Use new editor (-> delete xhtml content page)

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

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

{
global $ilCtrl, $ilAccess, $lng, $ilCtrl;
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
include_once("./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
/* keep old page content for now...
$xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(),
"xhtml_page");
if ($xpage_id)
{
$xpage = new ilXHTMLPage($xpage_id);
}
*/
ilContainer::_writeContainerSetting($this->object->getId(),
"xhtml_page", 0);
ilUtil::sendSuccess($lng->txt("cntr_switched_editor"), true);
}
$ilCtrl->redirect($this, "editPageFrame");
}

+ Here is the call graph for this function:

Field Documentation

ilContainerGUI::$bl_cnt = 1

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


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