Elgg  Version master
icon.php
Go to the documentation of this file.
1 <?php
18 $entity = elgg_extract('entity', $vars);
19 if ($entity instanceof ElggEntity) {
20  $vars['entity_type'] = elgg_extract('entity_type', $vars, $entity->getType());
21  $vars['entity_subtype'] = elgg_extract('entity_subtype', $vars, $entity->getSubtype());
22 }
23 
24 $content = elgg_view('entity/edit/icon/file', $vars);
25 $content .= elgg_view('entity/edit/icon/crop', $vars);
26 $content .= elgg_view('entity/edit/icon/thumb', $vars);
27 $content .= elgg_view('entity/edit/icon/remove', $vars);
28 
29 echo elgg_format_element('div', ['class' => 'elgg-entity-edit-icon-wrapper'], $content);
$vars['class']
Display an icon from the FontAwesome library.
Definition: icon.php:8
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:254
$entity
Generic entity icon upload helper.
Definition: icon.php:18
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
if($entity instanceof ElggEntity) $content
Definition: icon.php:24
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145