Skip to content

Commit 35c288c

Browse files
committed
[#13980] add annotation config example
1 parent b90336b commit 35c288c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

translation/locale.rst

+22
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,28 @@ by the routing system using the special ``_locale`` parameter:
6464

6565
.. configuration-block::
6666

67+
.. code-block:: php-annotations
68+
69+
// src/AppBundle/Controller/ContactController.php
70+
namespace AppBundle\Controller;
71+
72+
// ...
73+
class ContactController extends AbstractController
74+
{
75+
/**
76+
* @Route(
77+
* "/{_locale}/contact",
78+
* name="contact",
79+
* requirements={
80+
* "_locale": "en|fr|de",
81+
* }
82+
* )
83+
*/
84+
public function contact()
85+
{
86+
}
87+
}
88+
6789
.. code-block:: yaml
6890
6991
# app/config/routing.yml

0 commit comments

Comments
 (0)