ILIAS  trunk Revision v12.0_alpha-1613-gae4c99ebb18
BookableItemTableActionsFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
32use ILIAS\UI\Factory as UIFactory;
33use ILIAS\UI\Renderer as UIRenderer;
34use ilLanguage;
36use ilObjUser;
37
39{
40 public const string ACTION_BOOK = 'book';
41 public const string ACTION_BOOK_FOR_PARTICIPANT = 'book_for_participant';
42 public const string ACTION_EDIT = 'edit';
43 public const string ACTION_BOOKINGS = 'bookings';
44 public const string ACTION_DELETE = 'delete';
45 public const string ACTION_CANCEL_BOOKING = 'cancel_booking';
46
47 public function __construct(
48 protected readonly ilCtrlInterface $ctrl,
49 protected readonly ilLanguage $lng,
50 protected readonly ilGlobalTemplateInterface $tpl,
51 protected readonly UIFactory $ui_factory,
52 protected readonly UIRenderer $ui_renderer,
53 protected readonly Refinery $refinery,
54 protected readonly HttpService $http,
55 protected readonly AccessManager $access,
56 protected readonly ilObjBookingPool $pool,
57 protected readonly BookingProcessManager $process_manager,
58 protected readonly ilObjUser $user,
59 protected readonly int $ref_id,
60 protected readonly bool $active_management,
61 protected readonly int $booking_context_obj_id,
62 protected readonly array $bookable_items,
63 ) {
64 }
65
66 public function getTableActions(): TableActions
67 {
68 return new TableActions(
69 $this->ctrl,
70 $this->lng,
71 $this->tpl,
72 $this->ui_factory,
73 $this->ui_renderer,
74 $this->refinery,
75 $this->http,
76 [
77 self::ACTION_BOOK => $this->getBookAction(),
78 self::ACTION_BOOK_FOR_PARTICIPANT => $this->getBookForParticipantAction(),
79 self::ACTION_EDIT => $this->getEditAction(),
80 self::ACTION_BOOKINGS => $this->getBookingsAction(),
81 self::ACTION_DELETE => $this->getDeleteAction(),
82 self::ACTION_CANCEL_BOOKING => $this->getCancelBookingAction(),
83 ]
84 );
85 }
86
87 protected function getBookAction(): TableAction
88 {
90 $this->ui_factory,
91 $this->ui_renderer,
92 $this->tpl,
93 $this->lng,
94 $this->http,
95 $this->refinery,
96 $this->ctrl,
97 $this->access,
98 $this->pool,
99 $this->process_manager,
100 $this->user,
101 $this->ref_id,
102 $this->booking_context_obj_id,
103 $this->bookable_items,
104 );
105 }
106
108 {
110 $this->ui_factory,
111 $this->lng,
112 $this->ctrl,
113 $this->http,
114 $this->refinery,
115 $this->access,
116 $this->pool,
117 $this->ref_id,
118 $this->active_management,
119 );
120 }
121
122 protected function getEditAction(): TableAction
123 {
125 $this->ui_factory,
126 $this->lng,
127 $this->ctrl,
128 $this->http,
129 $this->access,
130 $this->ref_id,
131 $this->active_management,
132 );
133 }
134
135 protected function getBookingsAction(): TableAction
136 {
138 $this->ui_factory,
139 $this->lng,
140 $this->ctrl,
141 $this->http,
142 $this->access,
143 $this->user,
144 $this->pool,
145 $this->ref_id,
146 $this->active_management,
147 );
148 }
149
150 protected function getDeleteAction(): TableAction
151 {
153 $this->ui_factory,
154 $this->ui_renderer,
155 $this->lng,
156 $this->tpl,
157 $this->http,
158 $this->access,
159 $this->pool,
160 $this->ref_id,
161 $this->active_management,
162 );
163 }
164
166 {
168 $this->ui_factory,
169 $this->ui_renderer,
170 $this->lng,
171 $this->tpl,
172 $this->http,
173 $this->refinery,
174 $this->access,
175 $this->pool,
176 $this->user,
177 $this->ref_id,
178 $this->active_management,
179 $this->bookable_items,
180 );
181 }
182}
__construct(protected readonly ilCtrlInterface $ctrl, protected readonly ilLanguage $lng, protected readonly ilGlobalTemplateInterface $tpl, protected readonly UIFactory $ui_factory, protected readonly UIRenderer $ui_renderer, protected readonly Refinery $refinery, protected readonly HttpService $http, protected readonly AccessManager $access, protected readonly ilObjBookingPool $pool, protected readonly BookingProcessManager $process_manager, protected readonly ilObjUser $user, protected readonly int $ref_id, protected readonly bool $active_management, protected readonly int $booking_context_obj_id, protected readonly array $bookable_items,)
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User class.
An entity that renders components to a string output.
Definition: Renderer.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:66
static http()
Fetches the global http state from ILIAS.
global $lng
Definition: privfeed.php:26