Elgg  Version 5.1
sign-off.php
Go to the documentation of this file.
1 <?php
11 
12 $recipient = elgg_extract('recipient', $vars);
13 $language = elgg_extract('language', $vars);
14 
15 $notification = elgg_extract('notification', $vars);
16 if ($notification instanceof Notification) {
17  $recipient = $notification->getRecipient();
18  $language = $notification->language;
19 }
20 
21 if (empty($language) && $recipient instanceof ElggUser) {
22  $language = $recipient->getLanguage();
23 }
24 
25 echo elgg_echo('notification:default:sign-off', [elgg_get_site_entity()->getDisplayName()], $language);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
Notification container.
$language
Definition: sign-off.php:13
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
$notification
Definition: sign-off.php:15
elgg_get_site_entity()
Get the current site entity.
Definition: entities.php:98
$vars
Definition: theme.php:5
$recipient
Definition: sign-off.php:12