ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilBookingBulkCreationTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 {
23  public function __construct(
24  ilBookBulkCreationGUI $a_parent_obj,
25  string $a_parent_cmd,
26  string $raw_data,
27  int $pool_id
28  ) {
29  global $DIC;
30 
31  $this->rows_selector_off = true;
32  $this->setId("bulk_creation");
33  parent::__construct($a_parent_obj, $a_parent_cmd);
34  $objects_manager = $DIC->bookingManager()
35  ->internal()
36  ->domain()
37  ->objects($pool_id);
38  $html_util = $DIC->bookingManager()->internal()->gui()->html();
39 
40  $ctrl = $DIC->ctrl();
41  $lng = $DIC->language();
42  $this->setMaxCount(9999);
43 
44  $this->setTitle($lng->txt("book_booking_objects"));
45  $this->setData($objects_manager->getDataArrayFromInputString($raw_data));
46 
47  $this->addColumn($this->lng->txt("title"));
48  $this->addColumn($this->lng->txt("description"));
49  $this->addColumn($this->lng->txt("booking_nr_of_items"));
50 
51  $this->setFormAction($ctrl->getFormAction($a_parent_obj, "createObjects"));
52  $this->setRowTemplate(
53  "tpl.bulk_creation_row.html",
54  "components/ILIAS/BookingManager/Objects"
55  );
56  $this->addHiddenInput(
57  "data",
58  $html_util->escape($raw_data)
59  );
60  }
61 
62  protected function fillRow(array $a_set): void
63  {
64  $this->tpl->setVariable("TITLE", $a_set["title"]);
65  $this->tpl->setVariable("DESCRIPTION", $a_set["description"]);
66  $this->tpl->setVariable("NR", $a_set["nr"]);
67  }
68 
69 }
__construct(ilBookBulkCreationGUI $a_parent_obj, string $a_parent_cmd, string $raw_data, int $pool_id)
setData(array $a_data)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addHiddenInput(string $a_name, string $a_value)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:25
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)
getFormAction(object $a_gui_obj, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
setMaxCount(int $a_max_count)
set max.