Elgg  Version master
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)]);
12 $content = (string) elgg_extract('body', $vars);
13 
14 elgg_unregister_external_file('css', 'elgg');
15 elgg_load_external_file('css', 'maintenance');
16 
17 $body = elgg_format_element('div', ['class' => 'elgg-page-messages'], $messages);
18 $body .= elgg_format_element('main', ['class' => 'elgg-body-maintenance'], $content);
19 
20 $body = elgg_format_element('div', ['class' => ['elgg-page', 'elgg-page-maintenance']], $body);
21 
22 $head = elgg_view('page/elements/head', elgg_extract('head', $vars, []));
23 
24 echo elgg_view('page/elements/html', [
25  'head' => $head,
26  'body' => $body,
27 ]);
elgg_unregister_external_file(string $type, string $name)
Unregister an external file.
$head
Definition: maintenance.php:22
$messages
Maintenance mode page shell.
Definition: maintenance.php:11
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_load_external_file(string $type, string $name)
Load an external resource for use on this page.
$body
Definition: maintenance.php:17
$vars
Definition: theme.php:5
$content
Definition: maintenance.php:12
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145