diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php index 7ac3151b31740f88fe2eb12525537391c6fe9093..f781af8973f280f46368f39528accc21f207174d 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); } /**