Elgg  Version 6.1
upload.php
Go to the documentation of this file.
1 <?php
8 $entity = elgg_extract('entity', $vars);
9 if (!$entity instanceof \ElggUser) {
10  return;
11 }
12 
13 echo elgg_view_field([
14  '#type' => 'hidden',
15  'name' => 'guid',
16  'value' => $entity->guid,
17 ]);
18 
19 echo elgg_view('entity/edit/icon', [
20  'entity' => $entity,
21  'name' => 'avatar',
22 ]);
23 
25  '#type' => 'submit',
26  'text' => elgg_echo('save'),
27 ]);
28 
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
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:256
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1046
$footer
Definition: upload.php:24
$entity
Avatar upload view.
Definition: upload.php:8
$vars
Definition: theme.php:5