47 $this->ui_factory = $DIC->ui()->factory();
48 $this->ui_renderer = $DIC->ui()->renderer();
49 $this->
ctrl = $DIC->ctrl();
50 $this->
lng = $DIC->language();
65 if (!$this->has_multiple_bookings) {
68 return $this->ui_factory->modal()->roundtrip(
74 $this->
ctrl->getLinkTarget(
76 $this->type == self::TYPE_CANCEL ?
'cancelBooking' :
'deleteBooking' 78 )->withCancelButtonLabel($this->
lng->txt(
'close'))
84 switch ($this->type) {
85 case self::TYPE_CANCEL:
86 return $this->
lng->txt(
'cal_cancel_booking');
87 case self::TYPE_DELETE:
88 return $this->
lng->txt(
'cal_ch_delete_booking');
94 switch ($this->type) {
95 case self::TYPE_CANCEL:
96 return $this->
lng->txt(
'cal_cancel_booking');
97 case self::TYPE_DELETE:
98 return $this->
lng->txt(
'cal_ch_delete_booking');
104 switch ($this->type) {
105 case self::TYPE_CANCEL:
106 return $this->ui_factory->messageBox()->confirmation(
107 $this->
lng->txt(
'cal_ch_cancel_booking_sure')
109 case self::TYPE_DELETE:
110 return $this->ui_factory->messageBox()->confirmation(
111 $this->
lng->txt(
'cal_ch_delete_booking_sure')
118 switch ($this->type) {
119 case self::TYPE_CANCEL:
120 return $this->ui_factory->messageBox()->info(
121 $this->
lng->txt(
'cal_ch_cancel_booking_info')
123 case self::TYPE_DELETE:
124 return $this->ui_factory->messageBox()->info(
125 $this->
lng->txt(
'cal_ch_delete_booking_info')
132 switch ($this->type) {
133 case self::TYPE_CANCEL:
134 return $this->ui_factory->button()->primary(
135 $this->
lng->txt(
'cal_cancel_booking'),
136 $this->
ctrl->getLinkTarget($this->parent_object,
'cancelBooking')
138 case self::TYPE_DELETE:
139 return $this->ui_factory->button()->primary(
140 $this->
lng->txt(
'cal_ch_delete_booking'),
141 $this->
ctrl->getLinkTarget($this->parent_object,
'deleteBooking')
149 foreach ($this->booking->getCurrentBookings($this->entry->getEntryId()) as $booking_user_id) {
155 return $this->ui_factory->legacy()->content(implode(
'<br/', $user_info));
162 if ($this->has_multiple_bookings) {
164 foreach ($this->booking->getCurrentBookings($this->entry->getEntryId()) as $bookuser) {
166 $this->ui_factory->input()->field()->checkbox(
172 foreach ($this->booking->getCurrentBookings($this->entry->getEntryId()) as $bookuser) {
174 $this->ui_factory->input()->field()->hidden(
179 return $this->ui_factory->input()->field()->section(
188 $this->entry->getTitle() .
', ' .
194 $this->has_multiple_bookings = $this->booking->getCurrentNumberOfBookings($this->entry->getEntryId()) > 1;
static _lookupFullname(int $a_user_id)
Interface Observer Contains several chained tasks and infos about them.
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...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
ILIAS UI Factory $ui_factory