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