Beispiel #1
0
 /**
  *
  */
 function unregisterProcess($pn_proc_id)
 {
     $o_appvars = new ApplicationVars();
     $va_opo_processes = $o_appvars->getVar("taskqueue_opo_processes");
     unset($va_opo_processes[$pn_proc_id]);
     $o_appvars->setVar("taskqueue_opo_processes", $va_opo_processes);
     $o_appvars->save();
 }
Beispiel #2
0
 /**
  * Ping the ElasticSearch mapping, effectively resetting the refresh time
  */
 public function ping()
 {
     $this->opo_app_vars->setVar('ElasticSearchMappingRefresh', time() + 24 * 60 * 60);
     $this->opo_app_vars->save();
 }
 /**
  * 
  */
 public function saveWidgetSettings($ps_widget_id)
 {
     if ($va_widget_info = $this->getWidgetByID($ps_widget_id)) {
         $va_available_settings = $this->opo_widget_manager->getWidgetAvailableSettings($va_widget_info['widget']);
         $va_setting_values = $this->opa_dashboard_config['columns'][$va_widget_info['col']][$va_widget_info['pos']]['settings'];
         $o_appvar = null;
         foreach ($va_available_settings as $vs_setting_name => $va_setting_info) {
             $va_setting_values[$vs_setting_name] = $this->opo_request->getParameter('setting_' . $vs_setting_name, pString);
             // scope = "application" means value should be stored as an application-wide value using ApplicationVars.
             if (isset($va_setting_info['scope']) && $va_setting_info['scope'] == 'application') {
                 if (!$o_appvar) {
                     $o_appvar = new ApplicationVars();
                 }
                 // get application vars
                 $o_appvar->setVar('widget_settings_' . $va_widget_info['widget'] . '_' . $vs_setting_name, $va_setting_values[$vs_setting_name]);
                 // put setting value into application var
             }
         }
         if ($o_appvar) {
             $o_appvar->save();
         }
         $this->opa_dashboard_config['columns'][$va_widget_info['col']][$va_widget_info['pos']]['settings'] = $va_setting_values;
         $this->opo_request->user->setVar('dashboard_config', $this->opa_dashboard_config);
     }
     return null;
 }