Fix handling of parameters in repeattransaction
[civicrm-core.git] / CRM / Contribute / Tokens.php
CommitLineData
2045389a
TO
1<?php
2
3/*
4 +--------------------------------------------------------------------+
bc77d7c0 5 | Copyright CiviCRM LLC. All rights reserved. |
2045389a 6 | |
bc77d7c0
TO
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
2045389a
TO
10 +--------------------------------------------------------------------+
11 */
12
13/**
14 * Class CRM_Contribute_Tokens
15 *
16 * Generate "contribution.*" tokens.
17 *
18 * At time of writing, we don't have any particularly special tokens -- we just
19 * do some basic formatting based on the corresponding DB field.
20 */
17b6f179 21class CRM_Contribute_Tokens extends CRM_Core_EntityTokens {
2045389a 22
9b3cb77d 23 /**
29f2b53e
EM
24 * @return string
25 */
26 protected function getEntityAlias(): string {
27 return 'contrib_';
28 }
29
30 /**
31 * Get the entity name for api v4 calls.
32 *
33 * In practice this IS just ucfirst($this->GetEntityName)
34 * but declaring it seems more legible.
35 *
36 * @return string
9b3cb77d 37 */
29f2b53e
EM
38 protected function getApiEntityName(): string {
39 return 'Contribution';
9b3cb77d
EM
40 }
41
eba15732
EM
42 /**
43 * @return array
44 */
45 public function getCurrencyFieldName() {
46 return ['currency'];
47 }
48
2045389a 49}