Merge pull request #23741 from ufundo/entitybatchcurrency
[civicrm-core.git] / CRM / Contribute / Page / AJAX.php
CommitLineData
dfe9afbf 1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
dfe9afbf 5 | |
bc77d7c0
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
dfe9afbf 9 +--------------------------------------------------------------------+
10 */
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
dfe9afbf 16 */
17
18/**
19 * This class contains all the function that are called using AJAX (jQuery)
20 */
21class CRM_Contribute_Page_AJAX {
1330f57a 22
dfe9afbf 23 /**
24 * Get Soft credit to list in DT
25 */
26 public static function getSoftContributionRows() {
be2fb01f 27 $requiredParameters = [
dfe9afbf 28 'cid' => 'Integer',
29 'context' => 'String',
be2fb01f
CW
30 ];
31 $optionalParameters = [
dfe9afbf 32 'entityID' => 'Integer',
33 'isTest' => 'Integer',
be2fb01f 34 ];
dfe9afbf 35
36 $params = CRM_Core_Page_AJAX::defaultSortAndPagerParams();
37 $params += CRM_Core_Page_AJAX::validateParams($requiredParameters, $optionalParameters);
38
39 $softCreditList = CRM_Contribute_BAO_ContributionSoft::getSoftContributionSelector($params);
dfe9afbf 40 CRM_Utils_JSON::output($softCreditList);
41 }
42
43}