46 $this->ui_factory = $DIC->ui()->factory();
47 $this->ui_renderer = $DIC->ui()->renderer();
48 $this->
ctrl = $DIC->ctrl();
49 $this->
lng = $DIC->language();
64 if (!$this->has_multiple_bookings) {
67 return $this->ui_factory->modal()->roundtrip(
73 $this->
ctrl->getLinkTarget(
75 $this->type == self::TYPE_CANCEL ?
'cancelBooking' :
'deleteBooking' 77 )->withCancelButtonLabel($this->
lng->txt(
'close'))
83 switch ($this->type) {
84 case self::TYPE_CANCEL:
85 return $this->
lng->txt(
'cal_cancel_booking');
86 case self::TYPE_DELETE:
87 return $this->
lng->txt(
'cal_ch_delete_booking');
93 switch ($this->type) {
94 case self::TYPE_CANCEL:
95 return $this->
lng->txt(
'cal_cancel_booking');
96 case self::TYPE_DELETE:
97 return $this->
lng->txt(
'cal_ch_delete_booking');
103 switch ($this->type) {
104 case self::TYPE_CANCEL:
105 return $this->ui_factory->messageBox()->confirmation(
106 $this->
lng->txt(
'cal_ch_cancel_booking_sure')
108 case self::TYPE_DELETE:
109 return $this->ui_factory->messageBox()->confirmation(
110 $this->
lng->txt(
'cal_ch_delete_booking_sure')
117 switch ($this->type) {
118 case self::TYPE_CANCEL:
119 return $this->ui_factory->messageBox()->info(
120 $this->
lng->txt(
'cal_ch_cancel_booking_info')
122 case self::TYPE_DELETE:
123 return $this->ui_factory->messageBox()->info(
124 $this->
lng->txt(
'cal_ch_delete_booking_info')
131 switch ($this->type) {
132 case self::TYPE_CANCEL:
133 return $this->ui_factory->button()->primary(
134 $this->
lng->txt(
'cal_cancel_booking'),
135 $this->
ctrl->getLinkTarget($this->parent_object,
'cancelBooking')
137 case self::TYPE_DELETE:
138 return $this->ui_factory->button()->primary(
139 $this->
lng->txt(
'cal_ch_delete_booking'),
140 $this->
ctrl->getLinkTarget($this->parent_object,
'deleteBooking')
148 foreach ($this->booking->getCurrentBookings($this->entry->getEntryId()) as $booking_user_id) {
154 return $this->ui_factory->legacy(implode(
'<br/', $user_info));
161 if ($this->has_multiple_bookings) {
163 foreach ($this->booking->getCurrentBookings($this->entry->getEntryId()) as $bookuser) {
165 $this->ui_factory->input()->field()->checkbox(
171 foreach ($this->booking->getCurrentBookings($this->entry->getEntryId()) as $bookuser) {
173 $this->ui_factory->input()->field()->hidden(
178 return $this->ui_factory->input()->field()->section(
187 $this->entry->getTitle() .
', ' .
193 $this->has_multiple_bookings = $this->booking->getCurrentNumberOfBookings($this->entry->getEntryId()) > 1;
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
static _lookupFullname(int $a_user_id)
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
bool $has_multiple_bookings
ILIAS UI Renderer $ui_renderer
__construct(object $parent_object, \ilCalendarEntry $entry, \ilBookingEntry $booking, int $type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS UI Factory $ui_factory