19declare(strict_types=1);
54 private readonly UIFactory $ui_factory,
78 return $this->
access->canManageSettings($this->ref_id);
90 ->withParameter($action_token, self::
ACTION_ID)
91 ->withParameter($action_type_token, self::SHOW_MODAL_ACTION),
98 return $this->
access->canManageSettings($this->ref_id) && !$record[
'is_used'];
103 array $selected_records,
104 bool $all_records_selected
107 $this->
lng->txt(
'confirm'),
108 $this->
lng->txt(
'book_confirm_delete'),
109 $url_builder->buildURI()->__toString()
110 )->withAffectedItems(
113 (string) $record[
'booking_schedule_id'],
114 $record[
'title'] ??
''
118 )->withActionButtonLabel($this->
lng->txt(
'delete'));
123 array $selected_records,
124 bool $all_records_selected
126 if (!$this->
access->canManageSettings($this->ref_id)) {
131 $selected_records = array_filter(
133 static fn(array $record):
bool => !($record[
'is_used'] ??
true)
136 foreach ($selected_records as $record) {
140 if ($selected_records !== []) {
143 $this->
ctrl->redirectByClass(ilBookingScheduleGUI::class,
'render');
149 $schedules = $this->schedule_manager->getScheduleData();
151 if ($selected_ids ===
null) {
157 static fn(
int $id): ?array => $schedules[
$id] ??
null,
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
@phpstan-type ScheduleRecord array{booking_schedule_id: int, title: string, object_has_schedule: ?...
allowActionForRecord(mixed $record)
onSubmit(URLBuilder $url_builder, array $selected_records, bool $all_records_selected)
resolveRecords(?array $selected_ids=null)
__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 ScheduleManager $schedule_manager, private readonly int $ref_id,)
const string ACTION_LABEL
getModal(URLBuilder $url_builder, array $selected_records, bool $all_records_selected)
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
Builds a Color from either hex- or rgb values.
@ilCtrl_Calls ilBookingScheduleGUI:
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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'))