コード例 #1
0
 public static function GetWidgets()
 {
     $response = new simpleResponse();
     include './inc/incWebServiceSessionValidation.php';
     try {
         $parameters = GetWidgetsWebService::collectParameters();
         $widgets = da_widgets::GetWidgetsOfPage($parameters->page_id);
         $response->status = "OK";
         $response->message = "";
         $response->data = $widgets;
     } catch (Exception $ex) {
         $response->status = "EXCEPTION";
         $response->message = $ex->getMessage();
         $response->data = $widgets;
     }
     return $response;
 }
コード例 #2
0
ファイル: page_get_ui.php プロジェクト: JulioOrdonezV/pvcloud
 public static function RetrieveWidgetsByPage($pageId)
 {
     $widgets = da_widgets::GetWidgetsOfPage($pageId);
     $array = array();
     $i = 0;
     foreach ($widgets as $widget) {
         $i++;
         $widget_ui = new be_widget_ui();
         $widget_ui->title = $widget->title;
         $widget_ui->widget_id = $widget->widget_id;
         $widget_ui->page_id = $widget->page_id;
         $widget_ui->description = $widget->description;
         $widget_ui->widget_type_id = $widget->widget_type_id;
         $widget_ui->order = $widget->order;
         $widget_ui->refresh_frequency_sec = $widget->refresh_frequency_sec;
         array_push($array, $widget_ui);
     }
     return $array;
 }
コード例 #3
0
 public static function RetrieveFullPage()
 {
     $response = new simpleResponse();
     $parameters = GetPageWebService::collectParameters();
     try {
         $account_id = $parameters->account_id;
         //TODO: Restore login-based security by uncommenting line 42
         //include './inc/incWebServiceSessionValidation.php';
         if ($account_id > 0) {
             $fullPage = da_apps_registry::GetPage($parameters->page_id);
             $fullPage->widgets = da_widgets::GetWidgetsOfPage($parameters->page_id);
             $response->status = "OK";
             $response->message = "SUCCESS";
             $response->data = $fullPage;
         } else {
             $response->status = "ERROR HERE";
         }
     } catch (Exception $ex) {
         $response->status = "EXCEPTION";
         $response->message = $ex->getMessage();
     }
     return $response;
 }
コード例 #4
0
ファイル: da_widgets.php プロジェクト: rfrancoch/pvcloud
 private static function reorderWidgets($page_id)
 {
     $widgets = da_widgets::GetWidgetsOfPage($page_id);
     $orderIdx = 1;
     foreach ($widgets as $widget) {
         $widget->order = $orderIdx;
         da_widgets::UpdateWidget($widget);
         $orderIdx++;
     }
 }