ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilBookingBulkCreationTableGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public function __construct(
27  ilBookBulkCreationGUI $a_parent_obj,
28  string $a_parent_cmd,
29  string $raw_data,
30  int $pool_id
31  ) {
32  global $DIC;
33 
34  $this->rows_selector_off = true;
35  $this->setId("bulk_creation");
36  parent::__construct($a_parent_obj, $a_parent_cmd);
37  $objects_manager = $DIC->bookingManager()
38  ->internal()
39  ->domain()
40  ->objects($pool_id);
41  $html_util = $DIC->bookingManager()->internal()->gui()->html();
42 
43  $ctrl = $DIC->ctrl();
44  $lng = $DIC->language();
45  $this->setMaxCount(9999);
46 
47  $this->setTitle($lng->txt("book_booking_objects"));
48  $this->setData($objects_manager->getDataArrayFromInputString($raw_data));
49 
50  $this->addColumn($this->lng->txt("title"));
51  $this->addColumn($this->lng->txt("description"));
52  $this->addColumn($this->lng->txt("booking_nr_of_items"));
53 
54  $this->setFormAction($ctrl->getFormAction($a_parent_obj, "createObjects"));
55  $this->setRowTemplate(
56  "tpl.bulk_creation_row.html",
57  "components/ILIAS/BookingManager/Objects"
58  );
59  $this->addHiddenInput(
60  "data",
61  $html_util->escape($raw_data)
62  );
63  }
64 
65  protected function fillRow(array $a_set): void
66  {
67  $this->tpl->setVariable("TITLE", $a_set["title"]);
68  $this->tpl->setVariable("DESCRIPTION", $a_set["description"]);
69  $this->tpl->setVariable("NR", $a_set["nr"]);
70  }
71 
72 }
__construct(ilBookBulkCreationGUI $a_parent_obj, string $a_parent_cmd, string $raw_data, int $pool_id)
setData(array $a_data)
getFormAction(object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
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...
setFormAction(string $a_form_action, bool $a_multipart=false)
ilLanguage $lng
setId(string $a_val)
addHiddenInput(string $a_name, string $a_value)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:26
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
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)
setMaxCount(int $a_max_count)
set max.