Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5abcf6a

Browse filesBrowse files
committed
Minor tweaks
1 parent 44e1a3d commit 5abcf6a
Copy full SHA for 5abcf6a

File tree

1 file changed

+5
-5
lines changed
Filter options

1 file changed

+5
-5
lines changed

‎components/options_resolver.rst

Copy file name to clipboardExpand all lines: components/options_resolver.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ Nested Option
640640
.. versionadded:: 4.2
641641
This feature was introduced in Symfony 4.2.
642642

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``
644644
and ``path``. Instead of defining it as a simple array of values, you can pass
645645
a closure as the default value of the ``spool`` option with a :class:`Symfony\\Component\\OptionsResolver\\OptionsResolver`
646646
argument. Based on this instance, you can define the options under ``spool`` and its desired default
@@ -676,11 +676,11 @@ value::
676676
),
677677
));
678678

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.
681681

682682
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::
684684

685685
class Mailer
686686
{
@@ -703,7 +703,7 @@ adds a second ``Options`` argument to the closure::
703703
The arguments of the closure must be type hinted as ``OptionsResolver`` and ``Options`` respectively.
704704
Otherwise, the closure itself is considered as the default value of the option.
705705

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::
707707

708708
class Mailer
709709
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.