From 829ef1ba727fe1bc26f9e48d57d289474cac845e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrew=20Marcinkevi=C4=8Dius?= Date: Wed, 25 Mar 2015 14:38:34 +0200 Subject: [PATCH 1/3] Fix formatting --- reference/forms/types/checkbox.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index eeddb8031de..bf33c55189d 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -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 From 99e4d3788709f4be596888996bcd9606ecbe555f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrew=20Marcinkevi=C4=8Dius?= Date: Wed, 25 Mar 2015 14:40:14 +0200 Subject: [PATCH 2/3] Fix formatting --- reference/forms/types/choice.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index a5757116817..d271f5ec59c 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -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 @@ -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:: From 2324ea55fb5c55ba7076b8c99f3fee5399709ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrew=20Marcinkevi=C4=8Dius?= Date: Wed, 25 Mar 2015 14:41:07 +0200 Subject: [PATCH 3/3] Fix formatting --- reference/forms/types/entity.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 16cf2dc0a16..ddead19b901 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -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'); },