ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\AdministrativeNotification\Table Class Reference
+ Collaboration diagram for ILIAS\AdministrativeNotification\Table:

Public Member Functions

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

Protected Member Functions

 initColumns ()
 
 initActions ()
 
 getURI (string $command)
 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 31 of file Table.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 42 of file Table.php.

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

44  {
45  global $DIC;
46  $this->ui_factory = $DIC['ui.factory'];
47  $this->ui_renderer = $DIC['ui.renderer'];
48  $this->ctrl = $DIC['ilCtrl'];
49  $this->lng = $DIC['lng'];
50 
51  $this->url_builder = $this->initURIBuilder();
52  $columns = $this->initColumns();
53  $actions = $this->initActions();
54  $data_retrieval = new DataRetrieval();
55 
56  $this->components[] = $this->ui_factory->table()->data(
57  $data_retrieval,
58  $this->lng->txt('notifications'),
59  $columns,
60  )->withActions($actions)->withRequest(
61  $DIC->http()->request()
62  );
63  }
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ILIAS\AdministrativeNotification\Table::getHTML ( )

Definition at line 137 of file Table.php.

137  : string
138  {
139  return $this->ui_renderer->render($this->components);
140  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getIdToken()

ILIAS\AdministrativeNotification\Table::getIdToken ( )

Definition at line 147 of file Table.php.

References ILIAS\AdministrativeNotification\Table\$id_token.

147  : URLBuilderToken
148  {
149  return $this->id_token;
150  }

◆ getURI()

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

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

References ILIAS\Repository\ctrl().

Referenced by ILIAS\AdministrativeNotification\Table\initActions(), and ILIAS\AdministrativeNotification\Table\initURIBuilder().

127  : URI
128  {
129  return new URI(
130  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget(
131  $this->calling_gui,
132  $command
133  )
134  );
135  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUrlBuilder()

ILIAS\AdministrativeNotification\Table::getUrlBuilder ( )

Definition at line 142 of file Table.php.

References ILIAS\AdministrativeNotification\Table\$url_builder.

142  : URLBuilder
143  {
144  return $this->url_builder;
145  }

◆ initActions()

ILIAS\AdministrativeNotification\Table::initActions ( )
protected

Definition at line 95 of file Table.php.

References ILIAS\AdministrativeNotification\Table\$id_token, ilADNNotificationGUI\CMD_CONFIRM_DELETE, ilADNNotificationGUI\CMD_DUPLICATE, ilADNNotificationGUI\CMD_EDIT, ilADNNotificationGUI\CMD_RESET, ILIAS\AdministrativeNotification\Table\getURI(), and ILIAS\Repository\lng().

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

95  : array
96  {
97  $actions = [
98  'edit' => $this->ui_factory->table()->action()->single(
99  $this->lng->txt("btn_edit"),
100  $this->url_builder->withURI($this->getURI(\ilADNNotificationGUI::CMD_EDIT)),
102  ),
103  'delete' => $this->ui_factory->table()->action()->standard(
104  $this->lng->txt("btn_delete"),
105  $this->url_builder->withURI($this->getURI(\ilADNNotificationGUI::CMD_CONFIRM_DELETE)),
107  )->withAsync(true),
108  'reset' => $this->ui_factory->table()->action()->standard(
109  $this->lng->txt("btn_reset"),
110  $this->url_builder->withURI($this->getURI(\ilADNNotificationGUI::CMD_RESET)),
112  ),
113  'duplicate' => $this->ui_factory->table()->action()->single(
114  $this->lng->txt("btn_duplicate"),
115  $this->url_builder->withURI($this->getURI(\ilADNNotificationGUI::CMD_DUPLICATE)),
117  ),
118  ];
119 
120  return $actions;
121  }
getURI(string $command)
Unfortunately, I have not yet found an easier way to generate this URI.
Definition: Table.php:127
+ 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 81 of file Table.php.

References ILIAS\Repository\lng().

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

81  : array
82  {
83  return [
84  'title' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_title')),
85  'type' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_type')),
86  'languages' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_languages')),
87  'type_during_event' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_type_during_event')),
88  'event_start' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_event_date_start')),
89  'event_end' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_event_date_end')),
90  'display_start' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_display_date_start')),
91  'display_end' => $this->ui_factory->table()->column()->text($this->lng->txt('msg_display_date_end'))
92  ];
93  }
+ 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 65 of file Table.php.

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().

65  : URLBuilder
66  {
67  $url_builder = new URLBuilder(
69  );
70 
71  // these are the query parameters this instance is controlling
72  $query_params_namespace = ['msg', 'notifications'];
74  $query_params_namespace,
76  );
77 
78  return $url_builder;
79  }
acquireParameters(array $namespace, string ... $names)
Definition: URLBuilder.php:138
getURI(string $command)
Unfortunately, I have not yet found an easier way to generate this URI.
Definition: Table.php:127
+ 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 40 of file Table.php.

◆ $ctrl

ilCtrlInterface ILIAS\AdministrativeNotification\Table::$ctrl
private

Definition at line 35 of file Table.php.

◆ $id_token

◆ $lng

ilLanguage ILIAS\AdministrativeNotification\Table::$lng
private

Definition at line 36 of file Table.php.

◆ $ui_factory

Factory ILIAS\AdministrativeNotification\Table::$ui_factory
private

Definition at line 33 of file Table.php.

◆ $ui_renderer

Renderer ILIAS\AdministrativeNotification\Table::$ui_renderer
private

Definition at line 34 of file Table.php.

◆ $url_builder

URLBuilder ILIAS\AdministrativeNotification\Table::$url_builder
private

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