-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fixes for 2.3 branch #4956
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
Fixes for 2.3 branch #4956
Changes from all commits
607d555
c515be0
5f6f0aa
e10196a
7d4ce2e
47bf36b
3586879
587a5b3
bc295ac
e2d205d
2a35ea0
f283a68
9c0af75
3d0a63a
a8f9633
40223ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,8 @@ user sees on the form (e.g. ``Male``). | |
.. code-block:: php | ||
|
||
$builder->add('gender', 'choice', array( | ||
'choices' => array('m' => 'Male', 'f' => 'Female'), | ||
'required' => false, | ||
'choices' => array('m' => 'Male', 'f' => 'Female'), | ||
'required' => false, | ||
)); | ||
|
||
By setting ``multiple`` to true, you can allow the user to choose multiple | ||
|
@@ -62,12 +62,12 @@ of checkboxes depending on the ``expanded`` option: | |
.. code-block:: php | ||
|
||
$builder->add('availability', 'choice', array( | ||
'choices' => array( | ||
'choices' => array( | ||
'morning' => 'Morning', | ||
'afternoon' => 'Afternoon', | ||
'evening' => 'Evening', | ||
), | ||
'multiple' => true, | ||
'multiple' => true, | ||
)); | ||
|
||
You can also use the ``choice_list`` option, which takes an object that can | ||
|
@@ -86,11 +86,11 @@ choices | |
**type**: ``array`` **default**: ``array()`` | ||
|
||
This is the most basic way to specify the choices that should be used | ||
by this field. The ``choices`` option is an array, where the array key | ||
by this field. The ``choices`` option is an ``array``, where the array key | ||
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. same here |
||
is the item value and the array value is the item's label:: | ||
|
||
$builder->add('gender', 'choice', array( | ||
'choices' => array('m' => 'Male', 'f' => 'Female') | ||
'choices' => array('m' => 'Male', 'f' => 'Female'), | ||
)); | ||
|
||
.. tip:: | ||
|
@@ -111,7 +111,7 @@ The ``choice_list`` option must be an instance of the ``ChoiceListInterface``. | |
For more advanced cases, a custom class that implements the interface | ||
can be created to supply the choices. | ||
|
||
With this option you can also allow float values to be selected as data. | ||
With this option you can also allow ``float`` values to be selected as data. | ||
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. and here ... |
||
|
||
.. code-block:: php | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ option. The easiest way to use the option is as follows:: | |
|
||
$builder->add('users', 'entity', array( | ||
'class' => 'AcmeHelloBundle:User', | ||
'query_builder' => function(EntityRepository $er) { | ||
'query_builder' => function (EntityRepository $er) { | ||
return $er->createQueryBuilder('u') | ||
->orderBy('u.username', 'ASC'); | ||
}, | ||
|
@@ -131,7 +131,7 @@ This is a property path (e.g. ``author.name``) used to organize the | |
available choices in groups. It only works when rendered as a select tag | ||
and does so by adding ``optgroup`` elements around options. Choices that do not | ||
return a value for this property path are rendered directly under the | ||
select tag, without a surrounding optgroup. | ||
``select`` tag, without a surrounding ``optgroup``. | ||
|
||
property | ||
~~~~~~~~ | ||
|
@@ -140,7 +140,7 @@ property | |
|
||
This is the property that should be used for displaying the entities | ||
as text in the HTML element. If left blank, the entity object will be | ||
cast into a string and so must have a ``__toString()`` method. | ||
cast into a ``string`` and so must have a ``__toString()`` method. | ||
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. an all other places where you used types (I'll stop commenting on them now) |
||
|
||
.. note:: | ||
|
||
|
@@ -159,11 +159,11 @@ cast into a string and so must have a ``__toString()`` method. | |
query_builder | ||
~~~~~~~~~~~~~ | ||
|
||
**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure | ||
**type**: ``Doctrine\ORM\QueryBuilder`` or a ``Closure`` | ||
|
||
If specified, this is used to query the subset of options (and their | ||
order) that should be used for the field. The value of this option can | ||
either be a ``QueryBuilder`` object or a Closure. If using a Closure, | ||
either be a ``QueryBuilder`` object or a ``Closure``. If using a ``Closure``, | ||
it should take a single argument, which is the ``EntityRepository`` of | ||
the entity. | ||
|
||
|
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.
boolean is just a name (I would love to make it lowercase).
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.
see #4671 :)
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.
it should not be in backticks here. It is about the English adjective in this sentence