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

add hooks to extend the API from extension

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Need
      1) being able to extend the behaviour of an existing api from an extension
      (eg. record an activity when the api mailing.event_bounce is called)
      2) being able to replace the default behaviour of an api

      Implementation (as discussed with Tim) with two new hooks:

      CRM_Utils_Hook::apiRoutes($routes)
      $route = array (entity,action,version)=>functiontocall)

      To replace the default function called

      and CRM_Utils_Hook::apiWrapper to register to wrapper

      each wrapper is a class that implements fromApiInput and toApiOutput

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              xavier xavier dutoit
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: