Elgg  Version 4.3
statistics.php
Go to the documentation of this file.
1 <?php
7 
9 if (!$user instanceof \ElggUser) {
12 }
13 
14 if (!$user->canEdit()) {
15  throw new EntityPermissionsException();
16 }
17 
18 elgg_push_breadcrumb(elgg_echo('settings'), elgg_generate_url('settings:account', [
19  'username' => $user->username,
20 ]));
21 
22 if ($user->guid === elgg_get_logged_in_user_guid()) {
23  $title = elgg_echo('usersettings:statistics');
24 } else {
25  $title = elgg_echo('usersettings:statistics:user', [$user->getDisplayName()]);
26 }
27 
29  'content' => elgg_view('core/settings/statistics', [
30  'entity' => $user,
31  ]),
32  'show_owner_block_menu' => false,
33  'filter_id' => 'settings',
34  'filter_value' => 'statistics',
35 ]);
$title
Definition: generic.php:50
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition: pageowner.php:34
elgg_view_page($title, $body, $page_shell= 'default', $vars=[])
Assembles and outputs a full page.
Definition: views.php:262
$user
Definition: statistics.php:8
Thrown when entity can not be edited or container permissions do not allow it to be written...
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:23
elgg echo
Translates a string.
Definition: deprecated.js:530
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:24
elgg_push_breadcrumb($text, $href=false)
Breadcrumbs Elgg uses a breadcrumb stack.
Definition: breadcrumbs.php:21
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
Definition: sessions.php:34