Elgg  Version 6.0
set_maintenance_mode.php
Go to the documentation of this file.
1 <?php
7 
8 echo elgg_view('output/longtext', [
9  'value' => elgg_echo('admin:maintenance_mode:instructions'),
10 ]);
11 
12 echo elgg_view_field([
13  '#type' => 'checkbox',
14  '#label' => elgg_echo('admin:maintenance_mode:mode_label'),
15  'name' => 'mode',
16  'checked' => (bool) elgg_get_config('elgg_maintenance_mode'),
17  'switch' => true,
18  'value' => 1,
19  'default' => 0,
20 ]);
21 
22 echo elgg_view_field([
23  '#type' => 'longtext',
24  '#label' => elgg_echo('admin:maintenance_mode:message_label'),
25  'name' => 'message',
26  'id' => 'message',
27  'value' => $site->elgg_maintenance_message ?: elgg_echo('admin:maintenance_mode:default_message'),
28 ]);
29 
31  '#type' => 'submit',
32  'text' => elgg_echo('save'),
33 ]);
34 
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
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
elgg_get_site_entity()
Get the current site entity.
Definition: entities.php:101