Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
87b63743
Commit
87b63743
authored
Nov 16, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4450: Added `yii\bootstrap\Nav::renderDropdown()`
parent
b9d20fde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
CHANGELOG.md
CHANGELOG.md
+1
-0
Nav.php
Nav.php
+18
-6
No files found.
CHANGELOG.md
View file @
87b63743
...
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
-
Bug #5570:
`yii\bootstrap\Tabs`
would throw an exception if
`content`
is not set for one of its
`items`
(RomeroMsk)
-
Bug #5570:
`yii\bootstrap\Tabs`
would throw an exception if
`content`
is not set for one of its
`items`
(RomeroMsk)
-
Enh #4181: Added
`yii\bootstrap\Modal::$headerOptions`
and
`yii\bootstrap\Modal::$footerOptions`
(tuxoff, samdark)
-
Enh #4181: Added
`yii\bootstrap\Modal::$headerOptions`
and
`yii\bootstrap\Modal::$footerOptions`
(tuxoff, samdark)
-
Enh #4450: Added
`yii\bootstrap\Nav::renderDropdown()`
(qiangxue)
-
Enh #5735: Added
`yii\bootstrap\Tabs::renderTabContent`
to support manually rendering tab contents (RomeroMsk)
-
Enh #5735: Added
`yii\bootstrap\Tabs::renderTabContent`
to support manually rendering tab contents (RomeroMsk)
-
Enh #5799:
`yii\bootstrap\ButtonGroup::buttons`
can take all options that are supported by
`yii\bootstrap\Button`
(aleksanderd)
-
Enh #5799:
`yii\bootstrap\ButtonGroup::buttons`
can take all options that are supported by
`yii\bootstrap\Button`
(aleksanderd)
-
Chg #5874: Upgraded Twitter Bootstrap to 3.3.x (samdark)
-
Chg #5874: Upgraded Twitter Bootstrap to 3.3.x (samdark)
...
...
Nav.php
View file @
87b63743
...
@@ -171,12 +171,7 @@ class Nav extends Widget
...
@@ -171,12 +171,7 @@ class Nav extends Widget
if
(
$this
->
activateItems
)
{
if
(
$this
->
activateItems
)
{
$items
=
$this
->
isChildActive
(
$items
,
$active
);
$items
=
$this
->
isChildActive
(
$items
,
$active
);
}
}
$items
=
Dropdown
::
widget
([
$items
=
$this
->
renderDropdown
(
$items
);
'items'
=>
$items
,
'encodeLabels'
=>
$this
->
encodeLabels
,
'clientOptions'
=>
false
,
'view'
=>
$this
->
getView
(),
]);
}
}
}
}
...
@@ -187,6 +182,23 @@ class Nav extends Widget
...
@@ -187,6 +182,23 @@ class Nav extends Widget
return
Html
::
tag
(
'li'
,
Html
::
a
(
$label
,
$url
,
$linkOptions
)
.
$items
,
$options
);
return
Html
::
tag
(
'li'
,
Html
::
a
(
$label
,
$url
,
$linkOptions
)
.
$items
,
$options
);
}
}
/**
* Renders the given items as a dropdown.
* This method is called to create sub-menus.
* @param array $items the given items. Please refer to [[Dropdown::items]] for the array structure.
* @return string the rendering result.
* @since 2.0.1
*/
protected
function
renderDropdown
(
$items
)
{
return
Dropdown
::
widget
([
'items'
=>
$items
,
'encodeLabels'
=>
$this
->
encodeLabels
,
'clientOptions'
=>
false
,
'view'
=>
$this
->
getView
(),
]);
}
/**
/**
* Check to see if a child item is active optionally activating the parent.
* Check to see if a child item is active optionally activating the parent.
* @param array $items @see items
* @param array $items @see items
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment