Elgg  Version 3.0
statistics.php
Go to the documentation of this file.
1 <?php
10 
11 $username = elgg_extract('username', $vars);
12 if (!$username) {
14 }
15 
17 if (!$user || !$user->canEdit()) {
18  throw new \Elgg\EntityPermissionsException();
19 }
20 
22 
23 elgg_push_breadcrumb(elgg_echo('settings'), elgg_generate_url('settings:account', [
24  'username' => $user->username,
25 ]));
26 
27 elgg_push_breadcrumb(elgg_echo('usersettings:statistics:opt:linktext'));
28 
29 $title = elgg_echo("usersettings:statistics");
30 
31 $content = elgg_view("core/settings/statistics");
32 
34  'content' => $content,
35  'title' => $title,
36  'show_owner_block_menu' => false,
37 ];
38 $body = elgg_view_layout('one_sidebar', $params);
39 
$body
Definition: statistics.php:38
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition: pageowner.php:81
elgg_push_breadcrumb($text, $href=false)
Adds a breadcrumb to the breadcrumbs stack.
Definition: navigation.php:298
elgg_view_page($title, $body, $page_shell= 'default', $vars=[])
Assembles and outputs a full page.
Definition: views.php:360
get_user_by_username($username)
Get user by username.
Definition: users.php:61
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
$title
Definition: statistics.php:29
$username
Definition: statistics.php:11
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
Definition: pagehandler.php:58
$content
Definition: statistics.php:31
$params
Definition: statistics.php:33
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
if(!$username) $user
Definition: statistics.php:16
elgg_view_layout($layout_name, $vars=[])
Displays a layout with optional parameters.
Definition: views.php:593
$vars['type']
Definition: save.php:11
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:29
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246