19declare(strict_types=1);
49 private readonly UIFactory $ui_factory,
57 private readonly array $bookings
78 return $this->
access->canManageAllReservations($this->booking_pool->getRefId());
87 $action_type = $this->
access->canManageAllReservations($this->booking_pool->getRefId()) ?
'standard' :
'single';
88 return $this->ui_factory->table()->action()->$action_type(
89 $this->
lng->txt($this->getActionLabel()),
92 ->withParameter($action_type_token,
'mail'),
103 $row_parameters = $this->
http->resolveRowParameters($row_id_token->getName());
107 if ($selected_user_ids === []) {
108 $this->tpl->setOnScreenMessage(
110 $this->
lng->txt(
'no_valid_selection'),
117 foreach ($selected_user_ids as
$user_id) {
129 'rcp_to' => implode(
',', $users),
138 $user_ids = array_map(
139 fn(
int $reservation_id):
int => $this->bookings[$reservation_id][
'user_id'],
140 $selected_ids ?? array_keys($this->bookings)
142 return array_values(array_unique($user_ids));
148 $sig = chr(13) . chr(10) . chr(13) . chr(10) . chr(13) . chr(10);
149 $sig .=
"{$this->lng->txt('book_mail_permanent_link')}: ";
150 $sig .= chr(13) . chr(10);
151 $sig .= ilLink::_getLink($this->booking_pool->getRefId());
152 return rawurlencode(base64_encode($sig));
onExecute(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
__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)
resolveRecords(?array $selected_ids=null)
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
const string ACTION_LABEL
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.
withParameter(URLBuilderToken $token, string|array $value)
Change an acquired parameter's value if the supplied token is valid.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupLogin(int $a_user_id)
const MESSAGE_TYPE_FAILURE
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...
resolveRecords(?array $selected_ids=null)
readonly HttpService $http
readonly UIRenderer $ui_renderer
static http()
Fetches the global http state from ILIAS.