/** * returns the list of fields that can be exported * * @access public * return array */ function &export($prefix = false) { if (!$GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export']) { $GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export'] = array(); $fields =& CRM_Contribute_DAO_Contribution::fields(); foreach ($fields as $name => $field) { if (CRM_Utils_Array::value('export', $field)) { if ($prefix) { $GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export']['contribution'] =& $fields[$name]; } else { $GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export'][$name] =& $fields[$name]; } } } $GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export'] = array_merge($GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export'], CRM_Contribute_DAO_ContributionType::export(true)); $GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export'] = array_merge($GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export'], CRM_Contribute_DAO_PaymentInstrument::export(true)); } return $GLOBALS['_CRM_CONTRIBUTE_DAO_CONTRIBUTION']['_export']; }