Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
Project
Overview
Details
Activity
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
4fccdc2a
Commit
4fccdc2a
authored
May 13, 2012
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored some code in BootNavbar
parent
f2f79cb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
BootNavbar.php
widgets/BootNavbar.php
+13
-14
No files found.
widgets/BootNavbar.php
View file @
4fccdc2a
...
@@ -67,14 +67,15 @@ class BootNavbar extends CWidget
...
@@ -67,14 +67,15 @@ class BootNavbar extends CWidget
if
(
!
isset
(
$this
->
brandUrl
))
if
(
!
isset
(
$this
->
brandUrl
))
$this
->
brandUrl
=
Yii
::
app
()
->
homeUrl
;
$this
->
brandUrl
=
Yii
::
app
()
->
homeUrl
;
$this
->
brandOptions
[
'href'
]
=
$this
->
brandUrl
;
if
(
isset
(
$this
->
brandOptions
[
'class'
]))
$this
->
brandOptions
[
'class'
]
.=
' brand'
;
else
$this
->
brandOptions
[
'class'
]
=
'brand'
;
}
}
}
/**
* Runs the widget.
*/
public
function
run
()
{
$classes
=
array
(
'navbar'
);
$classes
=
array
(
'navbar'
);
if
(
$this
->
fixed
!==
false
)
if
(
$this
->
fixed
!==
false
)
...
@@ -89,15 +90,13 @@ class BootNavbar extends CWidget
...
@@ -89,15 +90,13 @@ class BootNavbar extends CWidget
$this
->
htmlOptions
[
'class'
]
.=
' '
.
$classes
;
$this
->
htmlOptions
[
'class'
]
.=
' '
.
$classes
;
else
else
$this
->
htmlOptions
[
'class'
]
=
$classes
;
$this
->
htmlOptions
[
'class'
]
=
$classes
;
}
if
(
isset
(
$this
->
brandOptions
[
'class'
]))
/**
$this
->
brandOptions
[
'class'
]
.=
' brand'
;
* Runs the widget.
else
*/
$this
->
brandOptions
[
'class'
]
=
'brand'
;
public
function
run
()
{
if
(
isset
(
$this
->
brandUrl
))
$this
->
brandOptions
[
'href'
]
=
$this
->
brandUrl
;
$containerCssClass
=
$this
->
fluid
?
'container-fluid'
:
'container'
;
$containerCssClass
=
$this
->
fluid
?
'container-fluid'
:
'container'
;
echo
CHtml
::
openTag
(
'div'
,
$this
->
htmlOptions
);
echo
CHtml
::
openTag
(
'div'
,
$this
->
htmlOptions
);
...
...
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