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

Class ilPCListGUI. More...

+ Inheritance diagram for ilPCFileListGUI:
+ Collaboration diagram for ilPCFileListGUI:

Public Member Functions

 ilPCFileListGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor public.
executeCommand ()
 execute command
 insert ()
 insert new file list form
 selectFile ()
 Select file.
 insertFromRepository ($a_cmd="insert")
 Insert file from repository.
 insertFromWorkspace ($a_cmd="insert")
 Insert file from personal workspace.
 create ()
 create new file list in dom and update page in db
 edit ()
 edit properties form
 initEditForm ($a_mode="edit")
 Init edit form.
 saveProperties ()
 save table properties in db and return to page edit screen
 editFiles ()
 Edit Files.
 setTabs ($a_create=true)
 Set Tabs.
 addFileItem ()
 Add file item.
 deleteFileItem ()
 Delete file items from list.
 savePositions ()
 Save positions of file items.
 savePositionsAndClasses ()
 Save positions of file items and style classes.
 checkStyleSelection ()
 Checks whether style selection shoudl be available or not.
 newFileItem ()
 New file item (called, if there is no file item in an existing)
 insertNewFileItem ($a_file_ref_id=0)
 insert new file item after another item
 createFileItem ()
 insert new file item
 setItemTabs ($a_cmd="")
 output tabs
- Public Member Functions inherited from ilPageContentGUI
 ilPageContentGUI ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public.
 setContentObject ($a_val)
 Set content object.
 getContentObject ()
 Get content object.
 setPage ($a_val)
 Set page.
 getPage ()
 Get page.
 setPageConfig ($a_val)
 Set Page Config.
 getPageConfig ()
 Get Page Config.
 setStyleId ($a_styleid)
 Set Style Id.
 getStyleId ()
 Get Style Id.
 getStyle ()
 Get style object.
 setCharacteristics ($a_chars)
 Set Characteristics.
 getCharacteristics ()
 Get characteristics.
 getHierId ()
 get hierarchical id in dom object
 setHierId ($a_hier_id)
 get hierarchical id in dom object
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl.
 delete ()
 delete content element
 moveAfter ()
 move content element after another element
 moveBefore ()
 move content element before another element
 splitPage ()
 split page to new page at specified position
 splitPageNext ()
 split page to next page at specified position
 displayValidationError ()
 display validation errors
 cancelCreate ()
 cancel creating page content
 cancelUpdate ()
 cancel update
 cancel ()
 Cancel.
 deactivate ()
 gui function set enabled if is not enabled and vice versa
 cut ()
 Cut single element.
 copy ()
 Copy single element.
 getTemplateOptions ($a_type)
 Get table templates.

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons.
- Data Fields inherited from ilPageContentGUI
 $content_obj
 $ilias
 $tpl
 $lng
 $ctrl
 $pg_obj
 $hier_id
 $dom
 $updated
 $target_script
 $return_location
 $page_config = null
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style.
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons

Detailed Description

Class ilPCListGUI.

User Interface for LM List Editing

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilPCFileListGUI.php 43464 2013-07-17 09:18:27Z akill

Definition at line 17 of file class.ilPCFileListGUI.php.

Member Function Documentation

ilPCFileListGUI::addFileItem ( )

Add file item.

This function is called from file list table and calls newItemAfter function.

Definition at line 507 of file class.ilPCFileListGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$files = $this->content_obj->getFileList();
if (count($files) >= 1)
{
$ilCtrl->setParameterByClass("ilpcfileitemgui", "hier_id",
$files[count($files) - 1]["hier_id"]);
$ilCtrl->setParameterByClass("ilpcfileitemgui", "pc_id",
$files[count($files) - 1]["pc_id"]);
$ilCtrl->redirectByClass("ilpcfileitemgui", "newItemAfter");
}
else
{
$ilCtrl->redirect($this, "newFileItem");
}
}
ilPCFileListGUI::checkStyleSelection ( )

Checks whether style selection shoudl be available or not.

Definition at line 584 of file class.ilPCFileListGUI.php.

References ilPageContentGUI\getCharacteristics().

{
// check whether there is more than one style class
$chars = $this->getCharacteristics();
$classes = $this->content_obj->getAllClasses();
if (count($chars) > 1)
{
return true;
}
foreach ($classes as $class)
{
if ($class != "" && $class != "FileListItem")
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

ilPCFileListGUI::create ( )

create new file list in dom and update page in db

Definition at line 241 of file class.ilPCFileListGUI.php.

References $_POST, $_SESSION, ilPageContentGUI\getPage(), insert(), and ilUtil\stripSlashes().

{
include_once("./Modules/File/classes/class.ilObjFile.php");
// from personal workspace
if(substr($_POST["file_ref_id"], 0, 4) == "wsp_")
{
$fileObj = new ilObjFile(substr($_POST["file_ref_id"], 4), false);
}
// upload
else if ($_POST["file_ref_id"] == 0)
{
$fileObj = new ilObjFile();
$fileObj->setType("file");
$fileObj->setTitle($_FILES["file"]["name"]);
$fileObj->setDescription("");
$fileObj->setFileName($_FILES["file"]["name"]);
$fileObj->setFileType($_FILES["file"]["type"]);
$fileObj->setFileSize($_FILES["file"]["size"]);
$fileObj->setMode("filelist");
$fileObj->create();
// upload file to filesystem
$fileObj->createDirectory();
$fileObj->raiseUploadError(false);
$fileObj->getUploadFile($_FILES["file"]["tmp_name"],
$_FILES["file"]["name"]);
}
// from repository
else
{
$fileObj = new ilObjFile($_POST["file_ref_id"]);
}
$_SESSION["il_text_lang_".$_GET["ref_id"]] = $_POST["flst_language"];
//echo "::".is_object($this->dom).":";
$this->content_obj = new ilPCFileList($this->getPage());
$this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
$this->content_obj->setListTitle(ilUtil::stripSlashes($_POST["flst_title"]), $_POST["flst_language"]);
$this->content_obj->appendItem($fileObj->getId(), $fileObj->getFileName(),
$fileObj->getFileType());
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
else
{
$this->insert();
}
}

+ Here is the call graph for this function:

ilPCFileListGUI::createFileItem ( )

insert new file item

Definition at line 711 of file class.ilPCFileListGUI.php.

References $_GET, ilPageContentGUI\$lng, and ilUtil\sendFailure().

Referenced by insertNewFileItem().

{
global $lng;
if ($_FILES["file"]["name"] == "")
{
$_GET["subCmd"] = "-";
ilUtil::sendFailure($lng->txt("upload_error_file_not_found"));
return false;
}
include_once("./Modules/File/classes/class.ilObjFile.php");
$fileObj = new ilObjFile();
$fileObj->setType("file");
$fileObj->setTitle($_FILES["file"]["name"]);
$fileObj->setDescription("");
$fileObj->setFileName($_FILES["file"]["name"]);
$fileObj->setFileType($_FILES["file"]["type"]);
$fileObj->setFileSize($_FILES["file"]["size"]);
$fileObj->setMode("filelist");
$fileObj->create();
$fileObj->raiseUploadError(false);
// upload file to filesystem
$fileObj->createDirectory();
$fileObj->getUploadFile($_FILES["file"]["tmp_name"],
$_FILES["file"]["name"]);
return $fileObj;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::deleteFileItem ( )

Delete file items from list.

Definition at line 530 of file class.ilPCFileListGUI.php.

References $_POST, and $ilCtrl.

{
global $ilCtrl;
if (is_array($_POST["fid"]))
{
$ids = array();
foreach($_POST["fid"] as $k => $v)
{
$ids[] = $k;
}
$this->content_obj->deleteFileItems($ids);
}
$this->updated = $this->pg_obj->update();
$ilCtrl->redirect($this, "editFiles");
}
ilPCFileListGUI::edit ( )

edit properties form

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

References initEditForm(), and setTabs().

Referenced by saveProperties().

{
$this->setTabs(false);
$form = $this->initEditForm();
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::editFiles ( )

Edit Files.

Definition at line 444 of file class.ilPCFileListGUI.php.

References $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, and setTabs().

{
global $tpl, $ilToolbar, $ilCtrl, $lng;
$this->setTabs(false);
$ilToolbar->addButton($lng->txt("cont_add_file"),
$ilCtrl->getLinkTarget($this, "addFileItem"));
include_once("./Services/COPage/classes/class.ilPCFileListTableGUI.php");
$table_gui = new ilPCFileListTableGUI($this, "editFiles", $this->content_obj);
$tpl->setContent($table_gui->getHTML());
}

+ Here is the call graph for this function:

& ilPCFileListGUI::executeCommand ( )

execute command

Definition at line 33 of file class.ilPCFileListGUI.php.

References $cmd, $ret, and ilPageContentGUI\getCharacteristicsOfCurrentStyle().

{
// get next class that processes or forwards current command
$next_class = $this->ctrl->getNextClass($this);
$this->getCharacteristicsOfCurrentStyle("flist_li"); // scorm-2004
// get current command
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilPCFileListGUI::ilPCFileListGUI ( $a_pg_obj,
$a_content_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Constructor public.

Definition at line 24 of file class.ilPCFileListGUI.php.

References ilPageContentGUI\ilPageContentGUI(), and ilPageContentGUI\setCharacteristics().

{
parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
$this->setCharacteristics(array("FileListItem" => $this->lng->txt("cont_FileListItem")));
}

+ Here is the call graph for this function:

ilPCFileListGUI::initEditForm (   $a_mode = "edit")

Init edit form.

Parameters
int$a_modeEdit Mode

Definition at line 309 of file class.ilPCFileListGUI.php.

References $_GET, $_SESSION, $ilCtrl, $ilUser, $lang, ilPageContentGUI\$lng, $si, ilMDLanguageItem\_getLanguages(), ilTree\getNodeData(), ilTextInputGUI\setMaxLength(), and ilFormPropertyGUI\setRequired().

Referenced by edit(), insert(), newFileItem(), and selectFile().

{
global $lng, $ilCtrl, $ilUser;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
if ($a_mode != "add_file")
{
// title
$ti = new ilTextInputGUI($lng->txt("title"), "flst_title");
$ti->setMaxLength(80);
$ti->setSize(40);
$form->addItem($ti);
// language
require_once("Services/MetaData/classes/class.ilMDLanguageItem.php");
$si = new ilSelectInputGUI($lng->txt("language"), "flst_language");
$si->setOptions($lang);
$form->addItem($si);
}
if (in_array($a_mode, array("create", "add_file")))
{
// file
$fi = new ilFileInputGUI($lng->txt("file"), "file");
$fi->setRequired(true);
$form->addItem($fi);
}
else if (in_array($a_mode, array("select_file")))
{
// file
$ne = new ilNonEditableValueGUI($lng->txt("file"), "");
if(isset($_GET["file_ref_id"]))
{
include_once("./Modules/File/classes/class.ilObjFile.php");
$file_obj = new ilObjFile((int) $_GET["file_ref_id"]);
if (is_object($file_obj))
{
// ref id as hidden input
$hi = new ilHiddenInputGUI("file_ref_id");
$hi->setValue((int) $_GET["file_ref_id"]);
$form->addItem($hi);
$ne->setValue($file_obj->getTitle());
}
}
else if(isset($_GET["fl_wsp_id"]))
{
// we need the object id for the instance
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($ilUser->getId());
$node = $tree->getNodeData((int) $_GET["fl_wsp_id"]);
include_once("./Modules/File/classes/class.ilObjFile.php");
$file_obj = new ilObjFile($node["obj_id"], false);
if (is_object($file_obj))
{
// ref id as hidden input
$hi = new ilHiddenInputGUI("file_ref_id");
$hi->setValue("wsp_".(int) $node["obj_id"]);
$form->addItem($hi);
$ne->setValue($file_obj->getTitle());
}
$this->tpl->parseCurrentBlock();
}
$form->addItem($ne);
}
switch ($a_mode)
{
case "edit";
$ti->setValue($this->content_obj->getListTitle());
$si->setValue($this->content_obj->getLanguage());
$form->addCommandButton("saveProperties", $lng->txt("save"));
$form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
$form->setTitle($lng->txt("cont_edit_file_list_properties"));
break;
case "create":
case "select_file":
if ($_SESSION["il_text_lang_".$_GET["ref_id"]] != "")
{
$s_lang = $_SESSION["il_text_lang_".$_GET["ref_id"]];
}
else
{
$s_lang = $ilUser->getLanguage();
}
$si->setValue($s_lang);
$form->addCommandButton("create_flst", $lng->txt("save"));
$form->addCommandButton("cancelCreate", $lng->txt("cancel"));
$form->setTitle($lng->txt("cont_insert_file_list"));
break;
case "add_file":
$form->addCommandButton("insertNewFileItem", $lng->txt("save"));
$form->addCommandButton("editFiles", $lng->txt("cancel"));
$form->setTitle($lng->txt("cont_insert_file_item"));
break;
}
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::insert ( )

insert new file list form

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

References $_GET, $_SESSION, $ilUser, ilPageContentGUI\displayValidationError(), initEditForm(), insertFromRepository(), insertFromWorkspace(), selectFile(), and setTabs().

Referenced by create().

{
global $ilUser, $ilTabs;
if ($_GET["subCmd"] == "insertNew")
{
$_SESSION["cont_file_insert"] = "insertNew";
}
if ($_GET["subCmd"] == "insertFromRepository")
{
$_SESSION["cont_file_insert"] = "insertFromRepository";
}
if ($_GET["subCmd"] == "insertFromWorkspace")
{
$_SESSION["cont_file_insert"] = "insertFromWorkspace";
}
if (($_GET["subCmd"] == "") && $_SESSION["cont_file_insert"] != "")
{
$_GET["subCmd"] = $_SESSION["cont_file_insert"];
}
switch ($_GET["subCmd"])
{
case "insertFromWorkspace":
break;
case "insertFromRepository":
break;
case "selectFile":
$this->selectFile();
break;
default:
$this->setTabs();
$ilTabs->setSubTabActive("cont_new_file");
$form = $this->initEditForm("create");
$this->tpl->setContent($form->getHTML());
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::insertFromRepository (   $a_cmd = "insert")

Insert file from repository.

Definition at line 123 of file class.ilPCFileListGUI.php.

References $_GET, $ilCtrl, ilPageContentGUI\$tpl, IL_FM_POSITIVE, setItemTabs(), and setTabs().

Referenced by insert(), and newFileItem().

{
global $ilTabs, $tree, $ilCtrl, $tpl;
if ($a_cmd == "insert")
{
$this->setTabs();
}
else
{
$this->setItemTabs($a_cmd);
}
$ilTabs->setSubTabActive("cont_file_from_repository");
include_once "./Services/COPage/classes/class.ilFileSelectorGUI.php";
$exp = new ilFileSelectorGUI($this->ctrl->getLinkTarget($this, $a_cmd));
if ($_GET["expand"] == "")
{
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET["expand"];
}
$exp->setExpand($expanded);
$exp->setTargetGet("sel_id");
//$this->ctrl->setParameter($this, "target_type", $a_type);
$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
$exp->setParamsGet($this->ctrl->getParameterArray($this, $a_cmd));
// filter
$exp->setFiltered(true);
$exp->setFilterMode(IL_FM_POSITIVE);
$exp->addFilter("root");
$exp->addFilter("cat");
$exp->addFilter("grp");
$exp->addFilter("fold");
$exp->addFilter("crs");
$exp->addFilter("file");
$sel_types = array('file');
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::insertFromWorkspace (   $a_cmd = "insert")

Insert file from personal workspace.

Definition at line 177 of file class.ilPCFileListGUI.php.

References $_GET, $ilCtrl, $ilUser, ilPageContentGUI\$tpl, IL_FM_POSITIVE, ilWorkspaceExplorer\SEL_TYPE_RADIO, setItemTabs(), and setTabs().

Referenced by insert(), and newFileItem().

{
global $ilTabs, $tree, $ilCtrl, $tpl, $ilUser;
if ($a_cmd == "insert")
{
$this->setTabs();
}
else
{
$this->setItemTabs($a_cmd);
}
$ilTabs->setSubTabActive("cont_file_from_workspace");
// get ws tree
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($ilUser->getId());
// get access handler
include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
$acc_handler = new ilWorkspaceAccessHandler($tree);
// get es explorer
include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
'filelist_wspexpand', $tree, $acc_handler);
$exp->setTargetGet('fl_wsp_id');
$exp->setFiltered(false);
$exp->removeAllFormItemTypes();
// select link
$exp->setTypeClickable("file");
$ilCtrl->setParameter($this, "subCmd", "selectFile");
$exp->setCustomLinkTarget($ilCtrl->getLinkTarget($this, $a_cmd));
// filter
$exp->setFiltered(true);
$exp->setFilterMode(IL_FM_POSITIVE);
$exp->addFilter("wsrt");
$exp->addFilter("wfld");
$exp->addFilter("file");
// expand link
$ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
$exp->setParamsGet($ilCtrl->getParameterArray($this, $a_cmd));
if($_GET['filelist_wspexpand'] == '')
{
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET['filelist_wspexpand'];
}
$exp->setExpand($expanded);
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::insertNewFileItem (   $a_file_ref_id = 0)

insert new file item after another item

Definition at line 666 of file class.ilPCFileListGUI.php.

References $_GET, $ilUser, createFileItem(), ilTree\getNodeData(), and newFileItem().

Referenced by newFileItem().

{
global $ilUser;
// from personal workspace
if(isset($_GET["fl_wsp_id"]))
{
// we need the object id for the instance
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($ilUser->getId());
$node = $tree->getNodeData($_GET["fl_wsp_id"]);
include_once("./Modules/File/classes/class.ilObjFile.php");
$file_obj = new ilObjFile($node["obj_id"], false);
}
// upload
else if ($a_file_ref_id == 0)
{
$file_obj = $this->createFileItem();
}
// from repository
else
{
include_once("./Modules/File/classes/class.ilObjFile.php");
$file_obj = new ilObjFile($a_file_ref_id);
}
if (is_object($file_obj))
{
$this->content_obj->appendItem($file_obj->getId(),
$file_obj->getTitle(), $file_obj->getFileType());
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
//$this->ctrl->returnToParent($this, "jump".$this->hier_id);
$this->ctrl->redirect($this, "editFiles");
}
}
$_GET["subCmd"] = "-";
$this->newFileItem();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::newFileItem ( )

New file item (called, if there is no file item in an existing)

Parameters
@return

Definition at line 616 of file class.ilPCFileListGUI.php.

References $_GET, $_SESSION, ilPageContentGUI\displayValidationError(), initEditForm(), insertFromRepository(), insertFromWorkspace(), insertNewFileItem(), and setItemTabs().

Referenced by insertNewFileItem().

{
global $ilTabs;
if ($_GET["subCmd"] == "insertNew")
{
$_SESSION["cont_file_insert"] = "insertNew";
}
if ($_GET["subCmd"] == "insertFromRepository")
{
$_SESSION["cont_file_insert"] = "insertFromRepository";
}
if ($_GET["subCmd"] == "insertFromWorkspace")
{
$_SESSION["cont_file_insert"] = "insertFromWorkspace";
}
if (($_GET["subCmd"] == "") && $_SESSION["cont_file_insert"] != "")
{
$_GET["subCmd"] = $_SESSION["cont_file_insert"];
}
switch ($_GET["subCmd"])
{
case "insertFromWorkspace":
$this->insertFromWorkspace("newFileItem");
break;
case "insertFromRepository":
$this->insertFromRepository("newFileItem");
break;
case "selectFile":
$this->insertNewFileItem($_GET["file_ref_id"]);
break;
default:
$this->setItemTabs("newFileItem");
$ilTabs->setSubTabActive("cont_new_file");
$form = $this->initEditForm("add_file");
$this->tpl->setContent($form->getHTML());
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::savePositions ( )

Save positions of file items.

Definition at line 550 of file class.ilPCFileListGUI.php.

References $_POST, and $ilCtrl.

{
global $ilCtrl;
if (is_array($_POST["position"]))
{
$this->content_obj->savePositions($_POST["position"]);
}
$this->updated = $this->pg_obj->update();
$ilCtrl->redirect($this, "editFiles");
}
ilPCFileListGUI::savePositionsAndClasses ( )

Save positions of file items and style classes.

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

References $_POST, and $ilCtrl.

{
global $ilCtrl;
if (is_array($_POST["position"]))
{
$this->content_obj->savePositions($_POST["position"]);
}
if (is_array($_POST["class"]))
{
$this->content_obj->saveStyleClasses($_POST["class"]);
}
$this->updated = $this->pg_obj->update();
$ilCtrl->redirect($this, "editFiles");
}
ilPCFileListGUI::saveProperties ( )

save table properties in db and return to page edit screen

Definition at line 425 of file class.ilPCFileListGUI.php.

References $_POST, edit(), and ilUtil\stripSlashes().

{
$this->content_obj->setListTitle(ilUtil::stripSlashes($_POST["flst_title"]),
ilUtil::stripSlashes($_POST["flst_language"]));
$this->updated = $this->pg_obj->update();
if ($this->updated === true)
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
else
{
$this->pg_obj->addHierIDs();
$this->edit();
}
}

+ Here is the call graph for this function:

ilPCFileListGUI::selectFile ( )

Select file.

Definition at line 107 of file class.ilPCFileListGUI.php.

References $ilUser, ilPageContentGUI\displayValidationError(), initEditForm(), and setTabs().

Referenced by insert().

{
global $ilTabs, $ilUser;
$this->setTabs();
$ilTabs->setSubTabActive("cont_file_from_repository");
$form = $this->initEditForm("select_file");
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPCFileListGUI::setItemTabs (   $a_cmd = "")

output tabs

Definition at line 744 of file class.ilPCFileListGUI.php.

References $ilCtrl, and $ilSetting.

Referenced by insertFromRepository(), insertFromWorkspace(), and newFileItem().

{
global $ilTabs, $ilCtrl, $ilSetting;
$ilTabs->addTarget("cont_back",
$this->ctrl->getParentReturn($this), "",
"");
if ($a_cmd != "")
{
$ilCtrl->setParameter($this, "subCmd", "insertNew");
$ilTabs->addSubTabTarget("cont_new_file",
$ilCtrl->getLinkTarget($this, $a_cmd), $a_cmd);
$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
$ilTabs->addSubTabTarget("cont_file_from_repository",
$ilCtrl->getLinkTarget($this, $a_cmd), $a_cmd);
$ilCtrl->setParameter($this, "subCmd", "");
if(!$ilSetting->get("disable_personal_workspace") &&
!$ilSetting->get("disable_wsp_files"))
{
$ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
$ilTabs->addSubTabTarget("cont_file_from_workspace",
$ilCtrl->getLinkTarget($this, $a_cmd), $a_cmd);
$ilCtrl->setParameter($this, "subCmd", "");
}
}
}

+ Here is the caller graph for this function:

ilPCFileListGUI::setTabs (   $a_create = true)

Set Tabs.

Definition at line 461 of file class.ilPCFileListGUI.php.

References $cmd, $ilCtrl, $ilSetting, and ilPageContentGUI\$lng.

Referenced by edit(), editFiles(), insert(), insertFromRepository(), insertFromWorkspace(), and selectFile().

{
global $ilTabs, $ilCtrl, $lng, $ilSetting;
if ($a_create)
{
$cmd = "insert";
$ilCtrl->setParameter($this, "subCmd", "insertNew");
$ilTabs->addSubTabTarget("cont_new_file",
$ilCtrl->getLinkTarget($this, $cmd), $cmd);
$ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
$ilTabs->addSubTabTarget("cont_file_from_repository",
$ilCtrl->getLinkTarget($this, $cmd), $cmd);
$ilCtrl->setParameter($this, "subCmd", "");
if(!$ilSetting->get("disable_personal_workspace") &&
!$ilSetting->get("disable_wsp_files"))
{
$ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
$ilTabs->addSubTabTarget("cont_file_from_workspace",
$ilCtrl->getLinkTarget($this, $cmd), $cmd);
$ilCtrl->setParameter($this, "subCmd", "");
}
}
else
{
$ilTabs->setBackTarget($lng->txt("pg"),
$this->ctrl->getParentReturn($this));
$ilTabs->addTarget("cont_ed_edit_files",
$ilCtrl->getLinkTarget($this, "editFiles"), "editFiles",
get_class($this));
$ilTabs->addTarget("cont_ed_edit_prop",
$ilCtrl->getLinkTarget($this, "edit"), "edit",
get_class($this));
}
}

+ Here is the caller graph for this function:


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