ILIAS  trunk Revision v12.0_alpha-1613-gae4c99ebb18
ParticipantTableActionsFactory.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;
35
37{
38 public const string ACTION_BOOK_FOR_PARTICIPANT = 'book_for_participant';
39
40 public const string ACTION_DELETE = 'delete';
41
42 public const string ACTION_EDIT_BOOKING = 'edit_booking';
43
44 public function __construct(
45 protected readonly ilCtrlInterface $ctrl,
46 protected readonly ilLanguage $lng,
47 protected readonly ilGlobalTemplateInterface $tpl,
48 protected readonly UIFactory $ui_factory,
49 protected readonly UIRenderer $ui_renderer,
50 protected readonly Refinery $refinery,
51 protected readonly HttpService $http,
52 protected readonly AccessManager $access,
53 protected readonly ParticipantRepository $participant_repository,
54 protected readonly int $ref_id,
55 protected readonly int $pool_id,
56 ) {
57 }
58
59 public function getTableActions(): TableActions
60 {
61 return new TableActions(
62 $this->ctrl,
63 $this->lng,
64 $this->tpl,
65 $this->ui_factory,
66 $this->ui_renderer,
67 $this->refinery,
68 $this->http,
69 [
70 self::ACTION_BOOK_FOR_PARTICIPANT => $this->getBookForParticipantAction(),
71 self::ACTION_DELETE => $this->getDeleteAction(),
72 self::ACTION_EDIT_BOOKING => $this->getEditBookingAction(),
73 ]
74 );
75 }
76
78 {
80 $this->ui_factory,
81 $this->lng,
82 $this->access,
83 $this->ctrl,
84 $this->http,
85 $this->ref_id,
86 $this->pool_id,
87 );
88 }
89
90 protected function getDeleteAction(): TableAction
91 {
93 $this->ui_factory,
94 $this->ui_renderer,
95 $this->lng,
96 $this->access,
97 $this->ctrl,
98 $this->tpl,
99 $this->http,
100 $this->participant_repository,
101 $this->ref_id,
102 $this->pool_id,
103 );
104 }
105
106 protected function getEditBookingAction(): TableAction
107 {
109 $this->ui_factory,
110 $this->lng,
111 $this->access,
112 $this->ctrl,
113 $this->http,
114 $this->ref_id,
115 $this->pool_id,
116 );
117 }
118}
__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 ParticipantRepository $participant_repository, protected readonly int $ref_id, protected readonly int $pool_id,)
@phpstan-type ParticipantRecord array{user_id: int, name: string, object_title: array<string>,...
@phpstan-type ParticipantRecord array{user_id: int, name: string, object_title: array<string>,...
@phpstan-type ParticipantRecord array{user_id: int, name: string, object_title: array<string>,...
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
language handling
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