* function & breaking it down into manageable chunks. Eventually it will be refactored into something else
* Note we send directly from this function in some cases because it is only partly refactored
* Don't call this function directly as the signature will change
+ *
+ * @param $values
+ * @param $input
+ * @param $template CRM_Core_SMARTY
+ * @param bool $recur
+ * @param bool $returnMessageText
+ *
+ * @return mixed
*/
function _assignMessageVariablesToTemplate(&$values, $input, &$template, $recur = FALSE, $returnMessageText = True) {
$template->assign('first_name', $this->_relatedObjects['contact']->first_name);
if (!empty($values['lineItem']) && !empty($this->_relatedObjects['membership'])) {
$template->assign('useForMember', true);
}
- //assign honor infomation to receiptmessage
+ //assign honor information to receipt message
$softRecord = CRM_Contribute_BAO_ContributionSoft::getSoftContribution($this->id);
if (isset($softRecord['soft_credit'])) {
* @param array $params contribution object, line item array and params for trxn
*
*
- * @param null $financialTrxnVals
+ * @param array $financialTrxnValues
*
* @return null|object
* @access public
* @static
*/
- static function recordFinancialAccounts(&$params, $financialTrxnVals = NULL) {
- $skipRecords = $update = FALSE;
- // in few scenarios we require the trxn record details which has got created
- $return = NULL;
+ static function recordFinancialAccounts(&$params, $financialTrxnValues = NULL) {
+ $skipRecords = $update = $return = FALSE;
+
$additionalParticipantId = array();
$contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
}
// consider external values passed for recording transaction entry
- if (!empty($financialTrxnVals)) {
- $trxnParams = array_merge($trxnParams, $financialTrxnVals);
+ if (!empty($financialTrxnValues)) {
+ $trxnParams = array_merge($trxnParams, $financialTrxnValues);
}
$params['trxnParams'] = $trxnParams;
* @access public
* @static
*/
- static function add(&$params, &$ids) {
+ static function add(&$params, $ids = array()) {
$oldStatus = $oldType = NULL;
if (!empty($ids['membership'])) {
CRM_Utils_Hook::pre('edit', 'Membership', $ids['membership'], $params);
* @access public
*/
static function updateAllMembershipStatus() {
- require_once 'api/api.php';
//get all active statuses of membership, CRM-3984
$allStatus = CRM_Member_PseudoConstant::membershipStatus();
$statusLabels = CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label');
$allTypes = CRM_Member_PseudoConstant::membershipType();
- $contribStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
// get only memberships with active membership types
$query = "
* @param array $params array of submitted params
* @param array $ids (param in process of being removed - try to use params) array of ids
*
- * @return void
+ * @return CRM_Contribute_BAO_Contribution
* @static
*/
static function recordMembershipContribution( &$params, $ids = array()) {