ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilWikiExportOrderTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
17  protected $order; // [int]
18 
28  public function __construct($a_parent_obj, $a_parent_cmd = "", $a_pdf_export, array &$a_all_pages, array $a_page_ids)
29  {
30  global $ilCtrl, $lng;
31 
32  parent::__construct($a_parent_obj, $a_parent_cmd);
33 
34  if(!(bool)$a_pdf_export)
35  {
36  $title = "wiki_show_print_view";
37  $cmd = "printView";
38  }
39  else
40  {
41  $title = "wiki_show_pdf_export";
42  $cmd = "pdfExport";
43  }
44 
45  $this->setTitle($lng->txt($title));
46 
47  $this->addColumn($lng->txt("wiki_ordering"), "", "1");
48  $this->addColumn($lng->txt("wiki_page"));
49 
50  $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), $this->getParentCmd()));
51  $this->addCommandButton($this->getParentCmd(), $lng->txt("refresh"));
52 
53  include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
54  $button = ilSubmitButton::getInstance();
55  $button->setOmitPreventDoubleSubmission((bool)$a_pdf_export);
56  $button->setCaption("continue");
57  $button->setCommand($cmd);
58  $this->addCommandButtonInstance($button);
59 
60  $this->setRowTemplate("tpl.table_row_export_order.html", "Modules/Wiki");
61  $this->setLimit(9999);
62 
63  $this->getItems($a_all_pages, $a_page_ids);
64  }
65 
69  protected function getItems(array &$a_all_pages, array $a_page_ids)
70  {
71  $data = array();
72 
73  foreach ($a_page_ids as $page_id)
74  {
75  $data[] = array(
76  "id" => $page_id,
77  "title" => $a_all_pages[$page_id]["title"]
78  );
79  }
80 
81  $this->setData($data);
82  }
83 
88  protected function fillRow($a_set)
89  {
90  $this->order += 10;
91 
92  $this->tpl->setVariable("PAGE_ID", $a_set["id"]);
93  $this->tpl->setVariable("TITLE", $a_set["title"]);
94  $this->tpl->setVariable("ORDER", $this->order);
95 
96  }
97 
98 }
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
addCommandButtonInstance(ilButtonBase $a_button)
Add Command button instance.
fillRow($a_set)
Standard Version of Fill Row.
$cmd
Definition: sahs_server.php:35
__construct($a_parent_obj, $a_parent_cmd="", $a_pdf_export, array &$a_all_pages, array $a_page_ids)
Constructor.
getParentCmd()
Get parent command.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $lng
Definition: privfeed.php:17
getItems(array &$a_all_pages, array $a_page_ids)
Get contributors of wiki.
TableGUI class for ordering pages to be printed/exported.
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.
setLimit($a_limit=0, $a_default_limit=0)