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
e0294ea7
Commit
e0294ea7
authored
Oct 24, 2013
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'ViewContext' renamed to 'ViewContextInterface'.
parent
83e353dd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
Controller.php
framework/yii/base/Controller.php
+1
-1
View.php
framework/yii/base/View.php
+2
-2
ViewContextInterface.php
framework/yii/base/ViewContextInterface.php
+2
-2
Widget.php
framework/yii/base/Widget.php
+1
-1
No files found.
framework/yii/base/Controller.php
View file @
e0294ea7
...
@@ -25,7 +25,7 @@ use Yii;
...
@@ -25,7 +25,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
class
Controller
extends
Component
implements
ViewContext
class
Controller
extends
Component
implements
ViewContext
Interface
{
{
/**
/**
* @event ActionEvent an event raised right before executing a controller action.
* @event ActionEvent an event raised right before executing a controller action.
...
...
framework/yii/base/View.php
View file @
e0294ea7
...
@@ -89,7 +89,7 @@ class View extends Component
...
@@ -89,7 +89,7 @@ class View extends Component
/**
/**
* @var ViewContext the context under which the [[renderFile()]] method is being invoked.
* @var ViewContext
Interface
the context under which the [[renderFile()]] method is being invoked.
*/
*/
public
$context
;
public
$context
;
/**
/**
...
@@ -244,7 +244,7 @@ class View extends Component
...
@@ -244,7 +244,7 @@ class View extends Component
if
(
$context
===
null
)
{
if
(
$context
===
null
)
{
$context
=
$this
->
context
;
$context
=
$this
->
context
;
}
}
if
(
$context
instanceof
ViewContext
)
{
if
(
$context
instanceof
ViewContext
Interface
)
{
$file
=
$context
->
findViewFile
(
$view
);
$file
=
$context
->
findViewFile
(
$view
);
}
else
{
}
else
{
throw
new
InvalidCallException
(
'Current context is not supported.'
);
throw
new
InvalidCallException
(
'Current context is not supported.'
);
...
...
framework/yii/base/ViewContext.php
→
framework/yii/base/ViewContext
Interface
.php
View file @
e0294ea7
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
namespace
yii\base
;
namespace
yii\base
;
/**
/**
* ViewContext represents possible context for the view rendering.
* ViewContext
Interface
represents possible context for the view rendering.
* It determines the way the non-global view files are searched.
* It determines the way the non-global view files are searched.
* This interface introduces method [[findViewFile]], which will be used
* This interface introduces method [[findViewFile]], which will be used
* at [[View::render()]] to determine the file by view name, which does
* at [[View::render()]] to determine the file by view name, which does
...
@@ -19,7 +19,7 @@ namespace yii\base;
...
@@ -19,7 +19,7 @@ namespace yii\base;
* @author Paul Klimov <klimov.paul@gmail.com>
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
interface
ViewContext
interface
ViewContext
Interface
{
{
/**
/**
* Finds the view file based on the given view name.
* Finds the view file based on the given view name.
...
...
framework/yii/base/Widget.php
View file @
e0294ea7
...
@@ -20,7 +20,7 @@ use Yii;
...
@@ -20,7 +20,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
class
Widget
extends
Component
implements
ViewContext
class
Widget
extends
Component
implements
ViewContext
Interface
{
{
/**
/**
* @var integer a counter used to generate [[id]] for widgets.
* @var integer a counter used to generate [[id]] for widgets.
...
...
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