19declare(strict_types=1);
57 private readonly UIFactory $ui_factory,
65 private readonly array $bookings
86 if (!$this->
access->canManageReservationForUser($this->booking_pool->getRefId(), $record[
'user_id'])) {
104 ->withParameter($action_token, self::
ACTION_ID)
105 ->withParameter($action_type_token, self::SHOW_MODAL_ACTION),
112 array $selected_records,
113 bool $all_records_selected
116 $this->
lng->txt(
'confirm'),
117 $this->
lng->txt(
'book_confirm_cancel'),
118 $url_builder->buildURI()->__toString()
119 )->withAffectedItems(
122 (string) $selected_record[
'booking_reservation_id'],
123 $this->formatBookingDescription($selected_record)
127 )->withActionButtonLabel($this->
lng->txt($this->getActionLabel()));
133 foreach ($selected_records as $selected_record) {
134 if (!$this->
access->canManageReservationForUser($this->booking_pool->getRefId(), $selected_record[
'user_id'])) {
146 foreach ($selected_records as $selected_record) {
149 $booking_reservation->update();
152 $calendar_entry_id = $booking_reservation->getCalendarEntry();
153 if ($calendar_entry_id) {
167 fn(
int $selected_record): array => $this->bookings[$selected_record],
168 $selected_ids ?? array_keys($this->bookings)
183 return implode(
' – ',
$parts);
resolveRecords(?array $selected_ids=null)
__construct(private readonly AccessManager $access, private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly Language $lng, private readonly ReservationDBRepository $reservation_repository, private readonly HttpService $http, private readonly ilGlobalTemplateInterface $tpl, private readonly ilCtrlInterface $ctrl, private readonly ilObjBookingPool $booking_pool, private readonly array $bookings)
const string ACTION_LABEL
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
formatBookingDescription(array $booking)
onSubmit(URLBuilder $url_builder, array $selected_records, bool $all_records_selected)
getModal(URLBuilder $url_builder, array $selected_records, bool $all_records_selected)
allowActionForRecord(mixed $record)
Repo class for reservations Acts on tables booking_reservation (rw), booking_reservation_group (rw) a...
Builds a Color from either hex- or rgb values.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const int STATUS_CANCELLED
Model for a calendar entry.
Class for date presentation.
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface InterruptiveItem.
This describes commonalities between the different modals.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
showErrorMessage(string $message)
readonly HttpService $http
readonly UIRenderer $ui_renderer
showSuccessMessage(string $message)
trait TableActionModalTrait
@template RecordType
modal(string $title="", string $cancel_label="")