Commit Graph

7 Commits

Author SHA1 Message Date
Fabien Potencier e1178abfa1 Document storing an enum in a variable to avoid repeating its FQCN 2026-06-03 21:58:29 +02:00
Hugo Alliaume bcc5ffc301 Enhance enum.rst with dynamic case example 2026-01-14 22:26:11 +01:00
Hugo Alliaume def4abbd5e Improve documentation examples for enum and enum_cases
It may be obvious, but I first thought initializing an BackendEnum with a certain value could be possible with `enum(FQCN, value)`, but it does not, it always returns the first case  instance (if exists).

Instead, `enum(FQCN).from(value)` must be used, I think it's worth to improve `enum()` examples.
2025-09-12 18:14:50 +02:00
Baptiste 3889bc7b18 Fix typo in enum twig doc functions 2025-01-02 09:42:18 +01:00
Ruud Kamphuis 7556fe1c6f Simplify enum usage in docs 2024-11-21 09:11:11 +01:00
nicolas-joubert f16382ba91 [Doc] Fix enum title
Copy/Paste fix from enum_case documentation page
2024-09-30 23:05:34 +02:00
Nicolas Grekas cff6f1ca80 Implement the enum function 2024-09-27 08:23:21 +02:00