* soft contribution of object that is added
*/
public static function add(&$params) {
+ $hook = empty($params['id']) ? 'create' : 'edit';
+ CRM_Utils_Hook::pre($hook, 'ContributionSoft', CRM_Utils_Array::value('id', $params), $params);
+
$contributionSoft = new CRM_Contribute_DAO_ContributionSoft();
$contributionSoft->copyValues($params);
$config = CRM_Core_Config::singleton();
$contributionSoft->currency = $config->defaultCurrency;
}
- return $contributionSoft->save();
+ $result = $contributionSoft->save();
+ CRM_Utils_Hook::post($hook, 'ContributionSoft', $contributionSoft->id, $contributionSoft);
+ return $result;
}
/**