本文整理汇总了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');
}