ILIAS  trunk Revision v12.0_alpha-1613-gae4c99ebb18
ScheduleTableActionsFactory.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_DELETE = 'delete';
39
40 public const string ACTION_EDIT = 'edit';
41
42 public function __construct(
43 protected readonly ilCtrlInterface $ctrl,
44 protected readonly ilLanguage $lng,
45 protected readonly ilGlobalTemplateInterface $tpl,
46 protected readonly UIFactory $ui_factory,
47 protected readonly UIRenderer $ui_renderer,
48 protected readonly Refinery $refinery,
49 protected readonly AccessManager $access,
50 protected readonly HttpService $http,
51 protected readonly ScheduleManager $schedule_manager,
52 protected readonly int $ref_id,
53 ) {
54 }
55
56 public function getTableActions(): TableActions
57 {
58 return new TableActions(
59 $this->ctrl,
60 $this->lng,
61 $this->tpl,
62 $this->ui_factory,
63 $this->ui_renderer,
64 $this->refinery,
65 $this->http,
66 [
67 self::ACTION_DELETE => $this->getDeleteAction(),
68 self::ACTION_EDIT => $this->getEditAction(),
69 ]
70 );
71 }
72
73 protected function getDeleteAction(): TableAction
74 {
76 $this->ui_factory,
77 $this->ui_renderer,
78 $this->lng,
79 $this->access,
80 $this->ctrl,
81 $this->tpl,
82 $this->http,
83 $this->schedule_manager,
84 $this->ref_id,
85 );
86 }
87
88 protected function getEditAction(): TableAction
89 {
90 return new ScheduleTableEditAction(
91 $this->ui_factory,
92 $this->lng,
93 $this->access,
94 $this->ctrl,
95 $this->http,
96 $this->ref_id,
97 );
98 }
99}
__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 AccessManager $access, protected readonly HttpService $http, protected readonly ScheduleManager $schedule_manager, protected readonly int $ref_id,)
@phpstan-type ScheduleRecord array{booking_schedule_id: int, title: string, object_has_schedule: ?...
@phpstan-type ScheduleRecord array{booking_schedule_id: int, title: string, object_has_schedule: ?...
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