Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed data order when rendering sub elements and layouts

  • Loading branch information...
commit 05395223a201bc1ad4eabbd3e7f1b937cd53d718 1 parent f458464
@Ephigenia authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/ephFrame/view/View.php
View
10 lib/ephFrame/view/View.php
@@ -44,16 +44,16 @@ public function render($part, $path, Array $data = array())
switch($part) {
default:
case 'view':
- return $renderer->render($this->rootPath.$path.'.'.$this->type, (array) $this + $data);
+ return $renderer->render($this->rootPath.$path.'.'.$this->type, $data + (array) $this);
break;
case 'layout':
- return $this->render(false, 'layout/'.$path, (array) $this + $data);
+ return $this->render(false, 'layout/'.$path, $data + (array) $this);
case 'element':
- return $this->render(false, 'element/'.$path, (array) $this + $data);
+ return $this->render(false, 'element/'.$path, $data + (array) $this);
case 'all':
- $content = $this->render('view', $path, $data);
+ $content = $this->render('view', $path, $data + (array) $this);
if ($this->layout) {
- return $this->render('layout', $this->layout, array('content' => $content) + $data);
+ return $this->render('layout', $this->layout, $data + array('content' => $content));
}
return $content;
}

0 comments on commit 0539522

Please sign in to comment.
Something went wrong with that request. Please try again.