本文整理匯總了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;
}
}