Explorar el Código

Email erreur de paiement

feature/tableau_edition_avancee
Guillaume hace 4 años
padre
commit
a2ebf4a9bc
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. +4
    -1
      ShopBundle/Twig/FrontendTwigExtension.php

+ 4
- 1
ShopBundle/Twig/FrontendTwigExtension.php Ver fichero

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


Cargando…
Cancelar
Guardar