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