Elgg  Version master
default.php
Go to the documentation of this file.
1 <?php
8 $entity = elgg_extract('entity', $vars);
9 if (!$entity instanceof \ElggObject) {
10  return;
11 }
12 
13 $vars['icon'] = $entity->hasIcon('tiny') ? elgg_view_entity_icon($entity, 'tiny') : '';
14 
15 echo elgg_view('input/autocomplete/default', $vars);
$entity
Generic icon view.
Definition: default.php:13
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:25
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:246
elgg_view_entity_icon(\ElggEntity $entity, string $size='medium', array $vars=[])
View the icon of an entity.
Definition: views.php:545
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
Definition: views.php:156