ILIAS  release_4-4 Revision
ilPCFileItemGUI Class Reference

Class ilPCFileItemGUI. More...

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

Public Member Functions

 ilPCFileItemGUI (&$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
 ilPageContentGUI ($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
 
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 
- 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.

Member Function Documentation

◆ cancelAddFile()

ilPCFileItemGUI::cancelAddFile ( )

Cancel adding a file.

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

527  {
528  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
529  }

◆ deleteItem()

ilPCFileItemGUI::deleteItem ( )

delete a list item

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

References $_SESSION.

464  {
465  $this->content_obj->deleteItem();
466  $_SESSION["il_pg_error"] = $this->pg_obj->update();
467  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
468  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ 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

◆ ilPCFileItemGUI()

ilPCFileItemGUI::ilPCFileItemGUI ( $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::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
47  }

◆ initAddFileForm()

ilPCFileItemGUI::initAddFileForm (   $a_before = true)

Init add file form.

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

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

Referenced by newItemAfter(), and newItemBefore().

175  {
176  global $lng, $ilCtrl, $ilUser;
177 
178  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
179  $form = new ilPropertyFormGUI();
180 
181  // file
182  $fi = new ilFileInputGUI($lng->txt("file"), "file");
183  $fi->setRequired(true);
184  $form->addItem($fi);
185 
186  if ($a_before)
187  {
188  $form->addCommandButton("insertNewItemBefore", $lng->txt("save"));
189  }
190  else
191  {
192  $form->addCommandButton("insertNewItemAfter", $lng->txt("save"));
193  }
194  $form->addCommandButton("cancelAddFile", $lng->txt("cancel"));
195 
196  $form->setTitle($lng->txt("cont_insert_file_item"));
197 
198  $form->setFormAction($ilCtrl->getFormAction($this));
199 
200  return $form;
201  }
This class represents a property form user interface.
This class represents a file property in a property form.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
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 207 of file class.ilPCFileItemGUI.php.

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

Referenced by newItemAfter(), and newItemBefore().

208  {
209  global $ilTabs, $tree, $ilCtrl, $tpl;
210 
211  $this->setTabs($a_cmd);
212  $ilTabs->setSubTabActive("cont_file_from_repository");
213 
214  include_once "./Services/COPage/classes/class.ilFileSelectorGUI.php";
215 
216  $exp = new ilFileSelectorGUI($this->ctrl->getLinkTarget($this, $a_cmd),
217  "ilpcfileitemgui");
218 
219  if ($_GET["expand"] == "")
220  {
221  $expanded = $tree->readRootId();
222  }
223  else
224  {
225  $expanded = $_GET["expand"];
226  }
227  $exp->setExpand($expanded);
228 
229  $exp->setTargetGet("sel_id");
230  //$this->ctrl->setParameter($this, "target_type", $a_type);
231  $ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
232  $exp->setParamsGet($this->ctrl->getParameterArray($this, $a_cmd));
233 
234  // filter
235  $exp->setFiltered(true);
236  $exp->setFilterMode(IL_FM_POSITIVE);
237  $exp->addFilter("root");
238  $exp->addFilter("cat");
239  $exp->addFilter("grp");
240  $exp->addFilter("fold");
241  $exp->addFilter("crs");
242  $exp->addFilter("file");
243 
244  $sel_types = array('file');
245 
246  $exp->setOutput(0);
247 
248  $tpl->setContent($exp->getOutput());
249  }
$_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
+ 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 254 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().

255  {
256  global $ilTabs, $tree, $ilCtrl, $tpl, $ilUser;
257 
258  $this->setTabs($a_cmd);
259  $ilTabs->setSubTabActive("cont_file_from_workspace");
260 
261  // get ws tree
262  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
263  $tree = new ilWorkspaceTree($ilUser->getId());
264 
265  // get access handler
266  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
267  $acc_handler = new ilWorkspaceAccessHandler($tree);
268 
269  // get es explorer
270  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
272  'filelist_wspexpand', $tree, $acc_handler);
273  $exp->setTargetGet('fl_wsp_id');
274  $exp->setFiltered(false);
275  $exp->removeAllFormItemTypes();
276 
277  // select link
278  $exp->setTypeClickable("file");
279  $ilCtrl->setParameter($this, "subCmd", "selectFile");
280  $exp->setCustomLinkTarget($ilCtrl->getLinkTarget($this, $a_cmd));
281 
282  // filter
283  $exp->setFiltered(true);
284  $exp->setFilterMode(IL_FM_POSITIVE);
285  $exp->addFilter("wsrt");
286  $exp->addFilter("wfld");
287  $exp->addFilter("file");
288 
289  // expand link
290  $ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
291  $exp->setParamsGet($ilCtrl->getParameterArray($this, $a_cmd));
292 
293  if($_GET['filelist_wspexpand'] == '')
294  {
295  $expanded = $tree->readRootId();
296  }
297  else
298  {
299  $expanded = $_GET['filelist_wspexpand'];
300  }
301  $exp->setExpand($expanded);
302  $exp->setOutput(0);
303 
304  $tpl->setContent($exp->getOutput());
305  }
$_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
global $ilUser
Definition: imgupload.php:15
+ 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 310 of file class.ilPCFileItemGUI.php.

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

Referenced by newItemAfter().

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

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

Referenced by newItemBefore().

422  {
423  global $ilUser;
424 
425  $res = true;
426  if(isset($_GET["fl_wsp_id"]))
427  {
428  // we need the object id for the instance
429  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
430  $tree = new ilWorkspaceTree($ilUser->getId());
431  $node = $tree->getNodeData($_GET["fl_wsp_id"]);
432 
433  include_once("./Modules/File/classes/class.ilObjFile.php");
434  $this->file_object = new ilObjFile($node["obj_id"], false);
435  }
436  else if ($a_file_ref_id == 0)
437  {
438  $res = $this->newFileItem();
439  }
440  else
441  {
442  include_once("./Modules/File/classes/class.ilObjFile.php");
443  $this->file_object = new ilObjFile($a_file_ref_id);
444  }
445  if ($res)
446  {
447  $this->content_obj->newItemBefore($this->file_object->getId(),
448  $this->file_object->getTitle(), $this->file_object->getFileType());
449  $this->updated = $this->pg_obj->update();
450  if ($this->updated === true)
451  {
452  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
453  }
454  }
455 
456  $_GET["subCmd"] = "-";
457  $this->newItemBefore();
458  }
$_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.
newFileItem()
insert new file item
global $ilUser
Definition: imgupload.php:15
+ 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 506 of file class.ilPCFileItemGUI.php.

References $_SESSION.

507  {
508  $this->content_obj->moveItemDown();
509  $_SESSION["il_pg_error"] = $this->pg_obj->update();
510  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
511  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ moveItemUp()

ilPCFileItemGUI::moveItemUp ( )

move list item up

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

References $_SESSION.

517  {
518  $this->content_obj->moveItemUp();
519  $_SESSION["il_pg_error"] = $this->pg_obj->update();
520  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
521  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ newFileItem()

ilPCFileItemGUI::newFileItem ( )

insert new file item

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

References $_GET, ilPageContentGUI\$lng, 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  include_once("./Modules/File/classes/class.ilObjFile.php");
83  $fileObj = new ilObjFile();
84  $fileObj->setType("file");
85  $fileObj->setTitle($_FILES["file"]["name"]);
86  $fileObj->setDescription("");
87  $fileObj->setFileName($_FILES["file"]["name"]);
88  $fileObj->setFileType($_FILES["file"]["type"]);
89  $fileObj->setFileSize($_FILES["file"]["size"]);
90  $fileObj->setMode("filelist");
91  $fileObj->create();
92  $fileObj->raiseUploadError(false);
93  // upload file to filesystem
94  $fileObj->createDirectory();
95  $fileObj->getUploadFile($_FILES["file"]["tmp_name"],
96  $_FILES["file"]["name"]);
97 
98  $this->file_object =& $fileObj;
99  return true;
100  }
$_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 106 of file class.ilPCFileItemGUI.php.

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

Referenced by insertNewItemAfter().

107  {
108  global $ilTabs;
109 
110  if ($_GET["subCmd"] == "insertNew")
111  {
112  $_SESSION["cont_file_insert"] = "insertNew";
113  }
114  if ($_GET["subCmd"] == "insertFromRepository")
115  {
116  $_SESSION["cont_file_insert"] = "insertFromRepository";
117  }
118  if ($_GET["subCmd"] == "insertFromWorkspace")
119  {
120  $_SESSION["cont_file_insert"] = "insertFromWorkspace";
121  }
122  if (($_GET["subCmd"] == "") && $_SESSION["cont_file_insert"] != "")
123  {
124  $_GET["subCmd"] = $_SESSION["cont_file_insert"];
125  }
126 
127  switch ($_GET["subCmd"])
128  {
129  case "insertFromWorkspace":
130  $this->insertFromWorkspace("newItemAfter");
131  break;
132 
133  case "insertFromRepository":
134  $this->insertFromRepository("newItemAfter");
135  break;
136 
137  case "selectFile":
138  $this->insertNewItemAfter($_GET["file_ref_id"]);
139  break;
140 
141  default:
142  $this->setTabs("newItemAfter");
143  $ilTabs->setSubTabActive("cont_new_file");
144 
145  $this->displayValidationError();
146  $form = $this->initAddFileForm(false);
147  $this->tpl->setContent($form->getHTML());
148 break;
149 
150  // new file list form
151  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.file_item_edit.html", "Services/COPage");
152  $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_insert_file_item"));
153  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
154 
155  $this->displayValidationError();
156 
157  // file
158  $this->tpl->setVariable("TXT_FILE", $this->lng->txt("file"));
159 
160  $this->tpl->parseCurrentBlock();
161 
162  // operations
163  $this->tpl->setCurrentBlock("commands");
164  $this->tpl->setVariable("BTN_NAME", "insertNewItemAfter");
165  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
166  $this->tpl->parseCurrentBlock();
167  break;
168  }
169  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
initAddFileForm($a_before=true)
Init add file form.
$_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 352 of file class.ilPCFileItemGUI.php.

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

Referenced by insertNewItemBefore().

353  {
354  global $ilTabs;
355 
356  if ($_GET["subCmd"] == "insertNew")
357  {
358  $_SESSION["cont_file_insert"] = "insertNew";
359  }
360  if ($_GET["subCmd"] == "insertFromRepository")
361  {
362  $_SESSION["cont_file_insert"] = "insertFromRepository";
363  }
364  if ($_GET["subCmd"] == "insertFromWorkspace")
365  {
366  $_SESSION["cont_file_insert"] = "insertFromWorkspace";
367  }
368  if (($_GET["subCmd"] == "") && $_SESSION["cont_file_insert"] != "")
369  {
370  $_GET["subCmd"] = $_SESSION["cont_file_insert"];
371  }
372 
373  switch ($_GET["subCmd"])
374  {
375  case "insertFromWorkspace":
376  $this->insertFromWorkspace("newItemBefore");
377  break;
378 
379  case "insertFromRepository":
380  $this->insertFromRepository("newItemBefore");
381  break;
382 
383  case "selectFile":
384  $this->insertNewItemBefore($_GET["file_ref_id"]);
385  break;
386 
387  default:
388  $this->setTabs("newItemBefore");
389  $ilTabs->setSubTabActive("cont_new_file");
390 
391  $this->displayValidationError();
392  $form = $this->initAddFileForm(true);
393  $this->tpl->setContent($form->getHTML());
394 break;
395 
396  // new file list form
397  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.file_item_edit.html", "Services/COPage");
398  $this->tpl->setVariable("TXT_ACTION", $this->lng->txt("cont_insert_file_item"));
399  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
400 
401  $this->displayValidationError();
402 
403  // file
404  $this->tpl->setVariable("TXT_FILE", $this->lng->txt("file"));
405 
406  $this->tpl->parseCurrentBlock();
407 
408  // operations
409  $this->tpl->setCurrentBlock("commands");
410  $this->tpl->setVariable("BTN_NAME", "insertNewItemBefore");
411  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
412  $this->tpl->parseCurrentBlock();
413  break;
414  }
415 
416  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
initAddFileForm($a_before=true)
Init add file form.
$_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 473 of file class.ilPCFileItemGUI.php.

References $ilCtrl, and $ilSetting.

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

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

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