Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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
$class
Definition: default.php:26
$menu_items
Definition: save.php:13
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:24
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1310
$item_class
Definition: default.php:15