本文整理匯總了PHP中CRM_Contribute_BAO_Query::softCreditReturnProperties方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Contribute_BAO_Query::softCreditReturnProperties方法的具體用法?PHP CRM_Contribute_BAO_Query::softCreditReturnProperties怎麽用?PHP CRM_Contribute_BAO_Query::softCreditReturnProperties使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Contribute_BAO_Query
的用法示例。
在下文中一共展示了CRM_Contribute_BAO_Query::softCreditReturnProperties方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exportComponents
//.........這裏部分代碼省略.........
}
}
if ($primary) {
$returnProperties['location_type'] = 1;
$returnProperties['im_provider'] = 1;
$returnProperties['phone_type_id'] = 1;
$returnProperties['provider_id'] = 1;
$returnProperties['current_employer'] = 1;
}
$extraReturnProperties = array();
$paymentFields = FALSE;
switch ($queryMode) {
case CRM_Contact_BAO_Query::MODE_EVENT:
$paymentFields = TRUE;
$paymentTableId = 'participant_id';
break;
case CRM_Contact_BAO_Query::MODE_MEMBER:
$paymentFields = TRUE;
$paymentTableId = 'membership_id';
break;
case CRM_Contact_BAO_Query::MODE_PLEDGE:
$extraReturnProperties = CRM_Pledge_BAO_Query::extraReturnProperties($queryMode);
$paymentFields = TRUE;
$paymentTableId = 'pledge_payment_id';
break;
case CRM_Contact_BAO_Query::MODE_CASE:
$extraReturnProperties = CRM_Case_BAO_Query::extraReturnProperties($queryMode);
break;
}
if ($queryMode != CRM_Contact_BAO_Query::MODE_CONTACTS) {
$componentReturnProperties = CRM_Contact_BAO_Query::defaultReturnProperties($queryMode);
if ($queryMode == CRM_Contact_BAO_Query::MODE_CONTRIBUTE) {
// soft credit columns are not automatically populated, because contribution search doesn't require them by default
$componentReturnProperties = array_merge($componentReturnProperties, CRM_Contribute_BAO_Query::softCreditReturnProperties(TRUE));
}
$returnProperties = array_merge($returnProperties, $componentReturnProperties);
if (!empty($extraReturnProperties)) {
$returnProperties = array_merge($returnProperties, $extraReturnProperties);
}
// unset non exportable fields for components
$nonExpoFields = array('groups', 'tags', 'notes', 'contribution_status_id', 'pledge_status_id', 'pledge_payment_status_id');
foreach ($nonExpoFields as $value) {
unset($returnProperties[$value]);
}
}
}
if ($mergeSameAddress) {
//make sure the addressee fields are selected
//while using merge same address feature
$returnProperties['addressee'] = 1;
$returnProperties['postal_greeting'] = 1;
$returnProperties['email_greeting'] = 1;
$returnProperties['street_name'] = 1;
$returnProperties['household_name'] = 1;
$returnProperties['street_address'] = 1;
$returnProperties['city'] = 1;
$returnProperties['state_province'] = 1;
// some columns are required for assistance incase they are not already present
$exportParams['merge_same_address']['temp_columns'] = array();
$tempColumns = array('id', 'master_id', 'state_province_id', 'postal_greeting_id', 'addressee_id');
foreach ($tempColumns as $column) {
if (!array_key_exists($column, $returnProperties)) {
$returnProperties[$column] = 1;
$column = $column == 'id' ? 'civicrm_primary_id' : $column;
$exportParams['merge_same_address']['temp_columns'][$column] = 1;
}