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


PHP SugarEmailAddress::handleLegacySave方法代碼示例

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


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

示例1: save

 /**
  * @see parent::save()
  *
  * @param bool $check_notify
  *
  * @return string
  */
 public function save($check_notify = false)
 {
     if (!empty($GLOBALS['resavingRelatedBeans'])) {
         return parent::save($check_notify);
     }
     $this->add_address_streets('billing_address_street');
     $this->add_address_streets('shipping_address_street');
     $ori_in_workflow = empty($this->in_workflow) ? false : true;
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     $record_id = parent::save($check_notify);
     $override_email = [];
     if (!empty($this->email1_set_in_workflow)) {
         $override_email['emailAddress0'] = $this->email1_set_in_workflow;
     }
     if (!empty($this->email2_set_in_workflow)) {
         $override_email['emailAddress1'] = $this->email2_set_in_workflow;
     }
     if (!isset($this->in_workflow)) {
         $this->in_workflow = false;
     }
     if ($ori_in_workflow === false || !empty($override_email)) {
         $this->emailAddress->saveForBean($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     }
     return $record_id;
 }
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:32,代碼來源:Company.php

示例2: save

 /**
  * @see parent::save()
  *
  * @param bool $check_notify
  *
  * @return string
  */
 public function save($check_notify = false)
 {
     //If we are saving due to relationship changes, don't bother trying to update the emails
     if (!empty($GLOBALS['resavingRelatedBeans'])) {
         parent::save($check_notify);
         return $this->id;
     }
     $this->add_address_streets('primary_address_street');
     $this->add_address_streets('alt_address_street');
     $ori_in_workflow = empty($this->in_workflow) ? false : true;
     $this->emailAddress->handleLegacySave($this, $this->module_dir);
     // bug #39188 - store emails state before workflow make any changes
     $this->emailAddress->stash($this->id, $this->module_dir);
     parent::save($check_notify);
     // $this->emailAddress->evaluateWorkflowChanges($this->id, $this->module_dir);
     $override_email = [];
     if (!empty($this->email1_set_in_workflow)) {
         $override_email['emailAddress0'] = $this->email1_set_in_workflow;
     }
     if (!empty($this->email2_set_in_workflow)) {
         $override_email['emailAddress1'] = $this->email2_set_in_workflow;
     }
     if (!isset($this->in_workflow)) {
         $this->in_workflow = false;
     }
     if ($ori_in_workflow === false || !empty($override_email)) {
         $this->emailAddress->saveForBean($this->id, $this->module_dir, $override_email, '', '', '', '', $this->in_workflow);
     }
     return $this->id;
 }
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:37,代碼來源:Person.php


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