Elgg  Version master
navigation.php
Go to the documentation of this file.
1 <?php
8 $entity = elgg_extract('entity', $vars);
9 if (!$entity instanceof \ElggEntity) {
10  return;
11 }
12 
13 if (!elgg_extract('show_navigation', $vars, false)) {
14  return;
15 }
16 
17 $vars['sort_by'] = 'priority';
18 
19 $menu = elgg_view_menu('entity_navigation', $vars);
20 if (!$menu) {
21  return;
22 }
23 
24 echo elgg_format_element('div', ['class' => 'elgg-listing-full-navigation'], $menu);
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
$menu
Definition: navigation.php:19
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
$entity
Outputs entity previous/next navigation elements.
Definition: navigation.php:8
if(!$entity instanceof\ElggEntity) if(!elgg_extract('show_navigation', $vars, false)) $vars['sort_by']
Definition: navigation.php:17