ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWikiExportOrderTableGUI.php
Go to the documentation of this file.
1<?php
2
25{
26 protected int $order = 0;
27
28 public function __construct(
29 object $a_parent_obj,
30 string $a_parent_cmd,
31 array $a_all_pages,
32 array $a_page_ids
33 ) {
34 global $DIC;
35
36 $this->ctrl = $DIC->ctrl();
37 $this->lng = $DIC->language();
38 $ilCtrl = $DIC->ctrl();
39 $lng = $DIC->language();
40
41 parent::__construct($a_parent_obj, $a_parent_cmd);
42
43 $title = "wiki_show_print_view";
44 $cmd = "printView";
45
46 $this->setTitle($lng->txt($title));
47
48 $this->addColumn($lng->txt("wiki_ordering"), "", "1");
49 $this->addColumn($lng->txt("wiki_page"));
50
51 $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), $this->getParentCmd()));
52 $this->addCommandButton($this->getParentCmd(), $lng->txt("refresh"));
53
54 $this->addCommandButton($cmd, $lng->txt("continue"));
55
56 $this->setRowTemplate("tpl.table_row_export_order.html", "components/ILIAS/Wiki");
57 $this->setLimit(9999);
58
59 $this->getItems($a_all_pages, $a_page_ids);
60 }
61
62 protected function getItems(
63 array $a_all_pages,
64 array $a_page_ids
65 ): void {
66 $data = array();
67
68 foreach ($a_page_ids as $page_id) {
69 $data[] = array(
70 "id" => $page_id,
71 "title" => $a_all_pages[$page_id]["title"]
72 );
73 }
74
75 $this->setData($data);
76 }
77
78 protected function fillRow(array $a_set): void
79 {
80 $this->order += 10;
81
82 $this->tpl->setVariable("PAGE_ID", $a_set["id"]);
83 $this->tpl->setVariable("TITLE", $a_set["title"]);
84 $this->tpl->setVariable("ORDER", $this->order);
85 }
86}
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Standard Version of Fill Row.
__construct(object $a_parent_obj, string $a_parent_cmd, array $a_all_pages, array $a_page_ids)
getItems(array $a_all_pages, array $a_page_ids)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26