本文整理匯總了PHP中CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm方法的具體用法?PHP CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm怎麽用?PHP CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Contact_BAO_Contact_Utils
的用法示例。
在下文中一共展示了CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildQuickForm
/**
* Function to actually build the form
*
* @return void
* @access public
*/
public function buildQuickForm()
{
$params = array();
$params['id'] = $params['contact_id'] = $this->_contactId;
$contact = CRM_Contact_BAO_Contact::retrieve($params, $this->_defaults);
$countryID = '';
$stateID = '';
if (!empty($this->_defaults['address'][1])) {
$countryID = CRM_Utils_Array::value('country_id', $this->_defaults['address'][1]);
$stateID = CRM_Utils_Array::value('state_province_id', $this->_defaults['address'][1]);
}
CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm($this, $this->_contactType, $countryID, $stateID, 'Contact Information', TRUE);
$this->addButtons(array(array('type' => 'next', 'name' => ts('Save'), 'isDefault' => TRUE), array('type' => 'cancel', 'name' => ts('Cancel'))));
}
示例2: buildOnBehalfOrganization
/**
* build elements to enable pay on behalf of an organization.
*
* @access public
*/
function buildOnBehalfOrganization()
{
if ($this->_membershipContactID) {
require_once 'CRM/Core/BAO/Location.php';
$entityBlock = array('contact_id' => $this->_membershipContactID);
CRM_Core_BAO_Location::getValues($entityBlock, $this->_defaults);
}
require_once 'CRM/Contact/BAO/Contact/Utils.php';
if ($this->_values['is_for_organization'] != 2) {
$attributes = array('onclick' => "return showHideByValue('is_for_organization','true','for_organization','block','radio',false);");
$this->addElement('checkbox', 'is_for_organization', $this->_values['for_organization'], null, $attributes);
} else {
$this->addElement('hidden', 'is_for_organization', true);
}
$this->assign('is_for_organization', true);
CRM_Contact_BAO_Contact_Utils::buildOnBehalfForm($this, 'Organization', null, null, 'Organization Details');
}