Jérémy Decool 9/28/2016

Accèdez facilement à vos constantes Twig avec TwigConstantAccessorBundle

Read Original

L'article explique comment accéder aux constantes de classe PHP dans les templates Twig avec Symfony. Il compare les méthodes traditionnelles (fonction `constant`, configuration globale) et présente un bundle dédié, TwigConstantAccessorBundle, qui automatise cette tâche en exposant les constantes via une simple configuration YAML.

Accèdez facilement à vos constantes Twig avec TwigConstantAccessorBundle

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

2
Designing Design Systems
TkDodo Dominik Dorfmeister 2 votes
4
Fragments Dec 11
Martin Fowler 1 votes
5
Adding Type Hints to my Blog
Daniel Feldroy 1 votes
6
Refactoring English: Month 12
Michael Lynch 1 votes
8
10
You Gotta Push If You Wanna Pull
Gunnar Morling 1 votes