-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update most important book articles to follow the best practices #4427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
87b324a
0ef1c68
b735642
c8f5ad5
18e3a31
ab2e2c7
db3086d
a8a75d7
10b3c7c
4da1bcf
210bb4b
91c8981
51773f4
9678b61
e56c272
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ pattern that points to a specific PHP class and method:: | |
$article = ...; | ||
|
||
return $this->render('Blog/show.html.twig', array( | ||
'blog' => $blog, | ||
'article' => $article, | ||
)); | ||
} | ||
} | ||
|
@@ -439,15 +439,13 @@ longer required. The URL ``/blog`` will match this route and the value of | |
the ``page`` parameter will be set to ``1``. The URL ``/blog/2`` will also | ||
match, giving the ``page`` parameter a value of ``2``. Perfect. | ||
|
||
+--------------------+-------+-----------------------+ | ||
| URL | route | parameters | | ||
+====================+=======+=======================+ | ||
| /blog | blog | {page} = 1 | | ||
+--------------------+-------+-----------------------+ | ||
| /blog/1 | blog | {page} = 1 | | ||
+--------------------+-------+-----------------------+ | ||
| /blog/2 | blog | {page} = 2 | | ||
+--------------------+-------+-----------------------+ | ||
=========== ===== ========== | ||
URL route parameters | ||
=========== ===== ========== | ||
``/blog`` blog {page} = 1 | ||
``/blog/1`` blog {page} = 1 | ||
``/blog/2`` blog {page} = 2 | ||
=========== ===== ========== | ||
|
||
.. caution:: | ||
|
||
|
@@ -660,15 +658,14 @@ URL: | |
For incoming requests, the ``{culture}`` portion of the URL is matched against | ||
the regular expression ``(en|fr)``. | ||
|
||
+-----+--------------------------+ | ||
| / | {culture} = en | | ||
+-----+--------------------------+ | ||
| /en | {culture} = en | | ||
+-----+--------------------------+ | ||
| /fr | {culture} = fr | | ||
+-----+--------------------------+ | ||
| /es | *won't match this route* | | ||
+-----+--------------------------+ | ||
======= ======================== | ||
path parameters | ||
======= ======================== | ||
``/`` {culture} = en | ||
``/en`` {culture} = en | ||
``/fr`` {culture} = fr | ||
``/es`` *won't match this route* | ||
======= ======================== | ||
|
||
.. index:: | ||
single: Routing; Method requirement | ||
|
@@ -884,11 +881,11 @@ each separated by a colon: | |
|
||
For example, a ``_controller`` value of ``AppBundle:Blog:show`` means: | ||
|
||
+----------------+------------------+-------------+ | ||
| Bundle | Controller Class | Method Name | | ||
+================+==================+=============+ | ||
| AppBundle | BlogController | showAction | | ||
+----------------+------------------+-------------+ | ||
========= ================== ============== | ||
Bundle Controller Class Method Name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be consistent with table headers. We are mixing lowercased and uppercased headlines in this document.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I propose to do title caps table titles, just like normal titles. But let's do that in another PR, I don't want to mix too much stuff in here and make it a complete mess of changes. This should be mergable as soon as possible |
||
========= ================== ============== | ||
AppBundle ``BlogController`` ``showAction`` | ||
========= ================== ============== | ||
|
||
The controller might look like this:: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these table headers be title-cased (
Path
andParameters
) ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we agreed to do that in a separate pull request. #4435 should fix this.