Elgg  Version 4.3
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 
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  'cropper_enabled' => true,
23 ]);
24 
26  '#type' => 'submit',
27  'value' => elgg_echo('save'),
28 ]);
29 
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_set_form_footer($footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1077
$footer
Definition: upload.php:25
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:547
$entity
Avatar upload view.
Definition: upload.php:8
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179