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


PHP CRM_Pledge_BAO_Pledge::exportableFields方法代碼示例

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


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

示例1:

 /**
  * @return array
  */
 public static function &getFields()
 {
     $fields = CRM_Pledge_BAO_Pledge::exportableFields();
     return $fields;
 }
開發者ID:utkarshsharma,項目名稱:civicrm-core,代碼行數:8,代碼來源:Query.php

示例2: getFields

 /**
  * Get pledge fields.
  *
  * @param bool $checkPermission
  *
  * @return array
  */
 public static function getFields($checkPermission = TRUE)
 {
     return CRM_Pledge_BAO_Pledge::exportableFields($checkPermission);
 }
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:11,代碼來源:Query.php

示例3:

 static function &getFields()
 {
     require_once 'CRM/Pledge/BAO/Pledge.php';
     $fields = CRM_Pledge_BAO_Pledge::exportableFields();
     return $fields;
 }
開發者ID:ksecor,項目名稱:civicrm,代碼行數:6,代碼來源:Query.php

示例4: buildMappingForm

 /**
  * Build the mapping form.
  *
  * @param CRM_Core_Form $form
  * @param string $mappingType
  *   (Export/Import/Search Builder).
  * @param int $mappingId
  * @param int $columnNo
  * @param int $blockCount
  *   (no of blocks shown).
  * @param NULL $exportMode
  *
  * @return void
  */
 public static function buildMappingForm(&$form, $mappingType = 'Export', $mappingId = NULL, $columnNo, $blockCount = 3, $exportMode = NULL)
 {
     if ($mappingType == 'Export') {
         $name = "Map";
         $columnCount = array('1' => $columnNo);
     } elseif ($mappingType == 'Search Builder') {
         $name = "Builder";
         $columnCount = $columnNo;
     }
     //get the saved mapping details
     if ($mappingType == 'Export') {
         $form->applyFilter('saveMappingName', 'trim');
         //to save the current mappings
         if (!isset($mappingId)) {
             $saveDetailsName = ts('Save this field mapping');
             $form->add('text', 'saveMappingName', ts('Name'));
             $form->add('text', 'saveMappingDesc', ts('Description'));
         } else {
             $form->assign('loadedMapping', $mappingId);
             $params = array('id' => $mappingId);
             $temp = array();
             $mappingDetails = CRM_Core_BAO_Mapping::retrieve($params, $temp);
             $form->assign('savedName', $mappingDetails->name);
             $form->add('hidden', 'mappingId', $mappingId);
             $form->addElement('checkbox', 'updateMapping', ts('Update this field mapping'), NULL);
             $saveDetailsName = ts('Save as a new field mapping');
             $form->add('text', 'saveMappingName', ts('Name'));
             $form->add('text', 'saveMappingDesc', ts('Description'));
         }
         $form->addElement('checkbox', 'saveMapping', $saveDetailsName, NULL, array('onclick' => "showSaveDetails(this)"));
         $form->addFormRule(array('CRM_Export_Form_Map', 'formRule'), $form->get('mappingTypeId'));
     } elseif ($mappingType == 'Search Builder') {
         $form->addElement('submit', 'addBlock', ts('Also include contacts where'), array('class' => 'submit-link'));
     }
     $defaults = array();
     $hasLocationTypes = array();
     $hasRelationTypes = array();
     $fields = array();
     if ($mappingType == 'Export') {
         $required = TRUE;
     } elseif ($mappingType == 'Search Builder') {
         $required = FALSE;
     }
     $contactType = array('Individual', 'Household', 'Organization');
     foreach ($contactType as $value) {
         $contactFields = CRM_Contact_BAO_Contact::exportableFields($value, FALSE, $required);
         $contactFields = array_merge($contactFields, CRM_Contact_BAO_Query_Hook::singleton()->getFields());
         // exclude the address options disabled in the Address Settings
         $fields[$value] = CRM_Core_BAO_Address::validateAddressOptions($contactFields);
         ksort($fields[$value]);
         if ($mappingType == 'Export') {
             $relationships = array();
             $relationshipTypes = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, $value);
             asort($relationshipTypes);
             foreach ($relationshipTypes as $key => $var) {
                 list($type) = explode('_', $key);
                 $relationships[$key]['title'] = $var;
                 $relationships[$key]['headerPattern'] = '/' . preg_quote($var, '/') . '/';
                 $relationships[$key]['export'] = TRUE;
                 $relationships[$key]['relationship_type_id'] = $type;
                 $relationships[$key]['related'] = TRUE;
                 $relationships[$key]['hasRelationType'] = 1;
             }
             if (!empty($relationships)) {
                 $fields[$value] = array_merge($fields[$value], array('related' => array('title' => ts('- related contact info -'))), $relationships);
             }
         }
     }
     //get the current employer for mapping.
     if ($required) {
         $fields['Individual']['current_employer']['title'] = ts('Current Employer');
     }
     // add component fields
     $compArray = array();
     //we need to unset groups, tags, notes for component export
     if ($exportMode != CRM_Export_Form_Select::CONTACT_EXPORT) {
         foreach (array('groups', 'tags', 'notes') as $value) {
             unset($fields['Individual'][$value]);
             unset($fields['Household'][$value]);
             unset($fields['Organization'][$value]);
         }
     }
     if ($mappingType == 'Search Builder') {
         //build the common contact fields array.
         $fields['Contact'] = array();
         foreach ($fields['Individual'] as $key => $value) {
//.........這裏部分代碼省略.........
開發者ID:riyadennis,項目名稱:my_civicrm,代碼行數:101,代碼來源:Mapping.php

示例5:

 /**
  * Get pledge fields.
  *
  * @param bool $checkPermission
  *
  * @return array
  */
 public static function &getFields($checkPermission = TRUE)
 {
     $fields = CRM_Pledge_BAO_Pledge::exportableFields($checkPermission);
     return $fields;
 }
開發者ID:konadave,項目名稱:civicrm-core,代碼行數:12,代碼來源:Query.php


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