I'm working on a Symfony 3.4 project, and I need to add a requirement on my route like :
/**
* @Route("/{_locale}", defaults={"_locale"="en"}, requirements={
* "_locale"="en|fr"
* })
*/
public function homepageAction($_locale)
{
// ...
}
You can see "_locale"="en|fr", my problem is I need to get en and fr from a constant class not directly in the annotation.
So something like "_locale"="MY_FIRST_CONSTANTE|MY_SECOND_CONSTANTE"
I'm struggling with the syntax.
Thanks !