Elgg  Version 3.0
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 ]);
23 
25  '#type' => 'submit',
26  'value' => 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:1395
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_set_form_footer($footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1331
$footer
Definition: upload.php:24
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
$entity
Avatar upload view.
Definition: upload.php:8
$vars['type']
Definition: save.php:11
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246