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


PHP Basic::populateRelatedBean方法代碼示例

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


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

示例1: populateRelatedBean

 /**
  * @see SugarBean::populateRelatedBean()
  */
 public function populateRelatedBean(SugarBean $newbean)
 {
     parent::populateRelatedBean($newbean);
     if ($newbean instanceof Company) {
         $newbean->phone_fax = $this->phone_fax;
         $newbean->phone_office = $this->phone_work;
         $newbean->phone_alternate = $this->phone_other;
         $newbean->email1 = $this->email1;
         $this->add_address_streets('primary_address_street');
         $newbean->billing_address_street = $this->primary_address_street;
         $newbean->billing_address_city = $this->primary_address_city;
         $newbean->billing_address_state = $this->primary_address_state;
         $newbean->billing_address_postalcode = $this->primary_address_postalcode;
         $newbean->billing_address_country = $this->primary_address_country;
         $this->add_address_streets('alt_address_street');
         $newbean->shipping_address_street = $this->alt_address_street;
         $newbean->shipping_address_city = $this->alt_address_city;
         $newbean->shipping_address_state = $this->alt_address_state;
         $newbean->shipping_address_postalcode = $this->alt_address_postalcode;
         $newbean->shipping_address_country = $this->alt_address_country;
     }
 }
開發者ID:omusico,項目名稱:sugar_work,代碼行數:25,代碼來源:Person.php


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