Elgg  Version master
admin.php
Go to the documentation of this file.
1 <?php
11  'elgg-layout',
12  'elgg-layout-admin',
13 ]);
14 unset($vars['class']);
15 
16 $vars['sidebar'] = elgg_view('admin/sidebar', $vars);
17 
18 $header = elgg_view('page/layouts/elements/header', $vars);
19 $sidebar = elgg_view('page/layouts/elements/sidebar', $vars);
20 $body = elgg_view('page/layouts/elements/body', $vars);
21 
22 if ($sidebar) {
23  $class[] = 'elgg-layout-one-sidebar';
24 } else {
25  $class[] = 'elgg-layout-one-column';
26 }
27 
28 $layout = elgg_format_element('div', ['class' => 'elgg-layout-columns'], $sidebar . $body);
29 
30 echo elgg_format_element('div', ['class' => $class], $header . $layout);
$body
Definition: admin.php:37
$header
Definition: admin.php:18
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:276
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$vars['sidebar']
Definition: admin.php:16
$class
Elgg Admin Area Canvas.
Definition: admin.php:10
$sidebar
Definition: admin.php:19
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
$layout
Definition: admin.php:28