Elgg  Version 4.x
admin.php
Go to the documentation of this file.
1 <?php
10 elgg_load_external_file('css', 'elgg.admin');
11 
12 $messages = elgg_view('page/elements/messages', ['object' => elgg_extract('sysmessages', $vars)]);
13 $messages .= elgg_view('page/elements/admin_notices', $vars);
14 
15 // render content before head so that JavaScript and CSS can be loaded. See #4032
17  'topbar' => elgg_view('admin/header', $vars),
18  'messages' => $messages,
19  'body' => elgg_extract('body', $vars),
20  'footer' => elgg_view('admin/footer', $vars),
21 ];
22 
23 $page = '';
24 foreach ($sections as $section => $content) {
25  $page .= elgg_view('page/elements/section', [
26  'section' => $section,
27  'html' => $content,
28  'page_shell' => elgg_extract('page_shell', $vars),
29  ]);
30 }
31 
32 $page = elgg_format_element('div', ['class' => 'elgg-inner'], $page);
33 
34 $page_vars = elgg_extract('page_attrs', $vars, []);
35 $page_vars['class'] = elgg_extract_class($page_vars, ['elgg-page', 'elgg-page-admin']);
36 
38 
39 $body .= elgg_view('page/elements/foot');
40 
41 $head = elgg_view('page/elements/head', elgg_extract('head', $vars, []));
42 
44  'head' => $head,
45  'body' => $body,
46  'body_attrs' => elgg_extract('body_attrs', $vars, []),
47  'html_attrs' => elgg_extract('html_attrs', $vars, []),
48 ];
49 
50 echo elgg_view('page/elements/html', $params);
$messages
Definition: admin.php:12
$params
Definition: admin.php:43
$body
Definition: admin.php:37
$head
Definition: admin.php:41
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:708
$page
Definition: admin.php:23
$vars['breadcrumbs']
Definition: admin.php:18
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:134
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:686
$content
Definition: admin.php:28
elgg echo
Translates a string.
Definition: deprecated.js:530
$sections
Definition: admin.php:16
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:205
$page_vars
Definition: admin.php:34