ILIAS  release_8 Revision v8.24
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
55 $button->setCaption("continue");
56 $button->setCommand($cmd);
57 $this->addCommandButtonInstance($button);
58
59 $this->setRowTemplate("tpl.table_row_export_order.html", "Modules/Wiki");
60 $this->setLimit(9999);
61
62 $this->getItems($a_all_pages, $a_page_ids);
63 }
64
65 protected function getItems(
66 array $a_all_pages,
67 array $a_page_ids
68 ): void {
69 $data = array();
70
71 foreach ($a_page_ids as $page_id) {
72 $data[] = array(
73 "id" => $page_id,
74 "title" => $a_all_pages[$page_id]["title"]
75 );
76 }
77
78 $this->setData($data);
79 }
80
81 protected function fillRow(array $a_set): void
82 {
83 $this->order += 10;
84
85 $this->tpl->setVariable("PAGE_ID", $a_set["id"]);
86 $this->tpl->setVariable("TITLE", $a_set["title"]);
87 $this->tpl->setVariable("ORDER", $this->order);
88 }
89}
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)
addCommandButtonInstance(ilButtonBase $a_button)
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)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc