Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
statistics.php
Go to the documentation of this file.
1 <?php
9 // Only logged in users
10 elgg_gatekeeper();
11 
12 // Make sure we don't open a security hole ...
13 if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit())) {
14  register_error(elgg_echo('noaccess'));
15  forward('/');
16 }
17 
18 $username = elgg_extract('username', $vars);
19 
20 elgg_push_breadcrumb(elgg_echo('settings'), "settings/user/$username");
21 elgg_push_breadcrumb(elgg_echo('usersettings:statistics:opt:linktext'));
22 
23 $title = elgg_echo("usersettings:statistics");
24 
25 $content = elgg_view("core/settings/statistics");
26 
27 $params = array(
28  'content' => $content,
29  'title' => $title,
30 );
31 $body = elgg_view_layout('one_sidebar', $params);
32 
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_layout($layout_name, $vars=array())
Displays a layout with optional parameters.
Definition: views.php:679
$body
Definition: statistics.php:31
$vars['entity']
if((!elgg_get_page_owner_entity())||(!elgg_get_page_owner_entity() ->canEdit())) $username
Definition: statistics.php:18
register_error($error)
Display an error on next page load.
Definition: elgglib.php:452
$title
Definition: statistics.php:23
$content
Definition: statistics.php:25
$params
Definition: statistics.php:27
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:56
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:1310
forward($location="", $reason= 'system')
Forward to $location.
Definition: elgglib.php:93
elgg_view_page($title, $body, $page_shell= 'default', $vars=array())
Assembles and outputs a full page.
Definition: views.php:437