ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjRootFolderGUI Class Reference

Class ilObjRootFolderGUI. More...

+ Inheritance diagram for ilObjRootFolderGUI:
+ Collaboration diagram for ilObjRootFolderGUI:

Public Member Functions

 ilObjRootFolderGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 importCategoriesFormObject ()
 import categories form
 importCancelledObject ()
 import cancelled
 importCategoriesObject ()
 import categories
 importCategoriesWithRolObject ()
 import categories
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method
executeCommand ()
 execute command note: this method is overwritten in all container objects
 renderObject ()
 Render root folder.
 setTitleAndDescription ()
 called by prepare output
 initEditForm ()
 Init object edit form.
 getEditFormValues ()
 Get values for edit form.
 updateObject ()
 updates object entry in object_data
 editTranslationsObject ($a_get_post_values=false)
 Edit title and translations.
 saveTranslationsObject ()
 Save title and translations.
 addTranslationObject ()
 Add a translation.
 deleteTranslationsObject ()
 Remove translation.
 _goto ($a_target)
 goto target group
- 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 ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 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
 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.
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 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 ()
 showPossibleSubObjects ()
 show possible sub objects selection list
 getContentGUI ()
 Get content gui 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.
 enableAdministrationPanelObject ()
 enable administration panel
 disableAdministrationPanelObject ()
 enable administration panel
 editOrderObject ()
 Edit order.
 isActiveOrdering ()
 Check if ordering is enabled.
 addToDeskObject ()
 removeFromDeskObject ()
 enableMultiDownloadObject ()
 isMultiDownloadEnabled ()
 lockObject ()
 cutObject ()
 cut object(s) out from a container and write the information to clipboard
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.
 downloadObject ()
 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 ()
 showPasteTreeObject ()
 Show paste tree.
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent.
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard.
 initAndDisplayCopyIntoMultipleObjectsObject ()
 initAndDisplayMoveIntoObjectObject ()
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved
 clipboardObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.
 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.
 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)
 showRepTree ($a_initial_call=false)
 Show tree.
 trashObject ()
 Show trash content of object.
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 undeleteObject ()
 Get objects back from trash.
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system

Protected Member Functions

 setEditTabs ($active_tab="settings_misc")
 showSortingSettings ()
 show sorting settings
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 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 ($a_do_not_add_object=false)
 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.
 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
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 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
 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.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.
- Protected Member Functions inherited from ilContainerGUI
 afterUpdate ()
 Post (successful) object update hook.
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction.
 initFormPasswordInstruction ()
 Init password form.
 savePasswordObject ()
 Save password.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link.
 fileManagerLaunchObject ()
 Launch jnlp.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path
- 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
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 $multi_download_enabled = false

Detailed Description

Member Function Documentation

ilObjRootFolderGUI::_goto (   $a_target)

goto target group

Definition at line 529 of file class.ilObjRootFolderGUI.php.

References $ilErr, ilObjectGUI\$lng, and ilObjectGUI\_gotoRepositoryRoot().

{
global $ilAccess, $ilErr, $lng;
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::addTranslationObject ( )

Add a translation.

Definition at line 485 of file class.ilObjRootFolderGUI.php.

References $_POST, and editTranslationsObject().

{
if(sizeof($_POST["title"]))
{
$k = max(array_keys($_POST["title"]))+1;
}
else
{
$k = 0;
}
$_POST["title"][$k] = "";
$this->editTranslationsObject(true);
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::deleteTranslationsObject ( )

Remove translation.

Definition at line 502 of file class.ilObjRootFolderGUI.php.

References $_POST, and saveTranslationsObject().

{
$del_default = true;
foreach($_POST["title"] as $k => $v)
{
if ($_POST["check"][$k])
{
unset($_POST["title"][$k]);
unset($_POST["desc"][$k]);
unset($_POST["lang"][$k]);
if($_POST["default"] == $k)
{
$del_default = true;
}
}
}
// set new default
if($del_default && sizeof($_POST["title"]))
{
$_POST["default"] = array_shift(array_keys($_POST["title"]));
}
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::editTranslationsObject (   $a_get_post_values = false)

Edit title and translations.

Definition at line 379 of file class.ilObjRootFolderGUI.php.

References $_POST, ilObjectGUI\$data, ilObjectGUI\$tpl, and setEditTabs().

Referenced by addTranslationObject(), and saveTranslationsObject().

{
global $tpl;
$this->ctrl->redirectByClass("ilobjecttranslationgui", "");
$this->lng->loadLanguageModule($this->object->getType());
$this->setEditTabs("settings_trans");
include_once("./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
$table = new ilObjectTranslationTableGUI($this, "editTranslations", true,
"Translation");
if ($a_get_post_values)
{
$vals = array();
foreach($_POST["title"] as $k => $v)
{
$vals[] = array("title" => $v,
"desc" => $_POST["desc"][$k],
"lang" => $_POST["lang"][$k],
"default" => ($_POST["default"] == $k));
}
$table->setData($vals);
}
else
{
$data = $this->object->getTranslations();
foreach($data["Fobject"] as $k => $v)
{
$data["Fobject"][$k]["default"] = ($k == $data["default_language"]);
}
$table->setData($data["Fobject"]);
}
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilObjRootFolderGUI::executeCommand ( )

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

Reimplemented from ilContainerGUI.

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

References $cmd, $ret, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\prepareOutput(), renderObject(), setEditTabs(), and ilContainerGUI\showRepTree().

{
global $rbacsystem;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
// show repository tree
$this->showRepTree(true);
switch($next_class)
{
case 'ilcontainerlinklistgui':
include_once("Services/Container/classes/class.ilContainerLinkListGUI.php");
$link_list_gui =& new ilContainerLinkListGUI();
$ret =& $this->ctrl->forwardCommand($link_list_gui);
break;
// container page editing
case "ilcontainerpagegui":
$this->prepareOutput(false);
if ($ret != "")
{
$this->tpl->setContent($ret);
}
break;
case 'ilpermissiongui':
$this->prepareOutput();
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case "ilcolumngui":
$this->checkPermission("read");
$this->prepareOutput();
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
$this->renderObject();
break;
case 'ilobjectcopygui':
$this->prepareOutput();
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('root');
$this->ctrl->forwardCommand($cp);
break;
case "ilobjstylesheetgui":
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
case 'ilobjecttranslationgui':
$this->checkPermissionBool("write");
$this->prepareOutput();
//$this->tabs_gui->setTabActive('export');
$this->setEditTabs("settings_trans");
include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
$transgui = new ilObjectTranslationGUI($this);
$this->ctrl->forwardCommand($transgui);
break;
default:
// fix bug http://www.ilias.de/mantis/view.php?id=10305
if ($cmd == "infoScreen")
{
$this->checkPermission("visible");
}
else
{
$this->checkPermission("read");
}
$this->prepareOutput();
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
if(!$cmd)
{
$cmd = "render";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::getEditFormValues ( )

Get values for edit form.

Returns
array

Reimplemented from ilContainerGUI.

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

{
// values are set in initEditForm()
}
ilObjRootFolderGUI::getTabs ( $tabs_gui)

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

Reimplemented from ilContainerGUI.

Definition at line 75 of file class.ilObjRootFolderGUI.php.

References $_GET, and ilObjectGUI\$lng.

{
global $rbacsystem, $lng, $ilHelp;
$ilHelp->setScreenIdComponent("root");
$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
if ($rbacsystem->checkAccess('read',$this->ref_id))
{
$tabs_gui->addTab('view_content', $lng->txt("content"),
$this->ctrl->getLinkTarget($this, ""));
}
if ($rbacsystem->checkAccess('write',$this->ref_id))
{
$force_active = ($_GET["cmd"] == "edit")
? true
: false;
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this)
, "", $force_active);
}
// parent tabs (all container: edit_permission, clipboard, trash
parent::getTabs($tabs_gui);
}
ilObjRootFolderGUI::ilObjRootFolderGUI (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor public.

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

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

{
global $lng;
$this->type = "root";
$this->ilContainerGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
$lng->loadLanguageModule("cntr");
$lng->loadLanguageModule("obj");
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::importCancelledObject ( )

import cancelled

private

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

{
$this->ctrl->returnToParent($this);
}
ilObjRootFolderGUI::importCategoriesFormObject ( )

import categories form

Definition at line 42 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategoriesForm().

{
ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::importCategoriesObject ( )

import categories

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

References ilObjCategoryGUI\_importCategories().

{
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::importCategoriesWithRolObject ( )

import categories

Definition at line 69 of file class.ilObjRootFolderGUI.php.

References ilObjCategoryGUI\_importCategories().

{
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::initEditForm ( )

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 267 of file class.ilObjRootFolderGUI.php.

References ilContainer\_lookupContainerSetting(), ilCheckboxInputGUI\setChecked(), setEditTabs(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilContainerGUI\showCustomIconsEditing(), ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by updateObject().

{
$this->setEditTabs();
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("repository"));
// sorting
include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
$settings = new ilContainerSortingSettings($this->object->getId());
$sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting");
$sort_title = new ilRadioOption($this->lng->txt('sorting_title_header'),
$sort_title->setInfo($this->lng->txt('sorting_info_title'));
$sort->addOption($sort_title);
$sort_manual = new ilRadioOption($this->lng->txt('sorting_manual_header'),
$sort_manual->setInfo($this->lng->txt('sorting_info_manual'));
$sort->addOption($sort_manual);
$sort->setValue($settings->getSortMode());
$form->addItem($sort);
$this->showCustomIconsEditing(1, $form, false);
$hide = new ilCheckboxInputGUI($this->lng->txt("cntr_hide_title_and_icon"), "hide_header_icon_and_title");
$hide->setChecked(ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"));
$form->addItem($hide);
$form->addCommandButton("update", $this->lng->txt("save"));
$form->addCommandButton("addTranslation", $this->lng->txt("add_translation"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRootFolderGUI::renderObject ( )

Render root folder.

Reimplemented from ilContainerGUI.

Definition at line 208 of file class.ilObjRootFolderGUI.php.

References $ret.

Referenced by executeCommand().

{
global $ilTabs;
include_once "Services/Object/classes/class.ilObjectListGUI.php";
ilObjectListGUI::prepareJSLinks("",
$this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
$this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
$ilTabs->activateTab("view_content");
return $ret;
}

+ Here is the caller graph for this function:

ilObjRootFolderGUI::saveTranslationsObject ( )

Save title and translations.

Definition at line 419 of file class.ilObjRootFolderGUI.php.

References $_POST, ilObjectGUI\checkPermissionBool(), editTranslationsObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

Referenced by deleteTranslationsObject().

{
if (!$this->checkPermissionBool("write"))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
// default language set?
if (!isset($_POST["default"]) && count($_POST["lang"]) > 0)
{
ilUtil::sendFailure($this->lng->txt("msg_no_default_language"));
return $this->editTranslationsObject(true);
}
// all languages set?
if (array_key_exists("",$_POST["lang"]))
{
ilUtil::sendFailure($this->lng->txt("msg_no_language_selected"));
return $this->editTranslationsObject(true);
}
// no single language is selected more than once?
if (count(array_unique($_POST["lang"])) < count($_POST["lang"]))
{
ilUtil::sendFailure($this->lng->txt("msg_multi_language_selected"));
return $this->editTranslationsObject(true);
}
// save the stuff
$this->object->removeTranslations();
if(sizeof($_POST["title"]))
{
foreach($_POST["title"] as $k => $v)
{
// update object data if default
$is_default = ($_POST["default"] == $k);
if($is_default)
{
$this->object->setTitle(ilUtil::stripSlashes($v));
$this->object->setDescription(ilUtil::stripSlashes($_POST["desc"][$k]));
$this->object->update();
}
$this->object->addTranslation(
$is_default);
}
}
else
{
// revert to original title
$this->object->setTitle("ILIAS");
$this->object->setDescription("");
$this->object->update();
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "editTranslations");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRootFolderGUI::setEditTabs (   $active_tab = "settings_misc")
protected

Definition at line 248 of file class.ilObjRootFolderGUI.php.

Referenced by editTranslationsObject(), executeCommand(), initEditForm(), and updateObject().

{
$this->tabs_gui->addSubTab("settings_misc",
$this->lng->txt("settings"),
$this->ctrl->getLinkTarget($this, "edit"));
/*$this->tabs_gui->addSubTab("settings_trans",
$this->lng->txt("title_and_translations"),
$this->ctrl->getLinkTarget($this, "editTranslations"));*/
$this->tabs_gui->addSubTab("settings_trans",
$this->lng->txt("obj_multilinguality"),
$this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
$this->tabs_gui->activateTab("settings");
$this->tabs_gui->activateSubTab($active_tab);
}

+ Here is the caller graph for this function:

ilObjRootFolderGUI::setTitleAndDescription ( )

called by prepare output

Reimplemented from ilContainerGUI.

Definition at line 226 of file class.ilObjRootFolderGUI.php.

References ilObjectGUI\$lng, and ilContainer\_lookupContainerSetting().

{
global $lng;
$this->tpl->setDescription("");
if (!ilContainer::_lookupContainerSetting($this->object->getId(), "hide_header_icon_and_title"))
{
if ($this->object->getTitle() == "ILIAS")
{
$this->tpl->setTitle($lng->txt("repository"));
}
else
{
if ($this->object->getDescription() != "")
{
$this->tpl->setDescription($this->object->getDescription()); // #13479
}
}
}
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::showSortingSettings ( )
protected

show sorting settings

protected

Definition at line 541 of file class.ilObjRootFolderGUI.php.

References ilUtil\formRadioButton(), ilObjectGUI\getCreationMode(), ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

{
$this->tpl->setVariable('TXT_SORTING',$this->lng->txt('sorting_header'));
$this->tpl->setVariable('TXT_SORT_TITLE',$this->lng->txt('sorting_title_header'));
$this->tpl->setVariable('INFO_SORT_TITLE',$this->lng->txt('sorting_info_title'));
$this->tpl->setVariable('TXT_SORT_MANUAL',$this->lng->txt('sorting_manual_header'));
$this->tpl->setVariable('INFO_SORT_MANUAL',$this->lng->txt('sorting_info_manual'));
include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
if($this->getCreationMode())
{
$settings = new ilContainerSortingSettings(0);
}
else
{
$settings = new ilContainerSortingSettings($this->object->getId());
}
$this->tpl->setVariable('RADIO_SORT_TITLE',ilUtil::formRadioButton(
$settings->getSortMode() == ilContainer::SORT_TITLE,
'sorting',
$this->tpl->setVariable('RADIO_SORT_MANUAL',ilUtil::formRadioButton(
$settings->getSortMode() == ilContainer::SORT_MANUAL,
'sorting',
}

+ Here is the call graph for this function:

ilObjRootFolderGUI::updateObject ( )

updates object entry in object_data

public

Reimplemented from ilObjectGUI.

Definition at line 321 of file class.ilObjRootFolderGUI.php.

References $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilObjectGUI\checkPermissionBool(), initEditForm(), ilUtil\sendSuccess(), setEditTabs(), and ilContainerSortingSettings\setSortMode().

{
if (!$this->checkPermissionBool("write"))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
else
{
$form = $this->initEditForm();
if($form->checkInput())
{
include_once('Services/Container/classes/class.ilContainerSortingSettings.php');
$settings = new ilContainerSortingSettings($this->object->getId());
$settings->setSortMode($form->getInput("sorting"));
$settings->update();
// save custom icons
if ($this->ilias->getSetting("custom_icons"))
{
if($form->getItemByPostVar("cont_big_icon")->getDeletionFlag())
{
$this->object->removeBigIcon();
}
if($form->getItemByPostVar("cont_tiny_icon")->getDeletionFlag())
{
$this->object->removeTinyIcon();
}
$this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
null, $_FILES["cont_tiny_icon"]['tmp_name']);
}
// hide icon/title
ilContainer::_writeContainerSetting($this->object->getId(),
"hide_header_icon_and_title",
$form->getInput("hide_header_icon_and_title"));
// BEGIN ChangeEvent: Record update
global $ilUser;
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
// END ChangeEvent: Record update
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this, "edit");
}
// display form to correct errors
$this->setEditTabs();
$form->setValuesByPost();
$this->tpl->setContent($form->getHTML());
}
}

+ Here is the call graph for this function:


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