Download the PHP package jdecool/twig-constant-accessor-bundle without Composer
On this page you can find all versions of the php package jdecool/twig-constant-accessor-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jdecool/twig-constant-accessor-bundle
More information about jdecool/twig-constant-accessor-bundle
Files in jdecool/twig-constant-accessor-bundle
Package twig-constant-accessor-bundle
Short Description Simplify access of your class constants in Twig
License MIT
Homepage http://github.com/jdecool/TwigConstantAccessorBundle
Informations about the package twig-constant-accessor-bundle
TwigConstantAccessorBundle
This bundle simplify access of your enum values or class constants in Twig.
Install it
Install extension using composer:
If you don't use Symfony Flex, you have to enabled the bundle in your config/bundles.php
configuration:
Register the class you want to access constant in your configuration file :
You can also register a class in your container configuration using the twig.constant_accessor
tag :
Or you can use the #[AsTwigConstantAccessor]
attribute on your class :
After you can access your class constant in your templates :
All versions of twig-constant-accessor-bundle with dependencies
symfony/dependency-injection Version ^5.4|^6.0|^7.0
symfony/framework-bundle Version ^5.4|^6.0|^7.0
symfony/twig-bundle Version ^5.4|^6.0|^7.0
twig/twig Version ^2.4|^3.0