Elgg  Version 1.11
default.php
Go to the documentation of this file.
1 <?php
12 // we want css classes to use dashes
13 $vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']);
14 $headers = elgg_extract('show_section_headers', $vars, false);
15 $item_class = elgg_extract('item_class', $vars, '');
16 
17 $class = "elgg-menu elgg-menu-{$vars['name']}";
18 if (isset($vars['class'])) {
19  $class .= " {$vars['class']}";
20 }
21 
22 foreach ($vars['menu'] as $section => $menu_items) {
23  echo elgg_view('navigation/menu/elements/section', array(
24  'items' => $menu_items,
25  'class' => "$class elgg-menu-{$vars['name']}-$section",
26  'section' => $section,
27  'name' => $vars['name'],
28  'show_section_headers' => $headers,
29  'item_class' => $item_class,
30  ));
31 }
$headers
Definition: default.php:14
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1246
$class
Definition: default.php:25
$menu_items
Definition: save.php:14
elgg echo
Translates a string.
Definition: languages.js:43
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:23
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$item_class
Definition: default.php:15