Merge pull request #23764 from eileenmcnaughton/activity_update_mutli
[civicrm-core.git] / CRM / Contribute / WorkflowMessage / RecurringCancelled.php
CommitLineData
e589a77b
EM
1<?php
2
3/**
4 * @support template-only
5 */
6class 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
1c75b02d
EM
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 */
e589a77b 36 protected function exportExtraTokenContext(array &$export): void {
1c75b02d 37 $export['smartyTokenAlias']['amount'] = 'contribution_recur.amount|crmMoney';
e589a77b
EM
38 $export['smartyTokenAlias']['recur_frequency_unit'] = 'contribution_recur.frequency_unit:label';
39 $export['smartyTokenAlias']['recur_frequency_interval'] = 'contribution_recur.frequency_interval';
40 }
41
42}