Skip to content

Commit

Permalink
Code comment
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Otten <totten@civicrm.org>
  • Loading branch information
eileenmcnaughton and totten authored Jan 20, 2022
1 parent 1db76b7 commit 6909100
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Civi/Token/TokenCompatSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function onRender(TokenRenderEvent $e): void {
$modifier = $tokenParts[1] ?? '';
$smartyVars[$smartyName] = \CRM_Utils_Array::pathGet($e->row->tokens, explode('.', $tokenParts[0]), $e->context['locale'] ?? NULL);
if ($smartyVars[$smartyName] instanceof \Brick\Money\Money) {
// TODO: We should reuse the filters from TokenProcessor::filterTokenValue()
if ($modifier === 'crmMoney') {
$smartyVars[$smartyName] = \Civi::format()
->money($smartyVars[$smartyName]->getAmount(), $smartyVars[$smartyName]->getCurrency());
Expand Down

0 comments on commit 6909100

Please sign in to comment.