Elgg
Version 2.3
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
navigation
menu
elements
item.php
Go to the documentation of this file.
1
<?php
12
$item
=
$vars
[
'item'
];
13
14
$link_class
=
'elgg-menu-closed'
;
15
if
(
$item
->getSelected()) {
16
// @todo switch to addItemClass when that is implemented
17
//$item->setItemClass('elgg-state-selected');
18
$link_class
=
'elgg-menu-opened'
;
19
}
20
21
$children
=
$item
->getChildren();
22
if
(
$children
) {
23
$item
->addLinkClass(
$link_class
);
24
$item
->addLinkClass(
'elgg-menu-parent'
);
25
}
26
27
$item_class
=
$item
->getItemClass();
28
if
(
$item
->getSelected()) {
29
$item_class
=
"$item_class elgg-state-selected"
;
30
}
31
if
(isset(
$vars
[
'item_class'
]) &&
$vars
[
'item_class'
]) {
32
$item_class
.=
' '
.
$vars
[
'item_class'
];
33
}
34
35
echo
"<li class=\"$item_class\">"
;
36
echo
elgg_view_menu_item
(
$item
);
37
if
(
$children
) {
38
echo
elgg_view
(
'navigation/menu/elements/section'
, array(
39
'items'
=>
$children
,
40
'class'
=>
'elgg-menu elgg-child-menu'
,
41
));
42
}
43
echo
'</li>'
;
$link_class
$link_class
Definition:
item.php:14
$vars
$vars['entity']
Definition:
plugin_settings.php:15
$item_class
if($children) $item_class
Definition:
item.php:27
$item
$item
Definition:
item.php:12
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
elgg_view_menu_item
elgg_view_menu_item(\ElggMenuItem $item, array $vars=array())
Render a menu item (usually as a link)
Definition:
views.php:815
$children
if($item->getSelected()) $children
Definition:
item.php:21
Generated on Sat Dec 21 2024 00:01:05 for Elgg by
1.8.11