Elgg  Version 4.3
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 elgg_unregister_external_file('css', 'elgg');
15 elgg_load_external_file('css', 'maintenance');
16 
17 $body = <<<__BODY
18 <div class="elgg-page elgg-page-maintenance" id="elgg-maintenance-page-wrapper">
19  <div class="elgg-page-messages">
20  $messages
21  </div>
22  <div class="elgg-body-maintenance">
23  $content
24  </div>
25 </div>
26 __BODY;
27 
28 $head = elgg_view('page/elements/head', elgg_extract('head', $vars, []));
29 
30 echo elgg_view('page/elements/html', [
31  'head' => $head,
32  'body' => $body,
33 ]);
elgg_unregister_external_file(string $type, string $name)
Unregister an external file.
$head
Definition: maintenance.php:28
$messages
Maintenance mode page shell.
Definition: maintenance.php:11
elgg_load_external_file(string $type, string $name)
Load an external resource for use on this page.
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:547
$body
Maintenance mode layout.
Definition: maintenance.php:8
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
$content
Definition: maintenance.php:12
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179