Elgg  Version 2.3
update_basic.php
Go to the documentation of this file.
1 <?php
2 
3 echo elgg_view_field([
4  '#type' => 'text',
5  'name' => 'sitename',
6  '#label' => elgg_echo('installation:sitename'),
7  'value' => elgg_get_config('sitename'),
8 ]);
9 
10 echo elgg_view_field([
11  '#type' => 'text',
12  'name' => 'sitedescription',
13  '#label' => elgg_echo('installation:sitedescription'),
14  'value' => elgg_get_config('sitedescription'),
15 ]);
16 
17 echo elgg_view_field([
18  '#type' => 'email',
19  'name' => 'siteemail',
20  '#label' => elgg_echo('installation:siteemail'),
21  '#help' => elgg_echo('installation:siteemail:help'),
22  'value' => elgg_get_site_entity()->email,
23  'class' => 'elgg-input-text',
24 ]);
25 
26 echo elgg_view_field([
27  '#type' => 'number',
28  'name' => 'default_limit',
29  '#label' => elgg_echo('installation:default_limit'),
30  'value' => elgg_get_config('default_limit'),
31  'min' => 1,
32  'step' => 1,
33 ]);
34 
35 echo elgg_view_field([
36  '#type' => 'select',
37  'name' => 'language',
38  '#label' => elgg_echo('installation:language'),
39  'value' => elgg_get_config('language'),
40  'options_values' => get_installed_translations(),
41 ]);
42 
43 $footer = elgg_view('input/submit', ['value' => elgg_echo('save')]);
$site email
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
get_installed_translations()
Return an array of installed translations as an associative array "two letter code" => "native langua...
Definition: languages.php:93
elgg_set_form_footer($footer='')
Sets form footer and defers its rendering until the form view and extensions have been rendered.
Definition: views.php:1358
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1424
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype='')
Return a parsed view.
Definition: views.php:336
elgg_get_site_entity($site_guid=0)
Get an \ElggSite entity (default is current site)
Definition: sites.php:18
$footer