Elgg  Version master
header.php
Go to the documentation of this file.
1 <?php
2 
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) {
18  'class' => 'elgg-heading-main',
19  ]);
20  }
21 
23  $menu_params['sort_by'] = 'priority';
24  $menu_params['class'] = 'elgg-menu-hz';
25  $buttons = elgg_view_menu('title', $menu_params);
26 
27  $header = $title . $buttons;
28 }
29 
30 if (empty($header)) {
31  return;
32 }
33 
34 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:254
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