Pārlūkot izejas kodu

Email erreur de paiement

feature/tableau_edition_avancee
Guillaume pirms 4 gadiem
vecāks
revīzija
a2ebf4a9bc
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. +4
    -1
      ShopBundle/Twig/FrontendTwigExtension.php

+ 4
- 1
ShopBundle/Twig/FrontendTwigExtension.php Parādīt failu

@@ -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;
}


Notiek ielāde…
Atcelt
Saglabāt