CRM_Contribute_WorkflowMessage_ContributionTrait
Table of Contents
Properties
- $contribution : array<string|int, mixed>|null
- The contribution.
- $contributionID : int
- $financialTrxn : array<string|int, mixed>|null
- Optional financial transaction (payment).
- $financialTrxnID : int
- $isShowLineItems : bool
- Should line items be displayed for the contribution.
- $isShowLineSubtotal : bool
- Is it a good idea to show the line item subtotal.
- $isShowTax : bool
- Is the site configured such that tax should be displayed.
- $lineItems : array<string|int, mixed>
- Line items associated with the contribution.
- $taxRateBreakdown : array<string|int, mixed>
- Tax rates paid.
- $order : CRM_Financial_BAO_Order
Methods
- getContribution() : array<string|int, mixed>|null
- getContributionID() : int|null
- getFinancialTrxnID() : int|null
- getIsShowLineItems() : bool
- Get bool for whether a line item breakdown be displayed.
- getIsShowLineSubtotal() : bool
- Is it a good idea to show the line item subtotal.
- getLineItems() : array<string|int, mixed>
- Get the line items.
- getTaxRateBreakdown() : array<string|int, mixed>
- Get the line items.
- setContribution() : $this
- Set contribution object.
- setContributionID() : $this
- setFinancialTrxn() : $this
- Set contribution object.
- setFinancialTrxnID() : $this
- setOrder() : $this
- Set order object.
- exportExtraTokenContext() : void
- Specify any tokens that should be exported as smarty variables.
- exportExtraTplParams() : void
- Extra variables to be exported to smarty based on being calculated.
- getOrder() : CRM_Financial_BAO_Order|null
- Get order, if available.
Properties
$contribution
The contribution.
public
array<string|int, mixed>|null
$contribution
Tags
$contributionID
public
int
$contributionID
Tags
$financialTrxn
Optional financial transaction (payment).
public
array<string|int, mixed>|null
$financialTrxn
Tags
$financialTrxnID
public
int
$financialTrxnID
Tags
$isShowLineItems
Should line items be displayed for the contribution.
public
bool
$isShowLineItems
This determination is based on whether the price set is quick config.
Tags
$isShowLineSubtotal
Is it a good idea to show the line item subtotal.
public
bool
$isShowLineSubtotal
This would be true if at least one line has a quantity > 1. Otherwise it is very repetitive.
Tags
$isShowTax
Is the site configured such that tax should be displayed.
public
bool
$isShowTax
$lineItems
Line items associated with the contribution.
public
array<string|int, mixed>
$lineItems
Tags
$taxRateBreakdown
Tax rates paid.
public
array<string|int, mixed>
$taxRateBreakdown
Generally this would look like
['10.00%' => 100]
To indicate that $100 was changed for 10% tax.
Tags
$order
private
CRM_Financial_BAO_Order
$order
Methods
getContribution()
public
getContribution() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetContributionID()
public
getContributionID() : int|null
Return values
int|nullgetFinancialTrxnID()
public
getFinancialTrxnID() : int|null
Return values
int|nullgetIsShowLineItems()
Get bool for whether a line item breakdown be displayed.
public
getIsShowLineItems() : bool
Tags
Return values
boolgetIsShowLineSubtotal()
Is it a good idea to show the line item subtotal.
public
getIsShowLineSubtotal() : bool
This would be true if at least one line has a quantity > 1. Otherwise it is very repetitive.
Tags
Return values
boolgetLineItems()
Get the line items.
public
getLineItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTaxRateBreakdown()
Get the line items.
public
getTaxRateBreakdown() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>setContribution()
Set contribution object.
public
setContribution(array<string|int, mixed> $contribution) : $this
Parameters
- $contribution : array<string|int, mixed>
Return values
$thissetContributionID()
public
setContributionID([int|null $contributionID = ]) : $this
Parameters
- $contributionID : int|null =
Return values
$thissetFinancialTrxn()
Set contribution object.
public
setFinancialTrxn(array<string|int, mixed> $financialTrxn) : $this
Parameters
- $financialTrxn : array<string|int, mixed>
Return values
$thissetFinancialTrxnID()
public
setFinancialTrxnID([int|null $financialTrxnID = ]) : $this
Parameters
- $financialTrxnID : int|null =
Return values
$thissetOrder()
Set order object.
public
setOrder(CRM_Financial_BAO_Order $order) : $this
Note this is only supported for core use (specifically in example work flow) as the contract might change.
Parameters
- $order : CRM_Financial_BAO_Order
Return values
$thisexportExtraTokenContext()
Specify any tokens that should be exported as smarty variables.
protected
exportExtraTokenContext(array<string|int, mixed> &$export) : void
Parameters
- $export : array<string|int, mixed>
exportExtraTplParams()
Extra variables to be exported to smarty based on being calculated.
protected
exportExtraTplParams(array<string|int, mixed> &$export) : void
We export isShowTax to denote whether invoicing is enabled but hopefully at some point we will separate the assumption that invoicing and tax are a package.
Parameters
- $export : array<string|int, mixed>
Tags
getOrder()
Get order, if available.
private
getOrder() : CRM_Financial_BAO_Order|null
The order is used within the class to calculate line items etc.