8000 Update most important book articles to follow the best practices by wouterj · Pull Request #4427 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 15 commits into from
Nov 7, 2014
Merged
Prev Previous commit
Next Next commit
Some minor things
  • Loading branch information
wouterj committed Nov 6, 2014
commit 210bb4b365d88b2d1fc020ec2c46876f030e7e7d
45 changes: 21 additions & 24 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
}
}
Expand Down Expand Up @@ -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::

Expand Down Expand Up @@ -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
Copy link
Member

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 and Parameters) ?

Copy link
Member

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.

======= ========================
``/`` {culture} = en
``/en`` {culture} = en
``/fr`` {culture} = fr
``/es`` *won't match this route*
======= ========================

.. index::
single: Routing; Method requirement
Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

The 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::

Expand Down
0