Elgg  Version 4.3
body.php
Go to the documentation of this file.
1 <?php
11 $subject = elgg_extract('subject', $vars);
13 
15 
17 
20 if ($email instanceof \Elgg\Email) {
21  $email_params = $email->getParams();
22 }
23 
26 $add_mute_link = (bool) elgg_extract('add_mute_link', $email_params, true);
27 
28 if ($add_mute_link && $object instanceof \ElggEntity && $recipient instanceof \ElggUser) {
29  $site_link .= ' | ' . elgg_view_url(elgg_http_get_signed_url(elgg_generate_url('notifications:mute', [
30  'entity_guid' => $object->guid,
31  'recipient_guid' => $recipient->guid,
32  ])), elgg_echo('notifications:mute:email:footer'));
33 }
34 
35 echo <<<__BODY
36 <table class="body-wrapper">
37  <tr>
38  <td>
39  <table class="edge-wrapper">
40  <tr>
41  <td>
42  <table class="content-wrapper">
43  <tr>
44  <td>
45  <table class="header">
46  <tr>
47  <td>
48  <h1>{$body_title}</h1>
49  </td>
50  </tr>
51  </table>
52  <table class="content">
53  <tr>
54  <td>
55  {$body}
56  </td>
57  </tr>
58  </table>
59  <table class="footer">
60  <tr>
61  <td>
62  {$site_link}
63  </td>
64  </tr>
65  </table>
66  </td>
67  </tr>
68  </table>
69  </td>
70  </tr>
71  </table>
72  </td>
73  </tr>
74 </table>
75 __BODY;
$add_mute_link
Definition: body.php:26
$email_params
Definition: body.php:18
$recipient
Definition: body.php:25
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
$site_link
Definition: body.php:16
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
$email
Definition: body.php:19
$body
Definition: body.php:12
elgg_get_site_entity()
Get the current site entity.
Definition: entities.php:99
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:547
if($email instanceof\Elgg\Email) $object
Definition: body.php:24
elgg_view_url(string $href, string $text=null, array $options=[])
Helper function for outputting urls.
Definition: views.php:1519
$body_title
Definition: body.php:14
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
$subject
HTML body of an email.
Definition: body.php:11
elgg_http_get_signed_url($url, $expires=false)
Signs provided URL with a SHA256 HMAC key.
Definition: elgglib.php:518
elgg_view_title($title, array $vars=[])
Renders a title.
Definition: views.php:842
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1536