Elgg  Version 3.0
maintenance.php
Go to the documentation of this file.
1 <?php
2 
4 
5 $message = $site->getPrivateSetting('elgg_maintenance_message');
6 
7 if (!$message) {
8  $message = elgg_echo('admin:maintenance_mode:default_message');
9 }
10 
11 elgg_load_css('maintenance');
12 
13 elgg_set_http_header("HTTP/1.1 503 Service Unavailable");
14 
15 $body = elgg_view_layout('maintenance', [
16  'message' => $message,
17  'site' => $site,
18 ]);
19 
20 echo elgg_view_page($site->getDisplayName(), $body, 'maintenance');
elgg_set_http_header($header, $replace=true)
Set a response HTTP header.
Definition: elgglib.php:57
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_page($title, $body, $page_shell= 'default', $vars=[])
Assembles and outputs a full page.
Definition: views.php:360
elgg_load_css($name)
Load a CSS file for this page.
Definition: elgglib.php:234
$message
Definition: maintenance.php:5
elgg echo
Translates a string.
Definition: languages.js:43
$site
Definition: maintenance.php:3
elgg_get_site_entity()
Get the current site entity.
Definition: entities.php:130
$body
Maintenance mode layout.
Definition: maintenance.php:8
elgg_view_layout($layout_name, $vars=[])
Displays a layout with optional parameters.
Definition: views.php:593