Elgg  Version 6.1
header.php
Go to the documentation of this file.
1 <?php
9 $header = elgg_extract('header', $vars);
10 unset($vars['header']);
11 
12 if (!isset($header)) {
13  $title = elgg_extract('title', $vars, '');
14  unset($vars['title']);
15 
16  if ($title) {
17  $title = elgg_view_title($title, ['class' => 'elgg-heading-main']);
18  }
19 
21  $menu_params['sort_by'] = 'priority';
22  $menu_params['class'] = 'elgg-menu-hz';
23 
24  $buttons = elgg_view_menu('title', $menu_params);
25 
26  $header = $title . $buttons;
27 }
28 
29 if (empty($header)) {
30  return;
31 }
32 
33 echo elgg_format_element('div', ['class' => ['elgg-head', 'elgg-layout-header']], $header);
if(!empty($url)) $title
Definition: header.php:19
elgg_view_title(string $title, array $vars=[])
Renders a title.
Definition: views.php:815
$vars
Definition: header.php:13
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
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:441
$header
Header for layouts.
Definition: header.php:9
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145