瀏覽代碼

Email erreur de paiement

feature/tableau_edition_avancee
Guillaume 4 年之前
父節點
當前提交
a2ebf4a9bc
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. +4
    -1
      ShopBundle/Twig/FrontendTwigExtension.php

+ 4
- 1
ShopBundle/Twig/FrontendTwigExtension.php 查看文件

@@ -58,6 +58,7 @@ class FrontendTwigExtension extends AbstractExtension
new TwigFunction('get_form_newsletter', [$this, 'getFormNewsletter']),
new TwigFunction('get_merchants', [$this, 'getMerchants']),
new TwigFunction('get_file_manager_folder', [$this, 'getFileManagerFolder']),
new TwigFilter('lc_format_price', [$this, 'formatPrice']),
);
}

@@ -91,10 +92,12 @@ class FrontendTwigExtension extends AbstractExtension
return $form->createView();
}

public function formatPrice($price)
public function formatPrice($price, $unbreakableSpace = true)
{
$price = number_format($price, 2, ',', ' ');
$price = $price . ' €';
$price .= $unbreakableSpace ? ' ' : ' ' ;
$price .= '€' ;
return $price;
}


Loading…
取消
儲存