Fixed the model state not being set correctly

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
Roland Dalmulder 2021-10-30 22:50:50 +02:00
parent b3e7a90d37
commit 98e48eb411
No known key found for this signature in database
GPG Key ID: 6D30CD38749A5B9E
1 changed files with 6 additions and 1 deletions

View File

@ -76,7 +76,12 @@ class DisplayController extends AbstractController
$model = new $modelClass($this->context, null, Factory::getDbo());
// Initialize the state for the model
$model->setState($this->initializeState($model));
$state = $this->initializeState($model);
foreach ($state as $key => $value)
{
$model->setState($key, $value);
}
// Initialize the view class now
$view = new $viewClass($model, $paths);