Data decorating and Symfony2 -



Data decorating and Symfony2 -

abstract question. there "data decorator" bundle symfony2? or how solve elegantly info localization/formatting problems?

for example:

float - decimals formatting, monetary info needs monetary formatting integers - formatting - 1'000'000 vs 1.000.000 dates, times etc

i know symfony1 had kind decorating going on in templates suit exactly. wasn't perfect, though , arised other problems.

anybody knows, there something? or "correct" way solving problem?

your question stands vague , answers can considered opinion-based, you're aware native php functions you're asking for, right?

float, integer formatting: number_format date/time formatting: datetime class , subsequent format functions

twig uses equivalent functions accomplish you're asking for: number_format , date filters.

this right standard - , although have literally no experience symfony1, haven't had issue deploying dozen symfony2 projects using these 2 functions accomplish info decorating desire.

symfony2

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -