@@ -197,7 +197,8 @@ Use the ``methods`` option to restrict the verbs each route should respond to:
197
197
HTML forms only support ``GET `` and ``POST `` methods. If you're calling a
198
198
route with a different method from an HTML form, add a hidden field called
199
199
``_method `` with the method to use (e.g. ``<input type="hidden" name="_method" value="PUT" /> ``).
200
- If you use :doc: `Symfony forms </forms >` this is done automatically for you.
200
+ If you create your forms with :doc: `Symfony Forms </forms >` this is done
201
+ automatically for you.
201
202
202
203
Debugging Routes
203
204
~~~~~~~~~~~~~~~~
@@ -229,15 +230,15 @@ route details:
229
230
230
231
$ php bin/console debug:router app_lucky_number
231
232
232
- +-------------+---------------------------------------------------------+
233
- | Property | Value |
234
- +-------------+---------------------------------------------------------+
235
- | Route Name | app_lucky_number |
236
- | Path | /lucky/number/{max} |
237
- | ... | ... |
238
- | Options | compiler_class: Symfony\Component\Routing\RouteCompiler |
239
- | | utf8: true |
240
- +-------------+---------------------------------------------------------+
233
+ +-------------+---------------------------------------------------------+
234
+ | Property | Value |
235
+ +-------------+---------------------------------------------------------+
236
+ | Route Name | app_lucky_number |
237
+ | Path | /lucky/number/{max} |
238
+ | ... | ... |
239
+ | Options | compiler_class: Symfony\Component\Routing\RouteCompiler |
240
+ | | utf8: true |
241
+ +-------------+---------------------------------------------------------+
241
242
242
243
The other command is called ``router:match `` and it shows which route will match
243
244
the given URL. It's useful to find out why some URL is not executing the
@@ -594,8 +595,8 @@ Now, when the user visits ``/blog``, the ``blog_list`` route will match and
594
595
595
596
.. caution ::
596
597
597
- You can have more than one optional placeholder (e.g. ``/blog/{slug}/{page} ``),
598
- but everything after an optional placeholder must be optional. For example,
598
+ You can have more than one optional parameter (e.g. ``/blog/{slug}/{page} ``),
599
+ but everything after an optional parameter must be optional. For example,
599
600
``/{page}/blog `` is a valid path, but ``page `` will always be required
600
601
(i.e. ``/blog `` will not match this route).
601
602
@@ -675,7 +676,7 @@ parameter:
675
676
676
677
.. tip ::
677
678
678
- To give a ``null `` default value to any placeholder , add nothing after the
679
+ To give a ``null `` default value to any parameter , add nothing after the
679
680
``? `` character (e.g. ``/blog/{page?} ``).
680
681
681
682
.. _routing-expression_parameters :
@@ -763,6 +764,7 @@ where you can use any of these variables created by Symfony:
763
764
``context ``
764
765
An instance of :class: `Symfony\\ Component\\ Routing\\ RequestContext `,
765
766
which holds the most fundamental information about the route being matched.
767
+
766
768
``request ``
767
769
The :ref: `Symfony Request <component-http-foundation-request >` object that
768
770
represents the current request.
@@ -1067,7 +1069,7 @@ A possible solution is to change the parameter requirements to be more permissiv
1067
1069
1068
1070
.. note ::
1069
1071
1070
- If the route defines several placeholders and you apply this permissive
1072
+ If the route defines several parameter and you apply this permissive
1071
1073
regular expression to all of them, the results won't be the expected. For
1072
1074
example, if the route definition is ``/share/{path}/{token} `` and both
1073
1075
``path `` and ``token `` accept ``/ ``, then ``path `` will contain its contents
@@ -2034,7 +2036,7 @@ This information can be configured per command too::
2034
2036
}
2035
2037
2036
2038
Checking if a Route Exists
2037
- --------------------------
2039
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2038
2040
2039
2041
In highly dynamic applications, it may be necessary to check whether a route
2040
2042
exists before using it to generate a URL. In those cases, don't use the
0 commit comments