You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #1977 [Doc] Minor syntax fixes in the Twig component docs (javiereguiluz)
This PR was merged into the 2.x branch.
Discussion
----------
[Doc] Minor syntax fixes in the Twig component docs
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Issues | -
| License | MIT
Commits
-------
1efbcbd [Doc] Minor syntax fixes in the Twig component docs
Copy file name to clipboardExpand all lines: src/TwigComponent/doc/index.rst
+11-8
Original file line number
Diff line number
Diff line change
@@ -483,17 +483,20 @@ component use a ``PreMount`` hook::
483
483
484
484
.. note::
485
485
486
-
In its default configuration, the OptionsResolver treats all props.
487
-
However, if more props are passed than the options defined in the OptionsResolver, an error will be prompted, indicating that one or more options do not exist.
488
-
To avoid this, use the `ignoreUndefined()` method with `true`. See `ignore not defined options`_ for more info.
486
+
In its default configuration, the OptionsResolver treats all props.
487
+
However, if more props are passed than the options defined in the OptionsResolver,
488
+
an error will be prompted, indicating that one or more options do not exist.
489
+
To avoid this, use the ``ignoreUndefined()`` method with ``true``.
490
+
See `ignore not defined options`_ for more info::
489
491
490
-
$resolver->setIgnoreUndefined(true);
492
+
$resolver->setIgnoreUndefined(true);
491
493
492
-
The major drawback of this configuration is that the OptionsResolver will remove every non-defined option when resolving data.
493
-
To maintain props that have not been defined within the OptionsResolver, combine the data from the hook with the resolved data.
494
+
The major drawback of this configuration is that the OptionsResolver will
495
+
remove every non-defined option when resolving data. To maintain props that
496
+
have not been defined within the OptionsResolver, combine the data from the
497
+
hook with the resolved data::
494
498
495
-
return $resolver->resolve($data) + $data;
496
-
499
+
return $resolver->resolve($data) + $data;
497
500
498
501
The data returned from ``preMount()`` will be used as the props for mounting.
0 commit comments