Skip to content

Fixes for 2.3 branch #5116

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 3 commits into from
Mar 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions reference/forms/types/checkbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Example Usage
.. code-block:: php

$builder->add('public', 'checkbox', array(
'label' => 'Show this entry publicly?',
'required' => false,
'label' => 'Show this entry publicly?',
'required' => false,
));

Field Options
Expand Down
10 changes: 5 additions & 5 deletions reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -90,7 +90,7 @@ by this field. The ``choices`` option is an array, where the array key
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::
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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');
},
Expand Down