Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
859669ca
authored
2010-10-22 18:36:06 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added class to items that have children
1 parent
840f94ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
com/Menu/Menu.php
com/Menu/Menu.php
View file @
859669c
...
...
@@ -40,6 +40,7 @@ class HierarchicalMenu implements Countable, Iterator {
$last_id
=
$item
->
ID
;
}
elseif
(
$item
->
menu_item_parent
==
$last_id
)
{
$this
->
contents
[
$this
->
id_lookup
[
$last_id
]]
->
_children
=
true
;
$this
->
contents
[
$this
->
id_lookup
[
$last_id
]]
->
classes
[]
=
'menu-item-children'
;
$nest
[]
=
$last_id
;
$last_id
=
$item
->
ID
;
...
...
@@ -51,9 +52,10 @@ class HierarchicalMenu implements Countable, Iterator {
}
}
$me
=
__CLASS__
;
foreach
(
$this
->
contents
as
$key
=>
&
$item
)
{
if
(
true
===
$item
->
_children
)
{
$item
->
HierarchicalMenu
=
new
HierarchicalMenu
(
$menu
,
$item
->
ID
);
$item
->
{
str_replace
(
Array
(
__NAMESPACE__
,
'\\'
),
''
,
$me
)}
=
new
$me
(
$menu
,
$item
->
ID
);
}
unset
(
$this
->
contents
[
$key
]
->
_children
);
}
...
...
Please
register
or
sign in
to post a comment