ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
NewsItemTableActionsFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Factory as UIFactory;
28use ILIAS\UI\Renderer as UIRenderer;
29use ILIAS\Refinery\Factory as Refinery;
30use ilLanguage;
31use ilCtrl;
33
35{
36 public const string ACTION_EDIT = 'edit';
37 public const string ACTION_DELETE = 'delete';
38
39 public function __construct(
40 private readonly UIFactory $ui_factory,
41 private readonly ilLanguage $lng,
42 private readonly NewsAccess $news_access,
43 private readonly ilCtrl $ctrl,
44 private readonly UIRenderer $ui_renderer,
45 private readonly Refinery $refinery,
46 private readonly HttpService $http_service,
47 private readonly ilGlobalTemplateInterface $main_tpl,
48 private readonly array $records
49 ) {
50 }
51
52 public function getTableActions(): TableActions
53 {
54 return new TableActions(
55 $this->ctrl,
56 $this->lng,
57 $this->main_tpl,
58 $this->ui_factory,
59 $this->ui_renderer,
60 $this->refinery,
61 $this->http_service,
62 [
63 self::ACTION_EDIT => $this->getEditNewsItemTableAction(),
64 self::ACTION_DELETE => $this->getDeleteNewsItemTableAction(),
65 ]
66 );
67 }
68
70 {
71 return new EditNewsItemTableAction(
72 $this->ui_factory,
73 $this->lng,
74 $this->news_access,
75 $this->ctrl,
76 $this->http_service
77 );
78 }
79
81 {
83 $this->ui_factory,
84 $this->lng,
85 $this->ctrl,
86 $this->news_access,
87 $this->http_service,
88 $this->main_tpl,
89 $this->records
90 );
91 }
92}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
__construct(private readonly UIFactory $ui_factory, private readonly ilLanguage $lng, private readonly NewsAccess $news_access, private readonly ilCtrl $ctrl, private readonly UIRenderer $ui_renderer, private readonly Refinery $refinery, private readonly HttpService $http_service, private readonly ilGlobalTemplateInterface $main_tpl, private readonly array $records)
Class ilCtrl provides processing control methods.
language handling
An entity that renders components to a string output.
Definition: Renderer.php:31
global $lng
Definition: privfeed.php:26