Elgg  Version 1.11
notifications.php
Go to the documentation of this file.
1 <?php
9 $NOTIFICATION_HANDLERS = _elgg_services()->notifications->getMethodsAsDeprecatedGlobal();
11 
12 $title = elgg_echo('notifications:usersettings');
13 
14 $rows = '';
15 
16 // Loop through options
17 foreach ($NOTIFICATION_HANDLERS as $k => $v) {
18 
19  if ($notification_settings->$k) {
20  $val = "yes";
21  } else {
22  $val = "no";
23  }
24 
25  $radio = elgg_view('input/radio', array(
26  'name' => "method[$k]",
27  'value' => $val,
28  'options' => array(
29  elgg_echo('option:yes') => 'yes',
30  elgg_echo('option:no') => 'no'
31  ),
32  ));
33 
34  $cells = '<td class="prm pbl">' . elgg_echo("notification:method:$k") . ': </td>';
35  $cells .= "<td>$radio</td>";
36 
37  $rows .= "<tr>$cells</tr>";
38 }
39 
40 $content = '';
41 $content .= "<table>$rows</table>";
42 
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1217
$title
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
_elgg_services()
Definition: autoloader.php:14
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$NOTIFICATION_HANDLERS
$rows
$notification_settings
get_user_notification_settings($user_guid=0)
Get the notification settings for a given user.
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition: pageowner.php:18
foreach($NOTIFICATION_HANDLERS as $k=> $v) $content