Elgg
Version 2.3
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
$class
$class
Definition:
default.php:26
$menu_items
$menu_items
Definition:
save.php:13
echo
elgg echo
Translates a string.
Definition:
languages.js:48
elgg_view
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:336
$vars
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition:
default.php:24
elgg_extract
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:1375
$item_class
$item_class
Definition:
default.php:15
Generated on Sun Nov 10 2024 00:01:11 for Elgg by
1.8.11