19declare(strict_types=1);
31use Psr\Http\Message\ServerRequestInterface as ServerRequestInterface;
67 $this->
lng = $DIC->language();
68 $this->
user = $DIC->user();
69 $this->
ctrl = $DIC->ctrl();
71 $this->http_request =
$DIC->http()->request();
72 $this->ui_factory =
$DIC->ui()->factory();
73 $this->data_factory =
new DataFactory();
74 $this->ui_renderer =
$DIC->ui()->renderer();
79 array $visible_column_ids,
82 mixed $additional_viewcontrol_data,
84 mixed $additional_parameters
86 $records = $this->provider->limitData(
$range, $order);
87 foreach ($records as $row) {
90 if (count($row[
'booking_participant']->getItems()) === 0) {
91 $records_row = $records_row
92 ->withDisabledAction(
'confirmCancelBooking')
93 ->withDisabledAction(
'confirmDeleteBooking')
94 ->withDisabledAction(
'sendMail');
101 mixed $additional_viewcontrol_data,
103 mixed $additional_parameters
105 return count($this->provider->getData());
110 return $this->ui_factory
114 $this->
lng->txt(
'cal_ch_ch'),
117 ->withId(self::class)
118 ->withActions($this->getActions())
119 ->withRequest($this->http_request);
128 $uri_command_handler = $this->data_factory->uri(
129 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
130 ilConsultationHoursGUI::class,
131 'handleBookingTableActions'
137 $action_parameter_token,
140 (
new URLBuilder($uri_command_handler))->acquireParameters(
147 'edit' => $this->ui_factory->table()->action()->standard(
148 $this->
lng->txt(
'edit'),
149 $url_builder->withParameter($action_parameter_token,
'edit'),
152 'searchUsersForAppointments' => $this->ui_factory->table()->action()->standard(
153 $this->
lng->txt(
'cal_ch_assign_participants'),
154 $url_builder->withParameter($action_parameter_token,
'searchUsersForAppointments'),
157 'confirmCancelBooking' => $this->ui_factory->table()->action()->single(
158 $this->
lng->txt(
'cal_ch_cancel_booking'),
159 $url_builder->withParameter($action_parameter_token,
'confirmCancelBooking'),
162 'confirmDeleteBooking' => $this->ui_factory->table()->action()->single(
163 $this->
lng->txt(
'cal_ch_delete_booking'),
164 $url_builder->withParameter($action_parameter_token,
'confirmDeleteBooking'),
167 'confirmDeleteAppointments' => $this->ui_factory->table()->action()->standard(
168 $this->
lng->txt(
'delete'),
169 $url_builder->withParameter($action_parameter_token,
'confirmDeleteAppointments'),
172 'sendMail' => $this->ui_factory->table()->action()->standard(
173 $this->
lng->txt(
'cal_ch_send_mail'),
174 $url_builder->withParameter($action_parameter_token,
'sendMail'),
186 $format = $this->data_factory->dateFormat()->withTime12($this->
user->getDateFormat());
188 $format = $this->data_factory->dateFormat()->withTime24($this->
user->getDateFormat());
192 'booking_start' => $this->ui_factory
195 ->date($this->
lng->txt(
'cal_ch_booking_start'), $format)
196 ->withIsSortable(
true),
197 'booking_duration' => $this->ui_factory
200 ->number($this->
lng->txt(
'cal_ch_minutes'))
201 ->withIsSortable(
true),
202 'booking_title' => $this->ui_factory
205 ->text($this->
lng->txt(
'title'))
206 ->withIsSortable(
true),
207 'booking_participant' => $this->ui_factory
210 ->linkListing($this->
lng->txt(
'cal_ch_booking_participants')),
211 'booking_comment' => $this->ui_factory
214 ->linkListing($this->
lng->txt(
'cal_ch_booking_col_comments')),
215 'booking_location' => $this->ui_factory
218 ->linkListing($this->
lng->txt(
'cal_ch_target_object'))
225 return $this->ui_renderer->render(
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getRows(DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
This is called by the table to retrieve rows; map data-records to rows using the $row_builder e....
__construct(BookingDataProvider $provider)
readonly ServerRequestInterface $http_request
readonly DataFactory $data_factory
readonly UIFactory $ui_factory
BookingDataProvider $provider
getTotalRowCount(mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
Mainly for the purpose of pagination-support, it is important to know about the total number of recor...
Builds a Color from either hex- or rgb values.
Both the subject and the direction need to be specified when expressing an order.
A simple class to express a naive range of whole positive numbers.
Consultation hours editor.
Class ilCtrl provides processing control methods.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildDataRow(string $id, array $record)
This describes a Data Table.
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...