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


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怎麽用?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'))));
 }
開發者ID:archcidburnziso,項目名稱:civicrm-core,代碼行數:20,代碼來源:RelatedContact.php

示例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');
 }
開發者ID:hampelm,項目名稱:Ginsberg-CiviDemo,代碼行數:22,代碼來源:Main.php


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