Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
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
Rotua Panjaitan
yii2
Commits
bc9b62c3
Commit
bc9b62c3
authored
Jan 23, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url of CSS and JS files registered in View can be url alias
fixes #2132, fixes #2133
parent
aacbdd83
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
View.php
framework/web/View.php
+2
-0
No files found.
framework/CHANGELOG.md
View file @
bc9b62c3
...
...
@@ -87,6 +87,7 @@ Yii Framework 2 Change Log
-
Enh #2101: Gii is now using model labels when generating search (thiagotalma)
-
Enh #2103: Renamed AccessDeniedHttpException to ForbiddenHttpException, added new commonly used HTTP exception classes (danschmidt5189)
-
Enh #2124: Added support for UNION ALL queries (Ivan Pomortsev, iworker)
-
Enh #2132: Allow url of CSS and JS files registered in yii
\w
eb
\V
iew to be url alias (cebe)
-
Enh: Added
`favicon.ico`
and
`robots.txt`
to default application templates (samdark)
-
Enh: Added
`Widget::autoIdPrefix`
to support prefixing automatically generated widget IDs (qiangxue)
-
Enh: Support for file aliases in console command 'message' (omnilight)
...
...
framework/web/View.php
View file @
bc9b62c3
...
...
@@ -312,6 +312,7 @@ class View extends \yii\base\View
*/
public
function
registerCssFile
(
$url
,
$depends
=
[],
$options
=
[],
$key
=
null
)
{
$url
=
Yii
::
getAlias
(
$url
);
$key
=
$key
?:
$url
;
if
(
empty
(
$depends
))
{
$this
->
cssFiles
[
$key
]
=
Html
::
cssFile
(
$url
,
$options
);
...
...
@@ -369,6 +370,7 @@ class View extends \yii\base\View
*/
public
function
registerJsFile
(
$url
,
$depends
=
[],
$options
=
[],
$key
=
null
)
{
$url
=
Yii
::
getAlias
(
$url
);
$key
=
$key
?:
$url
;
if
(
empty
(
$depends
))
{
$position
=
isset
(
$options
[
'position'
])
?
$options
[
'position'
]
:
self
::
POS_END
;
...
...
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