Elgg  Version 6.1
section.php
Go to the documentation of this file.
1 <?php
9 $html = elgg_extract('html', $vars);
10 if (empty($html)) {
11  return;
12 }
13 
15  'body' => 'main',
16  'topbar' => 'header',
17  'footer' => 'footer',
18 ];
19 
20 $class = ['elgg-page-section'];
21 
22 $section = elgg_extract('section', $vars);
23 if (!empty($section)) {
24  $class[] = "elgg-page-{$section}";
25 }
26 
27 $inner = elgg_format_element('div', ['class' => 'elgg-inner'], $html);
28 
30 
31 echo elgg_format_element($element, ['class' => $class], $inner);
if(!empty($section)) $inner
Definition: section.php:27
$element
Definition: section.php:29
$html
A wrapper to render a section of the page shell.
Definition: section.php:9
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:256
if(empty($html)) $section_elements
Definition: section.php:14
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
if(empty($html)) $class
Definition: section.php:20