Elgg  Version 3.0
maintenance.php
Go to the documentation of this file.
1 <?php
10 // render content before head so that JavaScript and CSS can be loaded. See #4032
11 $messages = elgg_view('page/elements/messages', ['object' => elgg_extract('sysmessages', $vars)]);
13 
14 $title = elgg_extract('title', $vars, elgg_get_site_entity()->getDisplayName());
15 $favicon = elgg_view('page/elements/shortcut_icon', $vars);
16 $css = elgg_get_simplecache_url('maintenance.css');
17 $head = <<<__HEAD
18  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19  <title>$title</title>
20  $favicon
21  <link href="$css" rel="stylesheet">
22 __HEAD;
23 
24 $body = <<<__BODY
25 <div class="elgg-page elgg-page-maintenance" id="elgg-maintenance-page-wrapper">
26  <div class="elgg-page-messages">
27  $messages
28  </div>
29  <div class="elgg-body-maintenance">
30  $content
31  </div>
32 </div>
33 __BODY;
34 
35 echo elgg_view("page/elements/html", ['head' => $head, 'body' => $body]);
elgg_get_simplecache_url($view, $subview= '')
Get the URL for the cached view.
Definition: cache.php:141
$head
Definition: maintenance.php:17
$css
Definition: maintenance.php:16
$messages
Maintenance mode page shell.
Definition: maintenance.php:11
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_site_entity()
Get the current site entity.
Definition: entities.php:130
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
$body
Maintenance mode layout.
Definition: maintenance.php:8
$vars['type']
Definition: save.php:11
$title
Definition: maintenance.php:14
$content
Definition: maintenance.php:12
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246
$favicon
Definition: maintenance.php:15