Elgg  Version master
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);
14 elgg_unregister_external_file('css', 'elgg');
15 elgg_load_external_file('css', 'maintenance');
17 $body = elgg_format_element('div', ['class' => 'elgg-page-messages'], $messages);
18 $body .= elgg_format_element('main', ['class' => 'elgg-body-maintenance'], $content);
19 $body = elgg_format_element('div', ['class' => ['elgg-page', 'elgg-page-maintenance'], 'id' => 'elgg-maintenance-page-wrapper'], $body);
21 $head = elgg_view('page/elements/head', elgg_extract('head', $vars, []));
23 echo elgg_view('page/elements/html', [
24  'head' => $head,
25  'body' => $body,
26 ]);
elgg_unregister_external_file(string $type, string $name)
Unregister an external file.
Definition: maintenance.php:21
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.
Maintenance mode layout.
Definition: maintenance.php:8
Definition: theme.php:5
Definition: maintenance.php:12
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145