Elgg  Version 3.0
Variables
default.php File Reference

Go to the source code of this file.

Variables

 $user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity())
 Elgg user icon. More...
 
 $size = elgg_extract('size', $vars, 'medium')
 
if(!($user instanceof ElggUser)) $icon_sizes = elgg_get_icon_sizes('user')
 
if(!array_key_exists($size, $icon_sizes)) $name = htmlspecialchars($user->getDisplayName(), ENT_QUOTES, 'UTF-8', false)
 
 $username = $user->username
 
 $wrapper_class
 
if($user->isBanned()) $icon
 
if(empty($icon)) $show_menu = elgg_extract('use_hover', $vars, true) && (elgg_is_admin_logged_in() || !$user->isBanned())
 
 $content = ''
 
if($show_menu) if(elgg_extract('use_link', $vars, true)) else
 

Variable Documentation

$content = ''

Definition at line 57 of file default.php.

if ($user->isBanned()) $icon
Initial value:
= elgg_view('output/img', [
'src' => $user->getIconURL($size),
'alt' => $name,
'title' => $name,
'class' => elgg_extract_class($vars, [], 'img_class'),
])
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:1153
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:27
$size
Definition: default.php:23
if(!array_key_exists($size, $icon_sizes)) $name
Definition: default.php:30
$user
Elgg user icon.
Definition: default.php:18
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246

Definition at line 44 of file default.php.

if (!($user instanceof ElggUser)) $icon_sizes = elgg_get_icon_sizes('user')

Definition at line 25 of file default.php.

if (!array_key_exists($size, $icon_sizes)) $name = htmlspecialchars($user->getDisplayName(), ENT_QUOTES, 'UTF-8', false)

Definition at line 30 of file default.php.

if (empty($icon)) $show_menu = elgg_extract('use_hover', $vars, true) && (elgg_is_admin_logged_in() || !$user->isBanned())

Definition at line 55 of file default.php.

$size = elgg_extract('size', $vars, 'medium')

Definition at line 19 of file default.php.

$user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity())

Elgg user icon.

Rounded avatar corners - CSS3 method uses avatar as background image so we can clip it with border-radius in supported browsers

$vars['entity'] The user entity. If none specified, the current user is assumed. $vars['size'] The size - tiny, small, medium or large. (medium) $vars['use_hover'] Display the hover menu? (true) $vars['use_link'] Wrap a link around image? (true) $vars['class'] Optional class added to the .elgg-avatar div $vars['img_class'] Optional CSS class added to img $vars['link_class'] Optional CSS class for the link $vars['href'] Optional override of the link href

Definition at line 18 of file default.php.

$username = $user->username

Definition at line 31 of file default.php.

$wrapper_class
Initial value:
= [
'elgg-avatar',
"elgg-avatar-$size",
]

Definition at line 33 of file default.php.

if ($show_menu) if (elgg_extract('use_link', $vars, true)) else
Initial value:
{
$content
Definition: default.php:57
if(!$owner) $icon
Definition: default.php:16
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168

Definition at line 77 of file default.php.