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

Allow modules to easily register reports, payprocs, and searches

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: CiviCRM API, Core CiviCRM
    • Labels:
      None

      Description

      The extensions system currently allows one to create an extension which is either a single report-template, a single payment processor types, a single custom-search, or a module. However, it is hard to package together several related bits – e.g. a payment processor which also uses hooks, or a set of related reports.

      To resolve this, we will make it easy for any module – Civi module, Drupal module, etc – to register report-templates, payment-processor types, and custom-searches via hook. Module authors will be responsible for declaring any metadata that goes along with their classes – but inserting, updating, deactivating, and deleting metadata from the DB will be handled automatically.

      Major pieces of this puzzle:

      • Add APIs for CRUD'ing report-templates, payment-processor types, and custom-searches
      • Add mechanism to determine which modules are enabled, disabled, or uninstalled
      • Add hook_civicrm_managed which accepts API data structures for declaring managed objects. A managed object is one that is automatically inserted, updated, deactivated, deleted based on its module's status.
      • Add table civicrm_managed for tracking which objects are managed – and which modules own them
      • e.g. civicrm_managed(module varchar, name varchar, entity_type varchar, entity_id int)
        *Every time the cache is cleared, call hook_civicrm_managed and reconcile the list of managed objects.
      • A coding convention in civix for using these pieces

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 2 days, 7 hours
                2d 7h