public function prepareView(\Nethgui\View\ViewInterface $view) { parent::prepareView($view); $this->notifications->defineTemplate('adminTodo', self::TEMPLATE, 'bg-yellow'); $view['todos'] = array_map(function ($todo) use($view) { if (isset($todo['action']['url'])) { $todo['action']['url'] = $view->getModuleUrl($todo['action']['url']); } return $todo; }, $this->readTodos()); if ($this->emitNotifications) { foreach ($view['todos'] as $todo) { $this->notifications->adminTodo($todo); } } }