ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilPCFileItemGUI Class Reference

Class ilPCFileItemGUI. More...

+ Inheritance diagram for ilPCFileItemGUI:
+ Collaboration diagram for ilPCFileItemGUI:

Public Member Functions

 __construct (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor public. More...
 
 executeCommand ()
 execute command More...
 
 newFileItem ()
 insert new file item More...
 
 newItemAfter ()
 insert new list item after current one More...
 
 initAddFileForm ($a_before=true)
 Init add file form. More...
 
 insertFromRepository ($a_cmd)
 Insert file from repository. More...
 
 insertFromWorkspace ($a_cmd="insert")
 Insert file from personal workspace. More...
 
 insertNewItemAfter ($a_file_ref_id=0)
 insert new file item after another item More...
 
 newItemBefore ()
 insert new list item before current one More...
 
 insertNewItemBefore ($a_file_ref_id=0)
 insert new list item before current one More...
 
 deleteItem ()
 delete a list item More...
 
 setTabs ($a_cmd="")
 output tabs More...
 
 moveItemDown ()
 move list item down More...
 
 moveItemUp ()
 move list item up More...
 
 cancelAddFile ()
 Cancel adding a file. More...
 
- Public Member Functions inherited from ilPageContentGUI
 __construct ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public. More...
 
 setContentObject ($a_val)
 Set content object. More...
 
 getContentObject ()
 Get content object. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 setPageConfig ($a_val)
 Set Page Config. More...
 
 getPageConfig ()
 Get Page Config. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 getStyle ()
 Get style object. More...
 
 setCharacteristics ($a_chars)
 Set Characteristics. More...
 
 getCharacteristics ()
 Get characteristics. More...
 
 getHierId ()
 get hierarchical id in dom object More...
 
 setHierId ($a_hier_id)
 get hierarchical id in dom object More...
 
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl. More...
 
 delete ()
 delete content element More...
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 displayValidationError ()
 display validation errors More...
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions ($a_type)
 Get table templates. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons. More...
 
- Data Fields inherited from ilPageContentGUI
 $content_obj
 
 $ilias
 
 $tpl
 
 $lng
 
 $ctrl
 
 $pg_obj
 
 $hier_id
 
 $dom
 
 $updated
 
 $target_script
 
 $return_location
 
 $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 
- Protected Attributes inherited from ilPageContentGUI
 $log
 
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons
 

Detailed Description

Class ilPCFileItemGUI.

Handles user commands on items of file lists

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$I$

Definition at line 37 of file class.ilPCFileItemGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCFileItemGUI::__construct ( $a_pg_obj,
$a_content_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Constructor public.

Definition at line 44 of file class.ilPCFileItemGUI.php.

45  {
46  parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
47  }

Member Function Documentation

◆ cancelAddFile()

ilPCFileItemGUI::cancelAddFile ( )

Cancel adding a file.

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

531  {
532  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
533  }

◆ deleteItem()

ilPCFileItemGUI::deleteItem ( )

delete a list item

Definition at line 467 of file class.ilPCFileItemGUI.php.

References $_SESSION.

468  {
469  $this->content_obj->deleteItem();
470  $_SESSION["il_pg_error"] = $this->pg_obj->update();
471  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
472  }
$_SESSION["AccountId"]

◆ executeCommand()

ilPCFileItemGUI::executeCommand ( )

execute command

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

References $cmd, and $ret.

53  {
54  // get next class that processes or forwards current command
55  $next_class = $this->ctrl->getNextClass($this);
56 
57  // get current command
58  $cmd = $this->ctrl->getCmd();
59  switch($next_class)
60  {
61  default:
62  $ret = $this->$cmd();
63  break;
64  }
65 
66  return $ret;
67  }
$cmd
Definition: sahs_server.php:35
$ret
Definition: parser.php:6

◆ initAddFileForm()

ilPCFileItemGUI::initAddFileForm (   $a_before = true)

Init add file form.

Definition at line 178 of file class.ilPCFileItemGUI.php.

References $ilCtrl, $ilUser, ilPageContentGUI\$lng, and ilFormPropertyGUI\setRequired().

Referenced by newFileItem(), newItemAfter(), and newItemBefore().

179  {
180  global $lng, $ilCtrl, $ilUser;
181 
182  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
183  $form = new ilPropertyFormGUI();
184 
185  // file
186  $fi = new ilFileInputGUI($lng->txt("file"), "file");
187  $fi->setRequired(true);
188  $form->addItem($fi);
189 
190  if ($a_before)
191  {
192  $form->addCommandButton("insertNewItemBefore", $lng->txt("save"));
193  }
194  else
195  {
196  $form->addCommandButton("insertNewItemAfter", $lng->txt("save"));
197  }
198  $form->addCommandButton("cancelAddFile", $lng->txt("cancel"));
199 
200  $form->setTitle($lng->txt("cont_insert_file_item"));
201 
202  $form->setFormAction($ilCtrl->getFormAction($this));
203 
204  return $form;
205  }
This class represents a property form user interface.
This class represents a file property in a property form.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertFromRepository()

ilPCFileItemGUI::insertFromRepository (   $a_cmd)

Insert file from repository.

Definition at line 211 of file class.ilPCFileItemGUI.php.

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

Referenced by newItemAfter(), and newItemBefore().

212  {
213  global $ilTabs, $tree, $ilCtrl, $tpl;
214 
215  $this->setTabs($a_cmd);
216  $ilTabs->setSubTabActive("cont_file_from_repository");
217 
218  include_once "./Services/COPage/classes/class.ilFileSelectorGUI.php";
219 
220  $exp = new ilFileSelectorGUI($this->ctrl->getLinkTarget($this, $a_cmd),
221  "ilpcfileitemgui");
222 
223  if ($_GET["expand"] == "")
224  {
225  $expanded = $tree->readRootId();
226  }
227  else
228  {
229  $expanded = $_GET["expand"];
230  }
231  $exp->setExpand($expanded);
232 
233  $exp->setTargetGet("sel_id");
234  //$this->ctrl->setParameter($this, "target_type", $a_type);
235  $ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
236  $exp->setParamsGet($this->ctrl->getParameterArray($this, $a_cmd));
237 
238  // filter
239  $exp->setFiltered(true);
240  $exp->setFilterMode(IL_FM_POSITIVE);
241  $exp->addFilter("root");
242  $exp->addFilter("cat");
243  $exp->addFilter("grp");
244  $exp->addFilter("fold");
245  $exp->addFilter("crs");
246  $exp->addFilter("file");
247 
248  $sel_types = array('file');
249 
250  $exp->setOutput(0);
251 
252  $tpl->setContent($exp->getOutput());
253  }
$_GET["client_id"]
const IL_FM_POSITIVE
setTabs($a_cmd="")
output tabs
Select file for being added into file lists.
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertFromWorkspace()

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

Insert file from personal workspace.

Definition at line 258 of file class.ilPCFileItemGUI.php.

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

Referenced by newItemAfter(), and newItemBefore().

259  {
260  global $ilTabs, $tree, $ilCtrl, $tpl, $ilUser;
261 
262  $this->setTabs($a_cmd);
263  $ilTabs->setSubTabActive("cont_file_from_workspace");
264 
265  // get ws tree
266  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
267  $tree = new ilWorkspaceTree($ilUser->getId());
268 
269  // get access handler
270  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
271  $acc_handler = new ilWorkspaceAccessHandler($tree);
272 
273  // get es explorer
274  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
276  'filelist_wspexpand', $tree, $acc_handler);
277  $exp->setTargetGet('fl_wsp_id');
278  $exp->setFiltered(false);
279  $exp->removeAllFormItemTypes();
280 
281  // select link
282  $exp->setTypeClickable("file");
283  $ilCtrl->setParameter($this, "subCmd", "selectFile");
284  $exp->setCustomLinkTarget($ilCtrl->getLinkTarget($this, $a_cmd));
285 
286  // filter
287  $exp->setFiltered(true);
288  $exp->setFilterMode(IL_FM_POSITIVE);
289  $exp->addFilter("wsrt");
290  $exp->addFilter("wfld");
291  $exp->addFilter("file");
292 
293  // expand link
294  $ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
295  $exp->setParamsGet($ilCtrl->getParameterArray($this, $a_cmd));
296 
297  if($_GET['filelist_wspexpand'] == '')
298  {
299  $expanded = $tree->readRootId();
300  }
301  else
302  {
303  $expanded = $_GET['filelist_wspexpand'];
304  }
305  $exp->setExpand($expanded);
306  $exp->setOutput(0);
307 
308  $tpl->setContent($exp->getOutput());
309  }
$_GET["client_id"]
Access handler for personal workspace.
const IL_FM_POSITIVE
Tree handler for personal workspace.
setTabs($a_cmd="")
output tabs
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertNewItemAfter()

ilPCFileItemGUI::insertNewItemAfter (   $a_file_ref_id = 0)

insert new file item after another item

Definition at line 314 of file class.ilPCFileItemGUI.php.

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

Referenced by newItemAfter().

315  {
316  global $ilUser;
317 
318  $res = true;
319  if(isset($_GET["fl_wsp_id"]))
320  {
321  // we need the object id for the instance
322  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
323  $tree = new ilWorkspaceTree($ilUser->getId());
324  $node = $tree->getNodeData($_GET["fl_wsp_id"]);
325 
326  include_once("./Modules/File/classes/class.ilObjFile.php");
327  $this->file_object = new ilObjFile($node["obj_id"], false);
328  }
329  else if ($a_file_ref_id == 0)
330  {
331  $res = $this->newFileItem();
332  }
333  else
334  {
335  include_once("./Modules/File/classes/class.ilObjFile.php");
336  $this->file_object = new ilObjFile($a_file_ref_id);
337  }
338  if ($res)
339  {
340  $this->content_obj->newItemAfter($this->file_object->getId(),
341  $this->file_object->getTitle(), $this->file_object->getFileType());
342  $this->updated = $this->pg_obj->update();
343  if ($this->updated === true)
344  {
345  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
346  }
347  }
348 
349  $_GET["subCmd"] = "-";
350  $this->newItemAfter();
351  }
$_GET["client_id"]
Tree handler for personal workspace.
getNodeData($a_node_id, $a_tree_pk=null)
get all information of a node.
Class ilObjFile.
$ilUser
Definition: imgupload.php:18
newFileItem()
insert new file item
newItemAfter()
insert new list item after current one
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertNewItemBefore()

ilPCFileItemGUI::insertNewItemBefore (   $a_file_ref_id = 0)

insert new list item before current one

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

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

Referenced by newItemBefore().

426  {
427  global $ilUser;
428 
429  $res = true;
430  if(isset($_GET["fl_wsp_id"]))
431  {
432  // we need the object id for the instance
433  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
434  $tree = new ilWorkspaceTree($ilUser->getId());
435  $node = $tree->getNodeData($_GET["fl_wsp_id"]);
436 
437  include_once("./Modules/File/classes/class.ilObjFile.php");
438  $this->file_object = new ilObjFile($node["obj_id"], false);
439  }
440  else if ($a_file_ref_id == 0)
441  {
442  $res = $this->newFileItem();
443  }
444  else
445  {
446  include_once("./Modules/File/classes/class.ilObjFile.php");
447  $this->file_object = new ilObjFile($a_file_ref_id);
448  }
449  if ($res)
450  {
451  $this->content_obj->newItemBefore($this->file_object->getId(),
452  $this->file_object->getTitle(), $this->file_object->getFileType());
453  $this->updated = $this->pg_obj->update();
454  if ($this->updated === true)
455  {
456  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
457  }
458  }
459 
460  $_GET["subCmd"] = "-";
461  $this->newItemBefore();
462  }
$_GET["client_id"]
newItemBefore()
insert new list item before current one
Tree handler for personal workspace.
getNodeData($a_node_id, $a_tree_pk=null)
get all information of a node.
Class ilObjFile.
$ilUser
Definition: imgupload.php:18
newFileItem()
insert new file item
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemDown()

ilPCFileItemGUI::moveItemDown ( )

move list item down

Definition at line 510 of file class.ilPCFileItemGUI.php.

References $_SESSION.

511  {
512  $this->content_obj->moveItemDown();
513  $_SESSION["il_pg_error"] = $this->pg_obj->update();
514  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
515  }
$_SESSION["AccountId"]

◆ moveItemUp()

ilPCFileItemGUI::moveItemUp ( )

move list item up

Definition at line 520 of file class.ilPCFileItemGUI.php.

References $_SESSION.

521  {
522  $this->content_obj->moveItemUp();
523  $_SESSION["il_pg_error"] = $this->pg_obj->update();
524  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
525  }
$_SESSION["AccountId"]

◆ newFileItem()

ilPCFileItemGUI::newFileItem ( )

insert new file item

Definition at line 72 of file class.ilPCFileItemGUI.php.

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

Referenced by insertNewItemAfter(), and insertNewItemBefore().

73  {
74  global $lng;
75 
76  if ($_FILES["file"]["name"] == "")
77  {
78  $_GET["subCmd"] = "-";
79  ilUtil::sendFailure($lng->txt("upload_error_file_not_found"));
80  return false;
81  }
82 
83  $form = $this->initAddFileForm();
84  $form->checkInput();
85 
86  include_once("./Modules/File/classes/class.ilObjFile.php");
87  $fileObj = new ilObjFile();
88  $fileObj->setType("file");
89  $fileObj->setTitle($_FILES["file"]["name"]);
90  $fileObj->setDescription("");
91  $fileObj->setFileName($_FILES["file"]["name"]);
92  $fileObj->setFileType($_FILES["file"]["type"]);
93  $fileObj->setFileSize($_FILES["file"]["size"]);
94  $fileObj->setMode("filelist");
95  $fileObj->create();
96  $fileObj->raiseUploadError(false);
97  // upload file to filesystem
98  $fileObj->createDirectory();
99  $fileObj->getUploadFile($_FILES["file"]["tmp_name"],
100  $_FILES["file"]["name"]);
101 
102  $this->file_object = $fileObj;
103  return true;
104  }
initAddFileForm($a_before=true)
Init add file form.
$_GET["client_id"]
Class ilObjFile.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newItemAfter()

ilPCFileItemGUI::newItemAfter ( )

insert new list item after current one

Definition at line 110 of file class.ilPCFileItemGUI.php.

References $_GET, $_SESSION, ilPageContentGUI\displayValidationError(), initAddFileForm(), insertFromRepository(), insertFromWorkspace(), insertNewItemAfter(), and setTabs().

Referenced by insertNewItemAfter().

111  {
112  global $ilTabs;
113 
114  if ($_GET["subCmd"] == "insertNew")
115  {
116  $_SESSION["cont_file_insert"] = "insertNew";
117  }
118  if ($_GET["subCmd"] == "insertFromRepository")
119  {
120  $_SESSION["cont_file_insert"] = "insertFromRepository";
121  }
122  if ($_GET["subCmd"] == "insertFromWorkspace")
123  {
124  $_SESSION["cont_file_insert"] = "insertFromWorkspace";
125  }
126  if (($_GET["subCmd"] == "") && $_SESSION["cont_file_insert"] != "")
127  {
128  $_GET["subCmd"] = $_SESSION["cont_file_insert"];
129  }
130 
131  switch ($_GET["subCmd"])
132  {
133  case "insertFromWorkspace":
134  $this->insertFromWorkspace("newItemAfter");
135  break;
136 
137  case "insertFromRepository":
138  $this->insertFromRepository("newItemAfter");
139  break;
140 
141  case "selectFile":
142  $this->insertNewItemAfter($_GET["file_ref_id"]);
143  break;
144 
145  default:
146  $this->setTabs("newItemAfter");
147  $ilTabs->setSubTabActive("cont_new_file");
148 
149  $this->displayValidationError();
150  $form = $this->initAddFileForm(false);
151  $this->tpl->setContent($form->getHTML());
152 break;
153 
154  // new file list form
155  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.file_item_edit.html", "Services/COPage");
156  $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_insert_file_item"));
157  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
158 
159  $this->displayValidationError();
160 
161  // file
162  $this->tpl->setVariable("TXT_FILE", $this->lng->txt("file"));
163 
164  $this->tpl->parseCurrentBlock();
165 
166  // operations
167  $this->tpl->setCurrentBlock("commands");
168  $this->tpl->setVariable("BTN_NAME", "insertNewItemAfter");
169  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
170  $this->tpl->parseCurrentBlock();
171  break;
172  }
173  }
initAddFileForm($a_before=true)
Init add file form.
$_SESSION["AccountId"]
$_GET["client_id"]
insertFromWorkspace($a_cmd="insert")
Insert file from personal workspace.
setTabs($a_cmd="")
output tabs
insertFromRepository($a_cmd)
Insert file from repository.
displayValidationError()
display validation errors
insertNewItemAfter($a_file_ref_id=0)
insert new file item after another item
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newItemBefore()

ilPCFileItemGUI::newItemBefore ( )

insert new list item before current one

Definition at line 356 of file class.ilPCFileItemGUI.php.

References $_GET, $_SESSION, ilPageContentGUI\displayValidationError(), initAddFileForm(), insertFromRepository(), insertFromWorkspace(), insertNewItemBefore(), and setTabs().

Referenced by insertNewItemBefore().

357  {
358  global $ilTabs;
359 
360  if ($_GET["subCmd"] == "insertNew")
361  {
362  $_SESSION["cont_file_insert"] = "insertNew";
363  }
364  if ($_GET["subCmd"] == "insertFromRepository")
365  {
366  $_SESSION["cont_file_insert"] = "insertFromRepository";
367  }
368  if ($_GET["subCmd"] == "insertFromWorkspace")
369  {
370  $_SESSION["cont_file_insert"] = "insertFromWorkspace";
371  }
372  if (($_GET["subCmd"] == "") && $_SESSION["cont_file_insert"] != "")
373  {
374  $_GET["subCmd"] = $_SESSION["cont_file_insert"];
375  }
376 
377  switch ($_GET["subCmd"])
378  {
379  case "insertFromWorkspace":
380  $this->insertFromWorkspace("newItemBefore");
381  break;
382 
383  case "insertFromRepository":
384  $this->insertFromRepository("newItemBefore");
385  break;
386 
387  case "selectFile":
388  $this->insertNewItemBefore($_GET["file_ref_id"]);
389  break;
390 
391  default:
392  $this->setTabs("newItemBefore");
393  $ilTabs->setSubTabActive("cont_new_file");
394 
395  $this->displayValidationError();
396  $form = $this->initAddFileForm(true);
397  $this->tpl->setContent($form->getHTML());
398 break;
399 
400  // new file list form
401  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.file_item_edit.html", "Services/COPage");
402  $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_insert_file_item"));
403  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
404 
405  $this->displayValidationError();
406 
407  // file
408  $this->tpl->setVariable("TXT_FILE", $this->lng->txt("file"));
409 
410  $this->tpl->parseCurrentBlock();
411 
412  // operations
413  $this->tpl->setCurrentBlock("commands");
414  $this->tpl->setVariable("BTN_NAME", "insertNewItemBefore");
415  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
416  $this->tpl->parseCurrentBlock();
417  break;
418  }
419 
420  }
initAddFileForm($a_before=true)
Init add file form.
$_SESSION["AccountId"]
$_GET["client_id"]
insertFromWorkspace($a_cmd="insert")
Insert file from personal workspace.
setTabs($a_cmd="")
output tabs
insertFromRepository($a_cmd)
Insert file from repository.
displayValidationError()
display validation errors
insertNewItemBefore($a_file_ref_id=0)
insert new list item before current one
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilPCFileItemGUI::setTabs (   $a_cmd = "")

output tabs

Definition at line 477 of file class.ilPCFileItemGUI.php.

References $ilCtrl, and $ilSetting.

Referenced by insertFromRepository(), insertFromWorkspace(), newItemAfter(), and newItemBefore().

478  {
479  global $ilTabs, $ilCtrl, $ilSetting;
480 
481  $ilTabs->addTarget("cont_back",
482  $this->ctrl->getParentReturn($this), "",
483  "");
484 
485  if ($a_cmd != "")
486  {
487  $ilCtrl->setParameter($this, "subCmd", "insertNew");
488  $ilTabs->addSubTabTarget("cont_new_file",
489  $ilCtrl->getLinkTarget($this, $a_cmd), $a_cmd);
490 
491  $ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
492  $ilTabs->addSubTabTarget("cont_file_from_repository",
493  $ilCtrl->getLinkTarget($this, $a_cmd), $a_cmd);
494  $ilCtrl->setParameter($this, "subCmd", "");
495 
496  if(!$ilSetting->get("disable_personal_workspace") &&
497  !$ilSetting->get("disable_wsp_files"))
498  {
499  $ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
500  $ilTabs->addSubTabTarget("cont_file_from_workspace",
501  $ilCtrl->getLinkTarget($this, $a_cmd), $a_cmd);
502  $ilCtrl->setParameter($this, "subCmd", "");
503  }
504  }
505  }
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

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