← All projects
TwigBooster
handy Twig extensions for Symfony
TwigBooster is a Symfony bundle with Twig extensions. Among other things it gives you PHP enums right in your templates — get an enum case and call its methods without passing them in from the controller.
What it does
- enum() — a PHP enum case in a Twig template.
- enum_cases() — all cases of an enum, e.g. for lists and selects.
- Used in the templates of the laserovsky.net blog.
Getting started
$ composer require starxen/twigboosterCode on GitLab →