mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
Simplify enum usage in docs
This commit is contained in:
committed by
Fabien Potencier
parent
709fc6abce
commit
7556fe1c6f
@@ -13,7 +13,7 @@
|
||||
{{ enum('App\\MyEnum').SomeCase.value }}
|
||||
|
||||
{# get all cases of an enum #}
|
||||
{% enum('App\\MyEnum').cases() %}
|
||||
{% enum('App\\MyEnum').cases %}
|
||||
|
||||
{# call any methods of the enum class #}
|
||||
{% enum('App\\MyEnum').someMethod() %}
|
||||
|
||||
Reference in New Issue
Block a user