Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
navigation
menu
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
$headers
Definition:
default.php:14
elgg_extract
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:1464
$class
$class
Definition:
default.php:25
$menu_items
$menu_items
Definition:
save.php:14
echo
elgg echo
Translates a string.
Definition:
languages.js:43
$vars
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition:
default.php:23
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$item_class
$item_class
Definition:
default.php:15
Generated on Sat Dec 21 2024 00:00:36 for Elgg by
1.8.11