@@ -640,7 +640,7 @@ Nested Option
640
640
.. versionadded :: 4.2
641
641
This feature was introduced in Symfony 4.2.
642
642
643
- Suppose you want an option named ``spool `` which has two sub-options ``type ``
643
+ Suppose you have an option named ``spool `` which has two sub-options ``type ``
644
644
and ``path ``. Instead of defining it as a simple array of values, you can pass
645
645
a closure as the default value of the ``spool `` option with a :class: `Symfony\\ Component\\ OptionsResolver\\ OptionsResolver `
646
646
argument. Based on this instance, you can define the options under ``spool `` and its desired default
@@ -676,11 +676,11 @@ value::
676
676
),
677
677
));
678
678
679
- It allows you to create a nested options system with required options, validation (type, value),
680
- normalization and more .
679
+ Also you can define required options, validation (type, value) and normalization of these
680
+ nested options .
681
681
682
682
If the default value of a child option depend on another option defined in parent level,
683
- adds a second ``Options `` argument to the closure::
683
+ adds a second ``Options `` argument to the closure for access to them ::
684
684
685
685
class Mailer
686
686
{
@@ -703,7 +703,7 @@ adds a second ``Options`` argument to the closure::
703
703
The arguments of the closure must be type hinted as ``OptionsResolver `` and ``Options `` respectively.
704
704
Otherwise, the closure itself is considered as the default value of the option.
705
705
706
- In same way, parent options can access the child option as follows ::
706
+ In same way, parent options can access to the child option as normal array ::
707
707
708
708
class Mailer
709
709
{
0 commit comments