Elgg  Version 6.1
delayed_email.php
Go to the documentation of this file.
1 <?php
8 $user = elgg_extract('entity', $vars);
9 if (!$user instanceof \ElggUser || !(bool) elgg_get_config('enable_delayed_email')) {
10  return;
11 }
12 
13 echo elgg_view_field([
14  '#type' => 'radio',
15  '#label' => elgg_echo('usersettings:delayed_email:interval'),
16  '#help' => elgg_echo('usersettings:delayed_email:interval:help'),
17  'name' => 'delayed_email_interval',
18  'align' => 'horizontal',
19  'options_values' => [
20  'daily' => elgg_echo('interval:daily'),
21  'weekly' => elgg_echo('interval:weekly'),
22  ],
23  'value' => $user->delayed_email_interval ?: 'daily',
24 ]);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
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:256
$user
Set the desired interval for delayed email notifications.
$vars
Definition: theme.php:5