<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
*
* @access public
*
+ * @param $form
+ *
* @return void
*/
static function buildPremium(&$form) {
*
* @access public
*
+ * @param $form
+ *
* @return void
*/
static function buildAdditionalDetail(&$form) {
*
* @access public
*
- * @return void
+ * @param $form
*
+ * @return void
*/
static function buildPaymentReminders(&$form) {
//PaymentReminders section
*
* @access public
*
+ * @param $params
+ * @param $contributionID
+ * @param null $premiumID
+ * @param null $options
* @return void
*/
static function processPremium(&$params, $contributionID, $premiumID = NULL, &$options = NULL) {
*
* @access public
*
+ * @param $params
+ * @param $contactID
+ * @param $contributionID
+ * @param null $contributionNoteID
+ *
* @return void
*/
static function processNote(&$params, $contactID, $contributionID, $contributionNoteID = NULL) {
*
* @access public
*
+ * @param $params
+ * @param $formatted
+ * @param $form
* @return void
*/
static function postProcessCommon(&$params, &$formatted, &$form) {
*
* @form object of Contribution form.
*
- * @param array $params (reference ) an assoc array of name/value pairs.
+ * @param $form
+ * @param array $params (reference ) an assoc array of name/value pairs.
* @$ccContribution boolen, is it credit card contribution.
+ * @param bool $ccContribution
* @access public.
*
- * @return void.
+ * @return array
*/
static function emailReceipt(&$form, &$params, $ccContribution = FALSE) {
$form->assign('receiptType', 'contribution');
}
// retrieve individual prefix value for honoree
- if (!empty($params['hidden_Honoree'])) {
- $individualPrefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
- $honor = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'honor_type_id');
- $params['honor_prefix'] = CRM_Utils_Array::value(CRM_Utils_Array::value('honor_prefix_id',
- $params
- ),
- $individualPrefix
- );
- $params["honor_type"] = CRM_Utils_Array::value(CRM_Utils_Array::value('honor_type_id',
- $params
- ),
- $honor
- );
+ if (isset($params['soft_credit'])) {
+ $softCreditTypes = $softCredits = array();
+ foreach ($params['soft_credit'] as $key => $softCredit) {
+ $softCredits[$key] = array(
+ 'Name' => $softCredit['contact_name'],
+ 'Amount' => CRM_Utils_Money::format($softCredit['amount'], $softCredit['currency'])
+ );
+ $softCreditTypes[$key] = $softCredit['soft_credit_type_label'];
+ }
+ $form->assign('softCreditTypes', $softCreditTypes);
+ $form->assign('softCredits', $softCredits);
}
// retrieve premium product name and assigned fulfilled