當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SugarController::pre_save方法代碼示例

本文整理匯總了PHP中SugarController::pre_save方法的典型用法代碼示例。如果您正苦於以下問題:PHP SugarController::pre_save方法的具體用法?PHP SugarController::pre_save怎麽用?PHP SugarController::pre_save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SugarController的用法示例。


在下文中一共展示了SugarController::pre_save方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: pre_save

 public function pre_save()
 {
     $this->pre_operation = $this->bean->operation;
     $this->pre_quantity = $this->bean->quantity;
     $this->pre_xinventory_id = $this->bean->xinventory_id;
     parent::pre_save();
 }
開發者ID:sunmo,項目名稱:snowlotus,代碼行數:7,代碼來源:controller.php

示例2: testpre_save

 public function testpre_save()
 {
     $SugarController = new SugarController();
     $SugarController->setModule('Users');
     $SugarController->loadBean();
     //execute the method and check if it either works or throws an mysql exception.
     //Fail if it throws any other exception.
     try {
         $SugarController->pre_save();
     } catch (Exception $e) {
         $this->assertStringStartsWith('mysqli_query()', $e->getMessage());
     }
     $this->assertTrue(true);
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:14,代碼來源:SugarControllerTest.php

示例3: pre_save

 public function pre_save()
 {
     parent::pre_save();
     require_once 'modules/Workflows/includes/WorkflowBaseAction.php';
     if (isset($this->bean->accion) && isset($this->record)) {
         $accion = WorkflowBaseAction::obtener_accion_por_nombre($this->bean->accion);
         try {
             $accion->verificar_parametros($this->bean->parametros);
         } catch (Exception $e) {
             sugar_set_message("No se encontraron los parametros: " . implode(', ', $accion->parametros_requeridos()) . "; para la acción: {$accion->nombre}. No se Guardaron los cambios", "error");
             $args = array('module' => $this->module, 'action' => "EditView", 'record' => $this->record);
             $this->set_redirect(create_url($args));
             $this->redirect();
             die;
         }
     }
 }
開發者ID:dinhquyet92,項目名稱:sugarcrm_advanced_workflows,代碼行數:17,代碼來源:controller.php

示例4: pre_save

 public function pre_save()
 {
     parent::pre_save();
     $this->api = ExternalAPIFactory::loadAPI($this->bean->application, true);
     if (empty($this->api)) {
         return $this->failed(translate('LBL_AUTH_UNSUPPORTED', $this->bean->module_dir));
     }
     if (empty($this->bean->id)) {
         $eapmBean = EAPM::getLoginInfo($this->bean->application, true);
         if ($eapmBean) {
             SugarApplication::appendErrorMessage(translate('LBL_APPLICATION_FOUND_NOTICE', $this->bean->module_dir));
             $this->bean->id = $eapmBean->id;
         }
     }
     $this->bean->validated = false;
     $this->bean->save_cleanup();
     $this->api->loadEAPM($this->bean);
 }
開發者ID:omusico,項目名稱:sugar_work,代碼行數:18,代碼來源:controller.php


注:本文中的SugarController::pre_save方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。