Elgg  Version 3.0
icon.php
Go to the documentation of this file.
1 <?php
17 $entity = elgg_extract('entity', $vars);
18 if ($entity instanceof ElggEntity) {
19  $vars['entity_type'] = elgg_extract('entity_type', $vars, $entity->getType());
20  $vars['entity_subtype'] = elgg_extract('entity_subtype', $vars, $entity->getSubtype());
21 }
22 
23 $content = elgg_view('entity/edit/icon/file', $vars);
24 $content .= elgg_view('entity/edit/icon/thumb', $vars);
25 $content .= elgg_view('entity/edit/icon/remove', $vars);
26 
27 echo elgg_format_element('div', ['class' => 'elgg-entity-edit-icon-wrapper'], $content);
$vars['class']
Definition: icon.php:14
$entity
Generic entity icon upload helper.
Definition: icon.php:17
if($entity instanceof ElggEntity) $content
Definition: icon.php:23
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168
elgg echo
Translates a string.
Definition: languages.js:43
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246