Elgg  Version master
notifications.php
Go to the documentation of this file.
1 <?php
8 $user = elgg_extract('entity', $vars);
9 if (!$user instanceof \ElggUser) {
10  return;
11 }
12 
13 elgg_import_esm('forms/settings/notifications');
14 elgg_require_css('forms/settings/notifications');
15 
16 echo elgg_view_field([
17  '#type' => 'hidden',
18  'name' => 'guid',
19  'value' => $user->guid,
20 ]);
21 
22 // Settings
23 echo elgg_format_element('div', [
24  'class' => 'elgg-notifications-settings',
25 ], elgg_view('notifications/settings/records', $vars));
26 
27 echo elgg_view('notifications/settings/delayed_email', $vars);
28 
29 echo elgg_view('notifications/settings/timed_muting', $vars);
30 
31 // form footer
33  '#type' => 'submit',
34  'text' => elgg_echo('save'),
35 ]);
36 
elgg_require_css(string $view)
Register a CSS view name to be included in the HTML head.
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$footer
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1046
$user
elgg_import_esm(string $name)
Helper functions for external files like css/js.
$vars
Definition: theme.php:5
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145