Elgg  Version 6.1
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' => 'switch',
14  '#label' => elgg_echo('admin:maintenance_mode:mode_label'),
15  'name' => 'mode',
16  'value' => elgg_get_config('elgg_maintenance_mode'),
17 ]);
18 
19 echo elgg_view_field([
20  '#type' => 'longtext',
21  '#label' => elgg_echo('admin:maintenance_mode:message_label'),
22  'name' => 'message',
23  'id' => 'message',
24  'value' => $site->elgg_maintenance_message ?: elgg_echo('admin:maintenance_mode:default_message'),
25 ]);
26 
28  '#type' => 'submit',
29  'text' => elgg_echo('save'),
30 ]);
31 
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