Skip to content

Commit d428cf1

Browse files
committed
use .yaml instead of .yml
1 parent be83157 commit d428cf1

File tree

8 files changed

+29
-35
lines changed

8 files changed

+29
-35
lines changed

form/form_themes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ field without having to :doc:`create a custom form type </form/create_custom_fie
289289

290290
public function buildForm(FormBuilderInterface $builder, array $options)
291291
{
292-
$builder->add('name', TextType::class, array(
292+
$builder->add('name', TextType::class, [
293293
'block_prefix' => 'wrapped_text',
294-
));
294+
]);
295295
}
296296

297297
.. versionadded:: 4.3

reference/constraints/Json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ The ``Json`` constraint can be applied to a property or a "getter" method:
7878
7979
public static function loadValidatorMetadata(ClassMetadata $metadata)
8080
{
81-
$metadata->addPropertyConstraint('chapters', new Assert\Json(array(
81+
$metadata->addPropertyConstraint('chapters', new Assert\Json([
8282
'message' => 'You\'ve entered an invalid Json.',
83-
)));
83+
]));
8484
}
8585
}
8686

reference/forms/types/button.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Given this translation message:
7171

7272
.. code-block:: yaml
7373
74-
# translations/messages.en.yml
74+
# translations/messages.en.yaml
7575
form.order.submit_to_company: 'Send an order to %company%'
7676
7777
You can specify the placeholder values as follows::

reference/forms/types/options/attr_translation_parameters.rst.inc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,21 @@ Given this translation message:
1616

1717
.. code-block:: yaml
1818

19-
# translations/messages.en.yml
19+
# translations/messages.en.yaml
2020
form.order.id.placeholder: 'Enter unique identifier of the order to %company%'
2121
form.order.id.title: 'This will be the reference in communications with %company%'
2222

2323
You can specify the placeholder values as follows::
2424

25-
.. code-block:: php
26-
27-
$builder->add('id', null, array(
28-
'attr' => array(
25+
$builder->add('id', null, [
26+
'attr' => [
2927
'placeholder' => 'form.order.id.placeholder',
3028
'title' => 'form.order.id.title',
31-
),
29+
],
3230
'attr_translation_parameters' => [
33-
'%company%' => 'ACME Inc.'
31+
'%company%' => 'ACME Inc.',
3432
]
35-
));
33+
]);
3634

3735
The ``attr_translation_parameters`` option of children fields is merged with the
3836
same option of their parents, so children can reuse and/or override any of the

reference/forms/types/options/help_translation_parameters.rst.inc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@ Given this translation message:
1515

1616
.. code-block:: yaml
1717

18-
# translations/messages.en.yml
18+
# translations/messages.en.yaml
1919
form.order.id.help: 'This will be the reference in communications with %company%'
2020

2121
You can specify the placeholder values as follows::
2222

23-
.. code-block:: php
24-
25-
$builder->add('id', null, array(
23+
$builder->add('id', null, [
2624
'help' => 'form.order.id.help',
2725
'help_translation_parameters' => [
28-
'%company%' => 'ACME Inc.'
26+
'%company%' => 'ACME Inc.',
2927
]
30-
));
28+
]);
3129

3230
The ``help_translation_parameters`` option of children fields is merged with the
3331
same option of their parents, so children can reuse and/or override any of the

reference/forms/types/options/label_translation_parameters.rst.inc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@ Given this translation message:
1515

1616
.. code-block:: yaml
1717

18-
# translations/messages.en.yml
18+
# translations/messages.en.yaml
1919
form.order.id: 'Identifier of the order to %company%'
2020

2121
You can specify the placeholder values as follows::
2222

23-
.. code-block:: php
24-
25-
$builder->add('id', null, array(
23+
$builder->add('id', null, [
2624
'label' => 'form.order.id',
2725
'label_translation_parameters' => [
28-
'%company%' => 'ACME Inc.'
26+
'%company%' => 'ACME Inc.',
2927
]
30-
));
28+
]);
3129

3230
The ``label_translation_parameters`` option of children fields is merged with
3331
the same option of their parents, so children can reuse and/or override any of

reference/forms/types/reset.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,20 @@ Given this translation message:
6161

6262
.. code-block:: yaml
6363
64-
# translations/messages.en.yml
64+
# translations/messages.en.yaml
6565
form.order.reset: 'Reset an order to %company%'
6666
6767
You can specify the placeholder values as follows::
6868

6969
use Symfony\Component\Form\Extension\Core\Type\ResetType;
7070
// ...
7171

72-
$builder->add('send', ResetType::class, array(
72+
$builder->add('send', ResetType::class, [
7373
'label' => 'form.order.reset',
74-
'label_translation_parameters' => array(
74+
'label_translation_parameters' => [
7575
'%company%' => 'ACME Inc.',
76-
),
77-
));
76+
],
77+
]);
7878

7979
The ``label_translation_parameters`` option of buttons is merged with the same
8080
option of its parents, so buttons can reuse and/or override any of the parent

reference/forms/types/submit.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,20 @@ Given this translation message:
7474

7575
.. code-block:: yaml
7676
77-
# translations/messages.en.yml
77+
# translations/messages.en.yaml
7878
form.order.submit_to_company: 'Send an order to %company%'
7979
8080
You can specify the placeholder values as follows::
8181

8282
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
8383
// ...
8484

85-
$builder->add('send', SubmitType::class, array(
85+
$builder->add('send', SubmitType::class, [
8686
'label' => 'form.order.submit_to_company',
87-
'label_translation_parameters' => array(
87+
'label_translation_parameters' => [
8888
'%company%' => 'ACME Inc.',
89-
),
90-
));
89+
],
90+
]);
9191

9292
The ``label_translation_parameters`` option of buttons is merged with the same
9393
option of its parents, so buttons can reuse and/or override any of the parent

0 commit comments

Comments
 (0)