18 declare(strict_types=1);
46 public const ID_TOKEN_NS = self::TABLE_NS .
'_' . self::ID_TOKEN;
66 $this->
lng = $DIC->language();
67 $this->
user = $DIC->user();
68 $this->
ctrl = $DIC->ctrl();
70 $this->http_request = $DIC->http()->request();
71 $this->ui_factory = $DIC->ui()->factory();
73 $this->ui_renderer = $DIC->ui()->renderer();
78 array $visible_column_ids,
82 ?array $additional_parameters
84 $records = $this->provider->limitData($range, $order);
85 foreach ($records as $row) {
88 if (count($row[
'booking_participant']->getItems()) === 0) {
89 $records_row = $records_row
90 ->withDisabledAction(
'confirmCancelBooking')
91 ->withDisabledAction(
'confirmDeleteBooking')
92 ->withDisabledAction(
'sendMail');
100 return count($this->provider->getData());
105 return $this->ui_factory
108 $this->
lng->txt(
'cal_ch_ch'),
112 ->withId(self::class)
114 ->withRequest($this->http_request);
123 $uri_command_handler = $this->data_factory->uri(
124 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
125 ilConsultationHoursGUI::class,
126 'handleBookingTableActions' 132 $action_parameter_token,
135 (
new URLBuilder($uri_command_handler))->acquireParameters(
142 'edit' => $this->ui_factory->table()->action()->standard(
143 $this->
lng->txt(
'edit'),
144 $url_builder->withParameter($action_parameter_token,
'edit'),
147 'searchUsersForAppointments' => $this->ui_factory->table()->action()->standard(
148 $this->
lng->txt(
'cal_ch_assign_participants'),
149 $url_builder->withParameter($action_parameter_token,
'searchUsersForAppointments'),
152 'confirmCancelBooking' => $this->ui_factory->table()->action()->single(
153 $this->
lng->txt(
'cal_ch_cancel_booking'),
154 $url_builder->withParameter($action_parameter_token,
'confirmCancelBooking'),
157 'confirmDeleteBooking' => $this->ui_factory->table()->action()->single(
158 $this->
lng->txt(
'cal_ch_delete_booking'),
159 $url_builder->withParameter($action_parameter_token,
'confirmDeleteBooking'),
162 'confirmDeleteAppointments' => $this->ui_factory->table()->action()->standard(
163 $this->
lng->txt(
'delete'),
164 $url_builder->withParameter($action_parameter_token,
'confirmDeleteAppointments'),
167 'sendMail' => $this->ui_factory->table()->action()->standard(
168 $this->
lng->txt(
'cal_ch_send_mail'),
169 $url_builder->withParameter($action_parameter_token,
'sendMail'),
181 $format = $this->data_factory->dateFormat()->withTime12($this->
user->getDateFormat());
183 $format = $this->data_factory->dateFormat()->withTime24($this->
user->getDateFormat());
187 'booking_start' => $this->ui_factory
190 ->date($this->
lng->txt(
'cal_ch_booking_start'), $format)
191 ->withIsSortable(
true),
192 'booking_duration' => $this->ui_factory
195 ->number($this->
lng->txt(
'cal_ch_minutes'))
196 ->withIsSortable(
true),
197 'booking_title' => $this->ui_factory
200 ->text($this->
lng->txt(
'title'))
201 ->withIsSortable(
true),
202 'booking_participant' => $this->ui_factory
205 ->linkListing($this->
lng->txt(
'cal_ch_booking_participants')),
206 'booking_comment' => $this->ui_factory
209 ->linkListing($this->
lng->txt(
'cal_ch_booking_col_comments')),
210 'booking_location' => $this->ui_factory
213 ->linkListing($this->
lng->txt(
'cal_ch_target_object'))
220 return $this->ui_renderer->render(
getTotalRowCount(?array $filter_data, ?array $additional_parameters)
Mainly for the purpose of pagination-support, it is important to know about the total number of recor...
BookingDataProvider $provider
Both the subject and the direction need to be specified when expressing an order. ...
buildDataRow(string $id, array $record)
__construct(BookingDataProvider $provider)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readonly DataFactory $data_factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readonly UIFactory $ui_factory
getRows(DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, ?array $filter_data, ?array $additional_parameters)
This is called by the table to retrieve rows; map data-records to rows using the $row_builder e...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
A simple class to express a naive range of whole positive numbers.
readonly ServerRequestInterface $http_request