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


PHP CRM_Core_SelectValues::addressProvider方法代碼示例

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


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

示例1: preProcess

 public function preProcess()
 {
     CRM_Utils_System::setTitle(ts('Settings - Addresses'));
     // Address Standardization
     $addrProviders = array('' => '- select -') + CRM_Core_SelectValues::addressProvider();
     $this->_varNames = array(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME => array('address_options' => array('html_type' => 'checkboxes', 'title' => ts('Address Fields'), 'weight' => 1), 'address_format' => array('html_type' => 'textarea', 'title' => ts('Display Format'), 'description' => NULL, 'weight' => 2), 'mailing_format' => array('html_type' => 'textarea', 'title' => ts('Mailing Label Format'), 'description' => NULL, 'weight' => 3)), CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME => array('address_standardization_provider' => array('html_type' => 'select', 'title' => ts('Provider'), 'option_values' => $addrProviders, 'weight' => 4), 'address_standardization_userid' => array('html_type' => 'text', 'title' => ts('User ID'), 'description' => NULL, 'weight' => 5), 'address_standardization_url' => array('html_type' => 'text', 'title' => ts('Web Service URL'), 'description' => NULL, 'weight' => 6)));
     parent::preProcess();
 }
開發者ID:nganivet,項目名稱:civicrm-core,代碼行數:8,代碼來源:Address.php

示例2: buildQuickForm

 /**
  * Function to build the form
  *
  * @return void
  * @access public
  */
 public function buildQuickForm()
 {
     $this->applyFilter('__ALL__', 'trim');
     // Address Standardization
     $addrProviders = CRM_Core_SelectValues::addressProvider();
     $this->addElement('select', 'address_standardization_provider', ts('Address Provider'), array('' => '- select -') + $addrProviders);
     $this->addFormRule(array('CRM_Admin_Form_Preferences_Address', 'formRule'));
     //get the tokens for Mailing Label field
     $tokens = CRM_Core_SelectValues::contactTokens();
     natcasesort($tokens);
     $this->assign('tokens', json_encode($tokens));
     $this->add('select', 'token1', ts('Insert Token'), $tokens, FALSE, array('size' => "5", 'multiple' => TRUE, 'onclick' => "return tokenReplText(this);"));
     parent::buildQuickForm();
 }
開發者ID:archcidburnziso,項目名稱:civicrm-core,代碼行數:20,代碼來源:Address.php


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