51 : string
52 {
53 $tpl = new \ilTemplate(
"tpl.obj_selection.html",
true,
true,
"components/ILIAS/BookingManager/BookingProcess");
54
55 $selected = $this->object_selection->getSelectedObjects();
56
57 if ($selected === []) {
58 $this->
ui->mainTemplate()->setOnScreenMessage(
60 $this->
lng->txt(
"book_week_no_objects_selected")
61 );
62 }
63
64 foreach ($this->object_manager->getObjectTitles() as
$id => $title) {
66 if (in_array(
$id, $selected)) {
68 }
73 }
74
76 $submit_button = $this->
ui->factory()->button()->standard(
77 $this->
lng->txt(
"book_refresh"),
78 "#"
79 )->withAdditionalOnLoadCode(
function (
$id) {
80 return <<<EOT
81 const book_submit_btn = document.getElementById('$id');
82 book_submit_btn.addEventListener(
"click", (
event) => {
83 book_submit_btn.closest(
'form').
submit();
return false;
84 });
85EOT;
86 });
88
89 $p = $this->
ui->factory()->panel()->secondary()->legacy(
90 $this->
lng->txt(
"book_object_selection"),
91 $this->ui->factory()->legacy()->content(
$tpl->
get())
92 );
93 return $this->
ui->renderer()->render($p);
94 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
submit(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token,)
readonly ilGlobalTemplateInterface $tpl