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