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
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
PSDI Army
yii2
Commits
5b6e79dc
Commit
5b6e79dc
authored
Apr 30, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #3298: Supported configuring `View::theme` using a class name
parent
f1742e5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
View.php
framework/base/View.php
+3
-1
No files found.
framework/CHANGELOG.md
View file @
5b6e79dc
...
...
@@ -35,6 +35,7 @@ Yii Framework 2 Change Log
-
Enh #3222: Added
`useTablePrefix`
option to the model generator for Gii (horizons2)
-
Enh #3230: Added
`yii\filters\AccessControl::user`
to support access control with different actors (qiangxue)
-
Enh #3252: Added support for case insensitive matching using ILIKE to PostgreSQL QueryBuilder (cebe)
-
Enh #3298: Supported configuring
`View::theme`
using a class name (netyum, qiangxue)
-
Enh: Added support for using sub-queries when building a DB query with
`IN`
condition (qiangxue)
-
Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
-
Enh: Added
`yii\web\UrlManager::addRules()`
to simplify adding new URL rules (qiangxue)
...
...
framework/base/View.php
View file @
5b6e79dc
...
...
@@ -72,7 +72,7 @@ class View extends Component
*/
public
$defaultExtension
=
'php'
;
/**
* @var Theme|array
the theme object or the configuration array
for creating the theme object.
* @var Theme|array
|string the theme object or the configuration
for creating the theme object.
* If not set, it means theming is not enabled.
*/
public
$theme
;
...
...
@@ -114,6 +114,8 @@ class View extends Component
$this
->
theme
[
'class'
]
=
'yii\base\Theme'
;
}
$this
->
theme
=
Yii
::
createObject
(
$this
->
theme
);
}
elseif
(
is_string
(
$this
->
theme
))
{
$this
->
theme
=
Yii
::
createObject
(
$this
->
theme
);
}
}
...
...
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