Merge pull request #23701 from eileenmcnaughton/unused
[civicrm-core.git] / CRM / Contribute / WorkflowMessage / RecurringCancelled.php
1 <?php
2
3 /**
4 * @support template-only
5 */
6 class CRM_Contribute_WorkflowMessage_RecurringCancelled extends Civi\WorkflowMessage\GenericWorkflowMessage {
7 use CRM_Contribute_WorkflowMessage_RecurringTrait;
8
9 public const WORKFLOW = 'contribution_recurring_cancelled';
10
11 /**
12 * The recurring contribution contact.
13 *
14 * @var array|null
15 *
16 * @scope tokenContext
17 *
18 * @required
19 */
20 public $contact;
21
22 /**
23 * Export tokens to smarty as variables.
24 *
25 * The key represents the smarty token and the value is the token as
26 * requested from the token processor.
27 *
28 * The token is 'the entire part between the curly quotes' eg.
29 *
30 * '{contribution_recur.amount|crmMoney}.
31 *
32 * Unlike using the contribution directly it will default to 'raw' formatting.
33 *
34 * @param array $export
35 */
36 protected function exportExtraTokenContext(array &$export): void {
37 $export['smartyTokenAlias']['amount'] = 'contribution_recur.amount|crmMoney';
38 $export['smartyTokenAlias']['recur_frequency_unit'] = 'contribution_recur.frequency_unit:label';
39 $export['smartyTokenAlias']['recur_frequency_interval'] = 'contribution_recur.frequency_interval';
40 }
41
42 }