Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make view step filter pass renderer & template in param instead of use

  • Loading branch information...
commit 83a9ee6b00def704b96b9bde56e031a318ff037c 1 parent 3b0c1d5
@brandonwestcott authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 template/View.php
View
12 template/View.php
@@ -382,11 +382,15 @@ protected function _step(array $step, array $params, array &$data, array &$optio
$_renderer = $this->_renderer;
$_loader = $this->_loader;
$filters = $this->outputFilters;
- $params = compact('step', 'params', 'options') + array('data' => $data + $filters);
+ $params = compact('step', 'params', 'options') + array(
+ 'data' => $data + $filters,
+ 'loader' => $_loader,
+ 'renderer' => $_renderer
+ );
- $filter = function($self, $params) use (&$_renderer, &$_loader) {
- $template = $_loader->template($params['step']['path'], $params['params']);
- return $_renderer->render($template, $params['data'], $params['options']);
+ $filter = function($self, $params) {
+ $template = $params['loader']->template($params['step']['path'], $params['params']);
+ return $params['renderer']->render($template, $params['data'], $params['options']);
};
$result = $this->_filter(__METHOD__, $params, $filter);
Please sign in to comment.
Something went wrong with that request. Please try again.