当前位置: 首页>>代码示例>>PHP>>正文


PHP SugarBean::save方法代码示例

本文整理汇总了PHP中SugarBean::save方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarBean::save方法的具体用法?PHP SugarBean::save怎么用?PHP SugarBean::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SugarBean的用法示例。


在下文中一共展示了SugarBean::save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 function save($check_notify = false)
 {
     parent::save($check_notify);
     //update documents table.
     //$query = "UPDATE documents set document_version_id='$this->id' where id = '$this->document_id'";
     //$this->db->query($query);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:KBDocumentRevision.php

示例2: save

 function save($check_notify = FALSE)
 {
     if (empty($this->status)) {
         $this->status = $this->getDefaultStatus();
     }
     return parent::save($check_notify);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:Task.php

示例3: save

 function save($check_notify = false)
 {
     if (!empty($this->number)) {
         $this->name = $this->number;
     }
     return parent::save($check_notify);
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:7,代码来源:GuideContracts.php

示例4: save

 function save($check_notify = false)
 {
     require_once 'modules/Teams/TeamSetManager.php';
     TeamSetManager::flushBackendCache();
     sugar_cache_put("teamname_{$this->id}", $this->name);
     return parent::save($check_notify);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:Team.php

示例5: save

 function save($check_notify = false)
 {
     global $sugar_config;
     if (!empty($_FILES['image_file'])) {
         if ($_FILES['image_file']['error'] == 0) {
             $file_name = $_FILES['image_file']['name'];
             $tmp_name = $_FILES['image_file']['tmp_name'];
             $ext = explode('.', $file_name);
             $img_ext = $ext[count($ext) - 1];
             $img_valid = false;
             $image_extension = 'jpg_jpeg_gif_bmp_png';
             $image_extension_arr = explode('_', $image_extension);
             for ($i = 0; $i < count($image_extension_arr); $i++) {
                 if ($img_ext != $image_extension_arr[$i]) {
                     $img_valid = true;
                 }
             }
             if ($img_valid == false) {
                 echo "<script language='javascript'> alert('file ảnh không hợp lệ'); </script>";
                 return;
             }
             if (is_file('modules/images/' . $this->image)) {
                 @unlink('modules/images/' . $this->image);
             }
             $destination = 'modules/images/' . $file_name;
             if (move_uploaded_file($tmp_name, $destination)) {
                 $this->picture = "<img src='" . $sugar_config['site_url'] . "/modules/images/" . $file_name . "' width='350' height='200'/>";
                 $this->image = $file_name;
             }
         }
     }
     return parent::save($check_notify);
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:33,代码来源:Destination.php

示例6: save

 function save($id = '', $module = '', $new_addrs = array(), $primary = '', $replyTo = '', $invalid = '', $optOut = '', $in_workflow = false)
 {
     if (func_num_args() > 1) {
         parent::save($id, $module, $new_addrs, $primary, $replyTo, $invalid, $optOut, $in_workflow);
     } else {
         SugarBean::save($id);
     }
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:8,代码来源:EmailAddress.php

示例7: save

 public function save()
 {
     $sql = "SELECT id FROM {$this->table_name} WHERE team_set_id = '{$this->team_set_id}' AND module_table_name = '{$this->module_table_name}'";
     $result = $this->db->query($sql);
     $row = $this->db->fetchByAssoc($result);
     if (!$row) {
         parent::save();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:9,代码来源:TeamSetModule.php

示例8: action_resize

 /**
  * Action Resize
  * Used for drag & drop resizing
  */
 protected function action_resize()
 {
     $this->view = 'json';
     if (!$this->retrieveCurrentBean('Save')) {
         return;
     }
     require_once 'include/formbase.php';
     $this->currentBean = populateFromPost("", $this->currentBean);
     $this->currentBean->save();
     $this->view_object_map['jsonData'] = array('access' => 'yes');
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:15,代码来源:controller.php

示例9: save

 function save()
 {
     //make sure that the url has a scheme, if not then add http:// scheme
     if ($this->is_optout != 1) {
         $url = strtolower(trim($this->tracker_url));
         if (!preg_match('/^(http|https|ftp):\\/\\//i', $url)) {
             $this->tracker_url = 'http://' . $url;
         }
     }
     parent::save();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:11,代码来源:CampaignTracker.php

示例10: save

 public function save()
 {
     $hook = $this->getActionArray();
     if (!empty($this->fetched_row)) {
         $oldhook = $hook;
         // since remove_logic_hook compares 1, 3 and 4
         $oldhook[3] = 'WebLogicHook';
         remove_logic_hook($this->webhook_target_module, $this->trigger_event, $oldhook);
     }
     parent::save();
     $hook[5] = $this->id;
     check_logic_hook_file($this->webhook_target_module, $this->trigger_event, $hook);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:13,代码来源:WebLogicHook.php

示例11: save

 function save($check_notify = false)
 {
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     $email1_ori = $this->email1;
     $email2_ori = $this->email2;
     $this->in_workflow = false;
     parent::save($check_notify);
     $override_email = array();
     if ($this->in_workflow) {
         // workflow will edit this $this->email1 and $this->email2
         if ($email1_ori != $this->email1) {
             $override_email['emailAddress0'] = $this->email1;
         }
         if ($email2_ori != $this->email2) {
             $override_email['emailAddress1'] = $this->email2;
         }
     }
     $this->emailAddress->save($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     global $sugar_config;
     if (!empty($_FILES['image_file'])) {
         if ($_FILES['image_file']['error'] == 0) {
             $file_name = $_FILES['image_file']['name'];
             $tmp_name = $_FILES['image_file']['tmp_name'];
             $ext = explode('.', $file_name);
             $img_ext = $ext[count($ext) - 1];
             $img_valid = false;
             $image_extension = 'jpg_jpeg_gif_bmp_png';
             $image_extension_arr = explode('_', $image_extension);
             for ($i = 0; $i < count($image_extension_arr); $i++) {
                 if ($img_ext != $image_extension_arr[$i]) {
                     $img_valid = true;
                 }
             }
             if ($img_valid == false) {
                 echo "<script language='javascript'> alert('file ảnh không hợp lệ'); </script>";
                 return;
             }
             if (is_file('modules/images/' . $this->image)) {
                 @unlink('modules/images/' . $this->image);
             }
             $destination = 'modules/images/' . $file_name;
             if (move_uploaded_file($tmp_name, $destination)) {
                 $this->picture = "<img src='" . $sugar_config['site_url'] . "/modules/images/" . $file_name . "' width='350' height='200'/>";
                 $this->image = $file_name;
             }
         }
     }
     return $this->id;
     //return parent::save($check_notify);
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:50,代码来源:Location.php

示例12: save

 function save($check_notify = false)
 {
     $saveRet = parent::save($check_notify);
     //update documents table. (not through save, because it causes a loop)
     // If we don't have a document_id, find it.
     if (empty($this->document_id)) {
         $query = "SELECT document_id FROM document_revisions WHERE id = '" . $this->db->quote($this->id) . "'";
         $ret = $this->db->query($query, true);
         $row = $this->db->fetchByAssoc($ret);
         $this->document_id = $row['document_id'];
     }
     $query = "UPDATE documents set document_revision_id='" . $this->db->quote($this->id) . "', doc_type='" . $this->db->quote($this->doc_type) . "', doc_url='" . $this->db->quote($this->doc_url) . "', doc_id='" . $this->db->quote($this->doc_id) . "' where id = '" . $this->db->quote($this->document_id) . "'";
     $this->db->query($query, true);
     return $saveRet;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:15,代码来源:DocumentRevision.php

示例13: updateBean

 /**
  * Fetches data from the $args array and updates the bean with that data
  * @param $bean SugarBean The bean to be updated
  * @param $api ServiceBase The API class of the request, used in cases where the API changes how the fields are pulled from the args array.
  * @param $args array The arguments array passed in from the API
  * @return id Bean id
  */
 protected function updateBean(SugarBean $bean, ServiceBase $api, $args)
 {
     // Bug 54515: Set modified by and created by users to assigned to user. If not set default to admin.
     $bean->update_modified_by = false;
     $bean->set_created_by = false;
     $admin = Administration::getSettings();
     if (isset($admin->settings['supportPortal_RegCreatedBy']) && !empty($admin->settings['supportPortal_RegCreatedBy'])) {
         $bean->created_by = $admin->settings['supportPortal_RegCreatedBy'];
         $bean->modified_user_id = $admin->settings['supportPortal_RegCreatedBy'];
     } else {
         $bean->created_by = '1';
         $bean->modified_user_id = '1';
     }
     // Bug 54516 users not getting notified on new record creation
     $bean->save(true);
     return parent::updateBean($bean, $api, $args);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:24,代码来源:RegisterLeadApi.php

示例14: save

 function save($check_notify = FALSE)
 {
     parent::save($check_notify);
     //check for an remove invalid actions from this shell
     if (!empty($this->id)) {
         $actions = $this->get_actions($this->id);
         $workflow_object = $this->get_workflow_object();
         $temp_module = BeanFactory::getBean($workflow_object->base_module);
         $temp_module->call_vardef_handler("action_filter");
         $field_array = $temp_module->vardef_handler->get_vardef_array();
         foreach ($actions as $action) {
             if (!empty($action->field)) {
                 //Check if the actions field is still valid, if not remove the action
                 if (empty($field_array[$action->field])) {
                     $action->mark_deleted($action->id);
                 }
             }
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:20,代码来源:WorkFlowActionShell.php

示例15: save

 function save($check_notify = false)
 {
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     $email1_ori = $this->email1;
     $email2_ori = $this->email2;
     $this->in_workflow = false;
     parent::save($check_notify);
     $override_email = array();
     if ($this->in_workflow) {
         // workflow will edit this $this->email1 and $this->email2
         if ($email1_ori != $this->email1) {
             $override_email['emailAddress0'] = $this->email1;
         }
         if ($email2_ori != $this->email2) {
             $override_email['emailAddress1'] = $this->email2;
         }
     }
     $this->emailAddress->save($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     return $this->id;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:20,代码来源:TravelGuide.php


注:本文中的SugarBean::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。