ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
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
 
bool $write_access
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 36 of file Table.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 52 of file Table.php.

54 {
55 global $DIC;
56 $this->ui_factory = $DIC['ui.factory'];
57 $this->ui_renderer = $DIC['ui.renderer'];
58 $this->ctrl = $DIC['ilCtrl'];
59 $this->lng = $DIC['lng'];
60
61 $this->url_builder = $this->initURIBuilder();
62 $this->write_access = (new ilObjAdministrativeNotificationAccess())->hasUserPermissionTo('write');
63 $columns = $this->initColumns();
64 $actions = $this->initActions();
65 $data_retrieval = new DataRetrieval(
66 $this->write_access
67 );
68
69 $this->components[] = $this->ui_factory->table()->data(
70 $data_retrieval,
71 $this->lng->txt('msg_table_title'),
72 $columns,
73 )->withActions($actions)->withRequest(
74 $DIC->http()->request()
75 );
76 }
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 152 of file Table.php.

152 : string
153 {
154 return $this->ui_renderer->render($this->components);
155 }

◆ getIdToken()

ILIAS\AdministrativeNotification\Table::getIdToken ( )

Definition at line 162 of file Table.php.

163 {
164 return $this->id_token;
165 }

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 142 of file Table.php.

142 : URI
143 {
144 return new URI(
145 ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget(
146 $this->calling_gui,
147 $command
148 )
149 );
150 }

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 157 of file Table.php.

157 : URLBuilder
158 {
159 return $this->url_builder;
160 }

References ILIAS\AdministrativeNotification\Table\$url_builder.

◆ initActions()

ILIAS\AdministrativeNotification\Table::initActions ( )
protected

Definition at line 108 of file Table.php.

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

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 94 of file Table.php.

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

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 78 of file Table.php.

79 {
82 );
83
84 // these are the query parameters this instance is controlling
85 $query_params_namespace = ['msg', 'notifications'];
87 $query_params_namespace,
89 );
90
91 return $url_builder;
92 }
getURI(string $command)
@description Unfortunately, I have not yet found an easier way to generate this URI.
Definition: Table.php:142
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 50 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

◆ $write_access

bool ILIAS\AdministrativeNotification\Table::$write_access
private

Definition at line 48 of file Table.php.

◆ 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: