loadData(); } catch (Exception $ex) { $this->vars['error'] = $ex->getMessage(); } return $this->makePartial('widget'); } public function defineProperties() { return [ 'title' => [ 'title' => 'backend::lang.dashboard.widget_title_label', 'default' => 'cms::lang.dashboard.active_theme.widget_title_default', 'type' => 'string', 'validationPattern' => '^.+$', 'validationMessage' => 'backend::lang.dashboard.widget_title_error', ] ]; } /** * {@inheritDoc} */ protected function loadAssets() { $this->addCss('css/activetheme.css', 'core'); } protected function loadData() { $this->vars['theme'] = Theme::getActiveTheme(); $this->vars['inMaintenance'] = MaintenanceSetting::get('is_enabled'); } }