1 <?php declare(strict_types=1);
25 protected \ilLanguage
$lng;
26 protected \ILIAS\DI\UIServices
$ui;
35 $this->
ui = $DIC->ui();
36 $this->
lng = $DIC->language();
37 $this->object_manager = $DIC->bookingManager()->internal()->domain()
40 $this->object_selection = $DIC->bookingManager()->internal()->domain()
41 ->objectSelection($pool_id);
46 $tpl = new \ilTemplate(
"tpl.obj_selection.html",
true,
true,
"Modules/BookingManager/BookingProcess");
48 $selected = $this->object_selection->getSelectedObjects();
49 foreach ($this->object_manager->getObjectTitles() as
$id => $title) {
50 $tpl->setCurrentBlock(
"item");
51 if (in_array($id, $selected)) {
52 $tpl->setVariable(
"CHECKED",
"checked='checked'");
54 $tpl->setVariable(
"ID", $id);
55 $tpl->setVariable(
"COLOR_NR", $this->object_manager->getColorNrForObject($id));
56 $tpl->setVariable(
"TITLE", $title);
57 $tpl->parseCurrentBlock();
60 $tpl->setVariable(
"FORM_ACTION", $this->form_action);
61 $submit_button = $this->
ui->factory()->button()->standard(
62 $this->
lng->txt(
"book_refresh"),
66 const book_submit_btn = document.getElementById(
'$id');
67 book_submit_btn.addEventListener(
"click", (
event) => {
68 book_submit_btn.closest(
'form').submit();
return false;
72 $tpl->setVariable(
"BUTTON", $this->
ui->renderer()->render($submit_button));
74 $p = $this->
ui->factory()->panel()->secondary()->legacy(
75 $this->
lng->txt(
"book_object_selection"),
76 $this->
ui->factory()->legacy($tpl->get())
78 return $this->
ui->renderer()->render($p);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ObjectSelectionManager $object_selection
ILIAS BookingManager Objects ObjectsManager $object_manager
withAdditionalOnLoadCode(Closure $binder)
__construct(int $pool_id, string $form_action)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins