19declare(strict_types=1);
54 private readonly UIFactory $ui_factory,
63 private readonly
int $pool_id
79 return $this->
access->canManageParticipants($this->ref_id);
91 ->withParameter($action_token, $this->
getActionId())
92 ->withParameter($action_type_token, self::SHOW_MODAL_ACTION),
107 array $selected_records,
108 bool $all_records_selected
111 $this->
lng->txt(
'confirm'),
112 $this->
lng->txt(
'book_confirm_remove_participant'),
113 $url_builder->buildURI()->__toString()
114 )->withAffectedItems(
117 (string) $record[
'user_id'],
118 (string) ($record[
'name'] ??
'')
122 )->withActionButtonLabel($this->
lng->txt(
'remove'));
127 array $selected_records,
128 bool $all_records_selected
130 if (!$this->
access->canManageParticipants($this->ref_id)) {
135 foreach ($selected_records as $record) {
136 $this->participant_repository->delete((
int) $record[
'user_id'], $this->pool_id);
139 if ($selected_records !== []) {
142 $this->
ctrl->redirectByClass(ilBookingParticipantGUI::class,
'render');
151 if ($selected_ids ===
null) {
152 return array_values($all_participants);
157 fn(
int $id): ?array => $all_participants[
"{$this->pool_id}_{$id}"] ??
null,
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
@phpstan-type ParticipantRecord array{user_id: int, name: string, object_title: array<string>,...
__construct(private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly ilLanguage $lng, private readonly AccessManager $access, private readonly ilCtrlInterface $ctrl, private readonly ilGlobalTemplateInterface $tpl, private readonly HttpService $http, private readonly ParticipantRepository $participant_repository, private readonly int $ref_id, private readonly int $pool_id)
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
onSubmit(URLBuilder $url_builder, array $selected_records, bool $all_records_selected)
resolveRecords(?array $selected_ids=null)
allowActionForRecord(mixed $record)
getModal(URLBuilder $url_builder, array $selected_records, bool $all_records_selected)
const string ACTION_LABEL
Builds a Color from either hex- or rgb values.
@ilCtrl_Calls ilBookingParticipantGUI: ilRepositorySearchGUI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getList(int $a_booking_pool, ?array $a_filter=null, ?int $a_object_id=null)
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...
showErrorMessage(string $message)
readonly HttpService $http
readonly UIRenderer $ui_renderer
showSuccessMessage(string $message)
trait TableActionModalTrait
@template RecordType
modal(string $title="", string $cancel_label="")
if(!file_exists('../ilias.ini.php'))