From c9b3f18941f452f72f2849df4ac454f18a59d443 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 24 Jan 2013 11:00:34 -0500 Subject: [PATCH] Eliminated workaround for ZF2 problem that no longer exists. --- module/VuFind/src/VuFind/Controller/AbstractBase.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php index 7ac3151b317..f781af8973f 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBase.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php @@ -59,17 +59,7 @@ class AbstractBase extends AbstractActionController */ protected function createViewModel($params = null) { - // I would expect to be able to just pass $params to the ViewModel - // constructor, but as of beta5, that seems to make the resulting - // object unable to accept additional variables. - $view = new ViewModel(); - if (!empty($params)) { - foreach ($params as $k => $v) { - $view->setVariable($k, $v); - } - } - - return $view; + return new ViewModel($params); } /** -- GitLab