19declare(strict_types=1);
32 protected \ilLanguage
$lng;
33 protected \ILIAS\DI\UIServices
$ui;
42 $this->
ui = $DIC->ui();
43 $this->
lng = $DIC->language();
44 $this->object_manager =
$DIC->bookingManager()->internal()->domain()
47 $this->object_selection =
$DIC->bookingManager()->internal()->domain()
48 ->objectSelection($pool_id);
53 $tpl = new \ilTemplate(
"tpl.obj_selection.html",
true,
true,
"components/ILIAS/BookingManager/BookingProcess");
55 $selected = $this->object_selection->getSelectedObjects();
57 if ($selected === []) {
58 $this->
ui->mainTemplate()->setOnScreenMessage(
60 $this->
lng->txt(
"book_week_no_objects_selected")
64 foreach ($this->object_manager->getObjectTitles() as
$id => $title) {
66 if (in_array(
$id, $selected)) {
76 $submit_button = $this->
ui->factory()->button()->standard(
77 $this->
lng->txt(
"book_refresh"),
79 )->withAdditionalOnLoadCode(
function (
$id) {
81 const book_submit_btn = document.getElementById(
'$id');
82 book_submit_btn.addEventListener(
"click", (
event) => {
83 book_submit_btn.closest(
'form').
submit();
return false;
89 $p = $this->
ui->factory()->panel()->secondary()->legacy(
90 $this->
lng->txt(
"book_object_selection"),
91 $this->ui->factory()->legacy()->content(
$tpl->
get())
93 return $this->
ui->renderer()->render($p);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(int $pool_id, string $form_action)
ILIAS BookingManager Objects ObjectsManager $object_manager
ObjectSelectionManager $object_selection
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
submit(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token,)
readonly ilGlobalTemplateInterface $tpl