当前位置: 首页>>代码示例>>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;未经允许,请勿转载。