当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_BAO_Address::addressSequence方法代码示例

本文整理汇总了PHP中CRM_Core_BAO_Address::addressSequence方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_Address::addressSequence方法的具体用法?PHP CRM_Core_BAO_Address::addressSequence怎么用?PHP CRM_Core_BAO_Address::addressSequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_BAO_Address的用法示例。


在下文中一共展示了CRM_Core_BAO_Address::addressSequence方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: preProcess

 /**
  * Call preprocess.
  */
 public function preProcess()
 {
     parent::preProcess();
     $this->_locBlockNo = CRM_Utils_Request::retrieve('locno', 'Positive', $this, TRUE, NULL, $_REQUEST);
     $this->assign('blockId', $this->_locBlockNo);
     $addressSequence = CRM_Core_BAO_Address::addressSequence();
     $this->assign('addressSequence', $addressSequence);
     $this->_values = array();
     $this->_addressId = CRM_Utils_Request::retrieve('aid', 'Positive', $this, FALSE, NULL, $_REQUEST);
     $this->_action = CRM_Core_Action::ADD;
     if ($this->_addressId) {
         $params = array('id' => $this->_addressId);
         $address = CRM_Core_BAO_Address::getValues($params, FALSE, 'id');
         $this->_values['address'][$this->_locBlockNo] = array_pop($address);
         $this->_action = CRM_Core_Action::UPDATE;
     } else {
         $this->_addressId = 0;
     }
     $this->assign('action', $this->_action);
     $this->assign('addressId', $this->_addressId);
     // parse street address, CRM-5450
     $this->_parseStreetAddress = $this->get('parseStreetAddress');
     if (!isset($this->_parseStreetAddress)) {
         $addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_options');
         $this->_parseStreetAddress = FALSE;
         if (!empty($addressOptions['street_address']) && !empty($addressOptions['street_address_parsing'])) {
             $this->_parseStreetAddress = TRUE;
         }
         $this->set('parseStreetAddress', $this->_parseStreetAddress);
     }
     $this->assign('parseStreetAddress', $this->_parseStreetAddress);
 }
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:35,代码来源:Address.php

示例2: preProcess

 /** 
  * Function to set variables up before form is built 
  *                                                           
  * @return void 
  */
 function preProcess(&$form)
 {
     $form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String', CRM_Core_DAO::$_nullObject);
     $additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive', CRM_Core_DAO::$_nullObject);
     $form->assign("addBlock", false);
     if ($form->_addBlockName && $additionalblockCount) {
         $form->assign("addBlock", true);
         $form->assign("blockName", $form->_addBlockName);
         $form->assign("blockId", $additionalblockCount);
         $form->set($form->_addBlockName . "_Block_Count", $additionalblockCount);
     }
     $className = CRM_Utils_System::getClassName($form);
     if (in_array($className, array('CRM_Event_Form_ManageEvent_Location', 'CRM_Contact_Form_Domain'))) {
         $form->_blocks = array('Address' => ts('Address'), 'Email' => ts('Email'), 'Phone' => ts('Phone'));
     }
     $form->assign('blocks', $form->_blocks);
     $form->assign('className', $className);
     // get address sequence.
     if (!($addressSequence = $form->get('addressSequence'))) {
         require_once 'CRM/Core/BAO/Address.php';
         $addressSequence = CRM_Core_BAO_Address::addressSequence();
         $form->set('addressSequence', $addressSequence);
     }
     $form->assign('addressSequence', $addressSequence);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:30,代码来源:Location.php

示例3: preProcess

 /**
  * Set variables up before form is built.
  *
  * @param CRM_Core_Form $form
  *
  * @return void
  */
 public static function preProcess(&$form)
 {
     $form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String', CRM_Core_DAO::$_nullObject);
     $additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive', CRM_Core_DAO::$_nullObject);
     $form->assign('addBlock', FALSE);
     if ($form->_addBlockName && $additionalblockCount) {
         $form->assign('addBlock', TRUE);
         $form->assign('blockName', $form->_addBlockName);
         $form->assign('blockId', $additionalblockCount);
         $form->set($form->_addBlockName . '_Block_Count', $additionalblockCount);
     }
     if (is_a($form, 'CRM_Event_Form_ManageEvent_Location') || is_a($form, 'CRM_Contact_Form_Domain')) {
         $form->_blocks = array('Address' => ts('Address'), 'Email' => ts('Email'), 'Phone' => ts('Phone'));
     }
     $form->assign('blocks', $form->_blocks);
     $form->assign('className', CRM_Utils_System::getClassName($form));
     // get address sequence.
     if (!($addressSequence = $form->get('addressSequence'))) {
         $addressSequence = CRM_Core_BAO_Address::addressSequence();
         $form->set('addressSequence', $addressSequence);
     }
     $form->assign('addressSequence', $addressSequence);
 }
开发者ID:kidaa30,项目名称:yes,代码行数:30,代码来源:Location.php


注:本文中的CRM_Core_BAO_Address::addressSequence方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。