8000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@89bcd82 · GitHub
[go: up one dir, main page]

Skip to content

Commit 89bcd82

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Use escaped backslashes Adding the missing attr option to the ChoiceType Update choice.rst Minor fixes in the bundles article
2 parents b23bd17 + c83e12e commit 89bcd82

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

bundles.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Creating a Bundle
6767
`SensioGeneratorBundle`_ is an optional bundle that includes commands to create
6868
different elements of your application, such as bundles. If you create lots of
6969
bundles, consider using it. However, this section creates and enables a new
70-
bundle by hand to show how simple is to do it.
70+
bundle by hand to show how simple it is to do it.
7171

7272
The new bundle is called AcmeTestBundle, where the ``Acme`` portion is just a
7373
dummy name that should be replaced by some "vendor" name that represents you or
@@ -178,4 +178,4 @@ Learn more
178178
bundles/*
179179

180180
.. _`third-party bundles`: https://github.com/search?q=topic%3Asymfony-bundle&type=Repositories
181-
.. _`SensioGeneratorBundle`: https://github.com/sensiolabs/SensioGeneratorBundle
181+
.. _`SensioGeneratorBundle`: https://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html

reference/forms/types/choice.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
3131
| options | - `empty_data`_ |
3232
| | - `error_bubbling`_ |
3333
+-------------+------------------------------------------------------------------------------+
34-
| Inherited | - `by_reference`_ |
35-
| options | - `data`_ |
34+
| Inherited | - `attr`_ |
35+
| options | - `by_reference`_ |
36+
| | - `data`_ |
3637
| | - `disabled`_ |
3738
| | - `error_mapping`_ |
3839
| | - `inherit_data`_ |
@@ -112,6 +113,7 @@ method::
112113
'choice_attr' => function($category, $key, $index) {
113114
return ['class' => 'category_'.strtolower($category->getName())];
114115
},
116+
115117
'group_by' => function($category, $key, $index) {
116118
// randomly assign things into 2 groups
117119
return rand(0, 1) == 1 ? 'Group A' : 'Group B';
@@ -340,6 +342,8 @@ Inherited Options
340342

341343
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
342344

345+
.. include:: /reference/forms/types/options/attr.rst.inc
346+
343347
.. include:: /reference/forms/types/options/by_reference.rst.inc
344348

345349
.. include:: /reference/forms/types/options/data.rst.inc

routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ Troubleshooting
689689

690690
Here are some common errors you might see while working with routing:
691691

692-
Controller "AppBundle\Controller\BlogController::showAction()" requires that you
692+
Controller "AppBundle\\Controller\\BlogController::showAction()" requires that you
693693
provide a value for the "$slug" argument.
694694

695695
This happens when your controller method has an argument (e.g. ``$slug``)::

0 commit comments

Comments
 (0)
0