Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18697

Make it possible to add new ExportFormats via extensions

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      If you want to add an export format for financial batches, you have to patch core CiviCRM atm, because of these code fragments:

      I have a patch that removes the need to adapt these files if you want to add a new export format; I will create a PR in a moment.

      If this patch is applied, you can create new export formats in an extension, by doing the following:

      • Create a new class in the extension that inherits from ExportFormat, and implements generateExportQuery, makeExport, and getFileExtension. And optionally output.
      • Implement civicrm_hook_buildForm to add the export format to the CRM_Financial_Form_Export form
      • Create a custom template templates/CRM/Financial/Form/Search.tpl so that it shows your Export format.

      It is a first try, maybe more simplifications are possible.

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              johanv Johan Vervloet
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h