Elgg  Version master
save.php
Go to the documentation of this file.
1 <?php
11 if (!$user instanceof ElggUser) {
12  return;
13 }
14 
15 // we need to include the user GUID so that admins can edit the settings of other users
16 echo elgg_view_field([
17  '#type' => 'hidden',
18  'name' => 'guid',
19  'value' => $user->guid,
20 ]);
21 
22 // form footer
24  '#type' => 'submit',
25  'text' => elgg_echo('save'),
26 ]);
27 
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
$footer
Definition: save.php:89
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
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
$user
Definition: save.php:21
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:23
$vars['type']
Plugin user settings.
Definition: save.php:8