Skip to content

Commit

Permalink
Add new constant to match variable name change.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 16, 2015
1 parent bd113e6 commit d71eacb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/View/View.php
Expand Up @@ -268,9 +268,17 @@ class View implements EventDispatcherInterface
* Constant for view file type 'view'
*
* @var string
* @deprecated 3.0.1 Use TYPE_TEMPLATE instead.
*/
const TYPE_VIEW = 'view';

/**
* Constant for view file type 'template'.
*
* @var string
*/
const TYPE_TEMPLATE = 'view';

/**
* Constant for view file type 'element'
*
Expand Down Expand Up @@ -562,7 +570,7 @@ public function render($view = null, $layout = null)
}

if ($view !== false && $viewFileName = $this->_getViewFileName($view)) {
$this->_currentType = static::TYPE_VIEW;
$this->_currentType = static::TYPE_TEMPLATE;
$this->dispatchEvent('View.beforeRender', [$viewFileName]);
$this->Blocks->set('content', $this->_render($viewFileName));
$this->dispatchEvent('View.afterRender', [$viewFileName]);
Expand Down Expand Up @@ -772,7 +780,7 @@ public function exists($name)
*/
public function extend($name)
{
if ($name[0] === '/' || $this->_currentType === static::TYPE_VIEW) {
if ($name[0] === '/' || $this->_currentType === static::TYPE_TEMPLATE) {
$parent = $this->_getViewFileName($name);
} else {
switch ($this->_currentType) {
Expand Down

0 comments on commit d71eacb

Please sign in to comment.