ILIAS  trunk Revision v12.0_alpha-1613-gae4c99ebb18
ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable Class Reference
+ Inheritance diagram for ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable:
+ Collaboration diagram for ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable:

Public Member Functions

 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.g. More...
 
- Public Member Functions inherited from ILIAS\BookingManager\Bookings\Table\BookingsTable
 __construct (protected readonly UIFactory $ui_factory, protected readonly UIRenderer $ui_renderer, protected readonly AccessManager $access, protected readonly ilGlobalTemplateInterface $tpl, protected readonly Refinery $refinery, protected readonly Language $lng, protected readonly HttpService $http, protected readonly ilObjUser $user, protected readonly ReservationDBRepository $reservation_repository, protected readonly ilCtrlInterface $ctrl, protected readonly ilUIService $ui_service, protected readonly Settings $settings, protected readonly ilObjBookingPool $booking_pool)
 
 getTableId ()
 
 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.g. More...
 
 getFilter ()
 
 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 records available. More...
 
 getComponents (URLBuilder $url_builder)
 
- Public Member Functions inherited from ILIAS\BookingManager\Common\Table\Table
 getTableId ()
 
 execute (URLBuilder $url_builder)
 
 getComponents (URLBuilder $url_builder)
 
 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.g. More...
 
 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 records available. More...
 

Data Fields

const string ID = 'bkbwos'
 
- Data Fields inherited from ILIAS\BookingManager\Bookings\Table\BookingsTable
const ROW_ID_PARAMETER = 'booking_id'
 
const ACTION_PARAMETER = 'action'
 
const ACTION_TYPE_PARAMETER = 'action_type'
 

Protected Member Functions

 getColumns ()
 
 getFilterInputs ()
 
- Protected Member Functions inherited from ILIAS\BookingManager\Bookings\Table\BookingsTable
 getUserPresentationName (int $user_id)
 
 getColumns ()
 
 getFilterInputs ()
 
 loadRecords (mixed $filter_data)
 
 sortRecords (Order $order, array $records)
 
 limitRecords (Range $range, array $records)
 
 acquireParameters (URLBuilder $url_builder)
 
 getUsers (?int $user_id=null)
 
 getStatuses ()
 
 getTableActions ()
 
 getUserComponent (int $user_id)
 
 getBookingTimeSlotFilterLabel (array $booking)
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\BookingManager\Bookings\Table\BookingsTable
readonly array $booking_items
 
readonly array $bookings
 
readonly array $participants
 
readonly ColumnFactory $column_factory
 
readonly InputFactory $input_factory
 

Detailed Description

Definition at line 29 of file BookingsWithoutScheduleTable.php.

Member Function Documentation

◆ getColumns()

ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable::getColumns ( )
protected

Reimplemented from ILIAS\BookingManager\Bookings\Table\BookingsTable.

Definition at line 63 of file BookingsWithoutScheduleTable.php.

63 : array
64 {
65 return [
66 'title' => $this->column_factory->text($this->lng->txt('title')),
67 'status' => $this->column_factory->text($this->lng->txt('status')),
68 'user' => $this->column_factory->link($this->lng->txt('user')),
69 ];
70 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getFilterInputs()

ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable::getFilterInputs ( )
protected

Reimplemented from ILIAS\BookingManager\Bookings\Table\BookingsTable.

Definition at line 72 of file BookingsWithoutScheduleTable.php.

72 : array
73 {
74 $txt_user = $this->lng->txt('user');
75 if (
76 $this->access->canManageAllReservations($this->booking_pool->getRefId())
77 || $this->access->canReadPublicLog($this->booking_pool->getRefId())
78 ) {
79 $user_input = $this->input_factory->select($txt_user, $this->getUsers());
80 } else {
81 $user_input = $this->input_factory
82 ->select($txt_user, $this->getUsers($this->user->getId()))
83 ->withValue($this->user->getId())
84 ->withDisabled(true);
85 }
86
87 return [
88 'object' => $this->input_factory->select(
89 $this->lng->txt('object'),
90 array_column($this->booking_items, 'title', 'booking_object_id')
91 ),
92 'object_title_or_description' => $this->input_factory->text($this->lng->txt('book_object_title_or_description')),
93 'status' => $this->input_factory->select($this->lng->txt('status'), $this->getStatuses()),
94 'user' => $user_input
95 ];
96 }

References ILIAS\Repository\access(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getRows()

ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable::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.g.

yield $row_builder->buildStandardRow($row_id, $record).

Parameters
string[]$visible_column_ids

Reimplemented from ILIAS\BookingManager\Bookings\Table\BookingsTable.

Definition at line 33 of file BookingsWithoutScheduleTable.php.

41 : Generator {
42 $bookings = $this->limitRecords($range, $this->sortRecords($order, $this->loadRecords($filter_data)));
43
44 foreach ($bookings as $record) {
45 $user_id = $record['user_id'];
46
47 yield $this->getTableActions()->onDataRow(
48 $row_builder->buildDataRow(
49 (string) $record['booking_reservation_id'],
50 [
51 'title' => (string) $record['title'],
52 'status' => $record['status'] === ilBookingReservation::STATUS_CANCELLED
53 ? $this->lng->txt('book_reservation_status_5')
54 : '',
55 'user' => $this->getUserComponent($user_id)
56 ]
57 ),
58 $record
59 );
60 }
61 }
buildDataRow(string $id, array $record)

References $user_id, ILIAS\UI\Component\Table\DataRowBuilder\buildDataRow(), ILIAS\BookingManager\Bookings\Table\BookingsTable\getTableActions(), and ilBookingReservation\STATUS_CANCELLED.

+ Here is the call graph for this function:

Field Documentation

◆ ID

const string ILIAS\BookingManager\Bookings\Table\BookingsWithoutScheduleTable::ID = 'bkbwos'

Definition at line 31 of file BookingsWithoutScheduleTable.php.


The documentation for this class was generated from the following file: