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
0cce7684
Commit
0cce7684
authored
Apr 01, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed ViewAction::afterRun()
parent
9fd0dced
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
ViewAction.php
framework/web/ViewAction.php
+9
-18
No files found.
framework/web/ViewAction.php
View file @
0cce7684
...
...
@@ -55,11 +55,6 @@ class ViewAction extends Action
public
$layout
;
/**
* @var string Used to store controller layout during executin and then restore it
*/
private
$_controllerLayout
;
/**
* Runs the action.
* This method displays the view requested by the user.
* @throws NotFoundHttpException if the view file cannot be found
...
...
@@ -68,13 +63,14 @@ class ViewAction extends Action
{
$viewPath
=
$this
->
getViewPath
();
$controllerLayout
=
null
;
if
(
$this
->
layout
!==
null
)
{
$
this
->
_
controllerLayout
=
$this
->
controller
->
layout
;
$controllerLayout
=
$this
->
controller
->
layout
;
$this
->
controller
->
layout
=
$this
->
layout
;
}
try
{
return
$this
->
render
(
$viewPath
);
$output
=
$this
->
render
(
$viewPath
);
}
catch
(
InvalidParamException
$e
)
{
if
(
YII_DEBUG
)
{
throw
new
NotFoundHttpException
(
$e
->
getMessage
());
...
...
@@ -84,6 +80,12 @@ class ViewAction extends Action
);
}
}
if
(
$controllerLayout
)
{
$this
->
controller
->
layout
=
$controllerLayout
;
}
return
$output
;
}
/**
...
...
@@ -98,17 +100,6 @@ class ViewAction extends Action
}
/**
* @inheritdoc
*/
protected
function
afterRun
()
{
if
(
$this
->
layout
!==
null
)
{
$this
->
controller
->
layout
=
$this
->
_controllerLayout
;
}
parent
::
afterRun
();
}
/**
* Obtain view path from GET
*
* @return string view path
...
...
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