Elgg  Version master
Variables
default.php File Reference

Go to the source code of this file.

Variables

 $entity = elgg_extract('entity', $vars)
 Generic icon view. More...
 
if(!$entity instanceof ElggEntity$icon_sizes = elgg_get_icon_sizes($entity->type, $entity->getSubtype())
 
 $size = elgg_extract('size', $vars, 'medium')
 
if(!array_key_exists($size, $icon_sizes)) $vars ['size'] = $size
 
 $img_class = elgg_extract_class($vars, [], 'img_class')
 
 $title = htmlspecialchars($entity->getDisplayName() ?? '', ENT_QUOTES, 'UTF-8', false)
 
 $url = false
 
if(elgg_extract('use_link', $vars, true)) if(!isset($vars['width'])) if(!isset($vars['height'])) $img_params
 
if(elgg_extract('use_link', $vars, true)) if(!isset($vars['width'])) if(!isset($vars['height'])) if(!empty($img_class)) if(!empty($vars['width'])) if(!empty($vars['height'])) $img = elgg_view('output/img', $img_params)
 
if(empty($img)) if($url) else
 

Variable Documentation

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

Generic icon view.

$vars['entity'] The entity the icon represents - uses getIconURL() method $vars['size'] topbar, tiny, small, medium (default), large, master $vars['use_link'] Hyperlink the icon $vars['href'] Optional override for link $vars['img_class'] Optional CSS class added to img $vars['link_class'] Optional CSS class for the link

Definition at line 13 of file default.php.

if (!$entity instanceof ElggEntity) $icon_sizes = elgg_get_icon_sizes($entity->type, $entity->getSubtype())

Definition at line 18 of file default.php.

if (elgg_extract('use_link', $vars, true)) if (!isset($vars['width'])) if (!isset($vars['height'])) if (!empty($img_class)) if (!empty($vars['width'])) if (!empty($vars['height'])) $img = elgg_view('output/img', $img_params)

Definition at line 61 of file default.php.

$img_class = elgg_extract_class($vars, [], 'img_class')

Definition at line 27 of file default.php.

if (elgg_extract('use_link', $vars, true)) if (!isset($vars['width'])) if (!isset($vars['height'])) $img_params
Initial value:
= [
'src' => $entity->getIconURL($size)
$size
Definition: default.php:20
$entity
Generic icon view.
Definition: default.php:13

Definition at line 44 of file default.php.

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

Definition at line 20 of file default.php.

$title = htmlspecialchars($entity->getDisplayName() ?? '', ENT_QUOTES, 'UTF-8', false)

Definition at line 29 of file default.php.

$url = false

Definition at line 31 of file default.php.

if (!array_key_exists($size, $icon_sizes)) $vars['size'] = $size

Definition at line 25 of file default.php.

if (empty($img)) if ($url) else
Initial value:
{
echo $img
if(elgg_extract('use_link', $vars, true)) if(!isset($vars['width'])) if(!isset($vars['height'])) if(!empty($img_class)) if(!empty($vars['width'])) if(!empty($vars['height'])) $img
Definition: default.php:61

Definition at line 79 of file default.php.