当前位置: 首页>>代码示例>>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;未经允许,请勿转载。