loadData(); } catch (Exception $ex) { $this->vars['error'] = $ex->getMessage(); } return $this->makePartial('widget'); } public function defineProperties() { return [ 'title' => [ 'title' => 'Widget title', 'default' => 'System status', 'type' => 'string', 'validationPattern' => '^.+$', 'validationMessage' => 'The Widget Title is required.' ] ]; } protected function loadData() { $manager = UpdateManager::instance(); $this->vars['updates'] = $manager->check(); } }