ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\AdministrativeNotification\Table Class Reference
+ Collaboration diagram for ILIAS\AdministrativeNotification\Table:

Public Member Functions

 __construct (private ilADNNotificationGUI $calling_gui,)
 
 getHTML ()
 
 getUrlBuilder ()
 
 getIdToken ()
 

Data Fields

const ACTION_EDIT = 'edit'
 
const ACTION_DELETE = 'delete'
 
const ACTION_RESET = 'reset'
 
const ACTION_DUPLICATE = 'duplicate'
 

Protected Member Functions

 initColumns ()
 
 initActions ()
 
 getURI (string $command)
 @description Unfortunately, I have not yet found an easier way to generate this URI. More...
 

Protected Attributes

array $components = []
 

Private Member Functions

 initURIBuilder ()
 

Private Attributes

Factory $ui_factory
 
Renderer $ui_renderer
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
URLBuilder $url_builder
 
URLBuilderToken $id_token
 

Detailed Description

Definition at line 36 of file Table.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\AdministrativeNotification\Table::__construct ( private ilADNNotificationGUI  $calling_gui)

Definition at line 51 of file Table.php.

53 {
54 global $DIC;
55 $this->ui_factory = $DIC['ui.factory'];
56 $this->ui_renderer = $DIC['ui.renderer'];
57 $this->ctrl = $DIC['ilCtrl'];
58 $this->lng = $DIC['lng'];
59
60 $this->url_builder = $this->initURIBuilder();
61 $columns = $this->initColumns();
62 $actions = $this->initActions();
63 $data_retrieval = new DataRetrieval(
64 (new ilObjAdministrativeNotificationAccess())->hasUserPermissionTo('write')
65 );
66
67 $this->components[] = $this->ui_factory->table()->data(
68 $data_retrieval,
69 $this->lng->txt('notifications'),
70 $columns,
71 )->withActions($actions)->withRequest(
72 $DIC->http()->request()
73 );
74 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilChatroomConfigFileHandler \ILIAS\Chatroom\classes.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), ILIAS\AdministrativeNotification\Table\initActions(), ILIAS\AdministrativeNotification\Table\initColumns(), ILIAS\AdministrativeNotification\Table\initURIBuilder(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ILIAS\AdministrativeNotification\Table::getHTML ( )

Definition at line 146 of file Table.php.

146 : string
147 {
148 return $this->ui_renderer->render($this->components);
149 }

◆ getIdToken()

ILIAS\AdministrativeNotification\Table::getIdToken ( )

Definition at line 156 of file Table.php.

157 {
158 return $this->id_token;
159 }

References ILIAS\AdministrativeNotification\Table\$id_token.

◆ getURI()

ILIAS\AdministrativeNotification\Table::getURI ( string  $command)
protected

@description Unfortunately, I have not yet found an easier way to generate this URI.

However, it is important that it points to the calling-gui

Definition at line 136 of file Table.php.

136 : URI
137 {
138 return new URI(
139 ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget(
140 $this->calling_gui,
141 $command
142 )
143 );
144 }

References ILIAS\Repository\ctrl().

Referenced by ILIAS\AdministrativeNotification\Table\initURIBuilder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUrlBuilder()

ILIAS\AdministrativeNotification\Table::getUrlBuilder ( )

Definition at line 151 of file Table.php.

151 : URLBuilder
152 {
153 return $this->url_builder;
154 }

References ILIAS\AdministrativeNotification\Table\$url_builder.

◆ initActions()

ILIAS\AdministrativeNotification\Table::initActions ( )
protected

Definition at line 106 of file Table.php.

106 : array
107 {
108 return [
109 self::ACTION_EDIT => $this->ui_factory->table()->action()->single(
110 $this->lng->txt("btn_edit"),
111 $this->url_builder->withURI($this->getURI(ilADNNotificationGUI::CMD_EDIT)),
112 $this->id_token
113 ),
114 self::ACTION_DELETE => $this->ui_factory->table()->action()->standard(
115 $this->lng->txt("btn_delete"),
116 $this->url_builder->withURI($this->getURI(ilADNNotificationGUI::CMD_CONFIRM_DELETE)),
117 $this->id_token
118 )->withAsync(true),
119 self::ACTION_RESET => $this->ui_factory->table()->action()->standard(
120 $this->lng->txt("btn_reset"),
121 $this->url_builder->withURI($this->getURI(ilADNNotificationGUI::CMD_RESET)),
122 $this->id_token
123 ),
124 self::ACTION_DUPLICATE => $this->ui_factory->table()->action()->single(
125 $this->lng->txt("btn_duplicate"),
126 $this->url_builder->withURI($this->getURI(ilADNNotificationGUI::CMD_DUPLICATE)),
127 $this->id_token
128 ),
129 ];
130 }

References ilADNNotificationGUI\CMD_CONFIRM_DELETE, ilADNNotificationGUI\CMD_DUPLICATE, ilADNNotificationGUI\CMD_EDIT, ilADNNotificationGUI\CMD_RESET, and ILIAS\Repository\lng().

Referenced by ILIAS\AdministrativeNotification\Table\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initColumns()

ILIAS\AdministrativeNotification\Table::initColumns ( )
protected

Definition at line 92 of file Table.php.

92 : array
93 {
94 return [
95 'title' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_title')),
96 'type' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_type')),
97 'languages' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_languages')),
98 'type_during_event' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_type_during_event')),
99 'event_start' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_event_date_start')),
100 'event_end' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_event_date_end')),
101 'display_start' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_display_date_start')),
102 'display_end' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_display_date_end'))
103 ];
104 }

References ILIAS\Repository\lng().

Referenced by ILIAS\AdministrativeNotification\Table\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initURIBuilder()

ILIAS\AdministrativeNotification\Table::initURIBuilder ( )
private

Definition at line 76 of file Table.php.

77 {
80 );
81
82 // these are the query parameters this instance is controlling
83 $query_params_namespace = ['msg', 'notifications'];
85 $query_params_namespace,
87 );
88
89 return $url_builder;
90 }
getURI(string $command)
@description Unfortunately, I have not yet found an easier way to generate this URI.
Definition: Table.php:136
acquireParameters(array $namespace, string ... $names)
Definition: URLBuilder.php:138

References ILIAS\AdministrativeNotification\Table\$id_token, ILIAS\AdministrativeNotification\Table\$url_builder, ILIAS\UI\URLBuilder\acquireParameters(), ilBiblFieldFilterGUI\CMD_STANDARD, ILIAS\AdministrativeNotification\Table\getURI(), and ilADNAbstractGUI\IDENTIFIER.

Referenced by ILIAS\AdministrativeNotification\Table\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $components

array ILIAS\AdministrativeNotification\Table::$components = []
protected

Definition at line 49 of file Table.php.

◆ $ctrl

ilCtrlInterface ILIAS\AdministrativeNotification\Table::$ctrl
private

Definition at line 44 of file Table.php.

◆ $id_token

URLBuilderToken ILIAS\AdministrativeNotification\Table::$id_token
private

◆ $lng

ilLanguage ILIAS\AdministrativeNotification\Table::$lng
private

Definition at line 45 of file Table.php.

◆ $ui_factory

Factory ILIAS\AdministrativeNotification\Table::$ui_factory
private

Definition at line 42 of file Table.php.

◆ $ui_renderer

Renderer ILIAS\AdministrativeNotification\Table::$ui_renderer
private

Definition at line 43 of file Table.php.

◆ $url_builder

URLBuilder ILIAS\AdministrativeNotification\Table::$url_builder
private

◆ ACTION_DELETE

const ILIAS\AdministrativeNotification\Table::ACTION_DELETE = 'delete'

Definition at line 39 of file Table.php.

Referenced by ILIAS\AdministrativeNotification\DataRetrieval\getRows().

◆ ACTION_DUPLICATE

const ILIAS\AdministrativeNotification\Table::ACTION_DUPLICATE = 'duplicate'

Definition at line 41 of file Table.php.

Referenced by ILIAS\AdministrativeNotification\DataRetrieval\getRows().

◆ ACTION_EDIT

const ILIAS\AdministrativeNotification\Table::ACTION_EDIT = 'edit'

Definition at line 38 of file Table.php.

Referenced by ILIAS\AdministrativeNotification\DataRetrieval\getRows().

◆ ACTION_RESET

const ILIAS\AdministrativeNotification\Table::ACTION_RESET = 'reset'

Definition at line 40 of file Table.php.

Referenced by ILIAS\AdministrativeNotification\DataRetrieval\getRows().


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