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