ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPCTabsTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("Services/Table/classes/class.ilTable2GUI.php");
5 
15 {
19  protected $ctrl;
20 
21 
22  public function __construct(
23  $a_parent_obj,
24  $a_parent_cmd,
25  $a_tabs
26  ) {
27  global $DIC;
28 
29  $this->ctrl = $DIC->ctrl();
30  $this->lng = $DIC->language();
31  $ilCtrl = $DIC->ctrl();
32  $lng = $DIC->language();
33 
34  parent::__construct($a_parent_obj, $a_parent_cmd);
35 
36  $this->addColumn("", "", "1");
37  $this->addColumn($lng->txt("cont_position"), "", "1");
38  $this->addColumn($lng->txt("title"), "", "100%");
39  $this->setEnableHeader(true);
40  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
41  $this->setRowTemplate(
42  "tpl.tabs_row.html",
43  "Services/COPage"
44  );
45 
46  $this->tabs = $a_tabs;
47  $caps = $this->tabs->getCaptions();
48  $this->setData($this->tabs->getCaptions());
49  $this->setLimit(0);
50 
51  $this->addMultiCommand("confirmTabsDeletion", $lng->txt("delete"));
52  $this->addCommandButton("saveTabs", $lng->txt("save"));
53 
54  $this->setTitle($lng->txt("cont_tabs"));
55  }
56 
61  protected function fillRow($a_set)
62  {
63  $lng = $this->lng;
65 
66  $this->pos += 10;
67  $this->tpl->setVariable("POS", ilUtil::prepareFormOutput($this->pos));
68  $this->tpl->setVariable("TID", $a_set["hier_id"] . ":" . $a_set["pc_id"]);
69  $this->tpl->setVariable("VAL_CAPTION", ilUtil::prepareFormOutput($a_set["caption"]));
70  }
71 }
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
__construct( $a_parent_obj, $a_parent_cmd, $a_tabs)
TableGUI class for tabs.
Class ilTable2GUI.
addMultiCommand($a_cmd, $a_text)
Add Command button.
fillRow($a_set)
Standard Version of Fill Row.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setEnableHeader($a_enableheader)
Set Enable Header.
setLimit($a_limit=0, $a_default_limit=0)