@@ -634,17 +634,18 @@ let you find out which options are defined::
634634 }
635635 }
636636
637- Nested Option
638- ~~~~~~~~~~~~~
637+ Nested Options
638+ ~~~~~~~~~~~~~~
639639
640640.. versionadded :: 4.2
641- This feature was introduced in Symfony 4.2.
641+ The support of nested options was introduced in Symfony 4.2.
642642
643643Suppose you have an option named ``spool `` which has two sub-options ``type ``
644- and ``path ``. Instead of defining it as a simple array of values, you can pass
645- a closure as the default value of the ``spool `` option with a :class: `Symfony\\ Component\\ OptionsResolver\\ OptionsResolver `
646- argument. Based on this instance, you can define the options under ``spool `` and its desired default
647- value::
644+ and ``path ``. Instead of defining it as a simple array of values, you can pass a
645+ closure as the default value of the ``spool `` option with a
646+ :class: `Symfony\\ Component\\ OptionsResolver\\ OptionsResolver ` argument. Based on
647+ this instance, you can define the options under ``spool `` and its desired
648+ default value::
648649
649650 class Mailer
650651 {
@@ -676,11 +677,10 @@ value::
676677 ),
677678 ));
678679
679- Also you can define required options, validation (type, value) and normalization of these
680- nested options.
681-
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 for access to them::
680+ Nested options also support required options, validation (type, value) and
681+ normalization of their values. If the default value of a nested option depends
682+ on another option defined in the parent level, add a second ``Options `` argument
683+ to the closure to access to them::
684684
685685 class Mailer
686686 {
@@ -700,10 +700,11 @@ adds a second ``Options`` argument to the closure for access to them::
700700
701701.. caution ::
702702
703- The arguments of the closure must be type hinted as ``OptionsResolver `` and ``Options `` respectively.
704- Otherwise, the closure itself is considered as the default value of the option.
703+ The arguments of the closure must be type hinted as ``OptionsResolver `` and
704+ ``Options `` respectively. Otherwise, the closure itself is considered as the
705+ default value of the option.
705706
706- In same way, parent options can access to the child option as normal array ::
707+ In same way, parent options can access to the nested options as normal arrays ::
707708
708709 class Mailer
709710 {
0 commit comments