8000 [HttpKernel] Document `#[ValueResolver]` and `#[AsTargetedValueResolver]` by MatTheCat · Pull Request #17763 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Document #[ValueResolver] and #[AsTargetedValueResolver] #17763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reword disabled resolvers paragraph
  • Loading branch information
MatTheCat committed Jun 4, 2023
commit b57df5476580bfcaf5ab4903c4545eb08a8e52b0
8 changes: 3 additions & 5 deletions controller/value_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,11 @@ that's why we can assign ``null`` as ``$session``'s default value.
We target a resolver by passing its name as ``ValueResolver``'s first argument.
For convenience, built-in resolvers' name are their FQCN.

The ``ValueResolver`` attribute can also be used to disable the targeted resolver
by passing its ``$disabled`` argument to ``true``, in which case it won't be called.
This is how :ref:`MapEntity allows to disable the EntityValueResolver
for a specific controller <doctrine-entity-value-resolver>`.
A targeted resolver can also be disabled by passing ``ValueResolver``'s ``$disabled``
argument to ``true``; this is how :ref:`MapEntity allows to disable the
EntityValueResolver for a specific controller <doctrine-entity-value-resolver>`.
Yes, ``MapEntity`` extends ``ValueResolver``!


Adding a Custom Value Resolver
------------------------------

Expand Down
0