We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 449dda8 commit 0e7c950Copy full SHA for 0e7c950
controller/value_resolver.rst
@@ -475,6 +475,23 @@ to your resolver and pass your custom name as its first argument::
475
// ...
476
}
477
478
+You can then pass this name as ``ValueResolver``'s first argument to pin your resolver::
479
+
480
+ // src/Controller/BookingController.php
481
+ namespace App\Controller;
482
483
+ use App\Reservation\BookingId;
484
+ use Symfony\Component\HttpFoundation\Response;
485
+ use Symfony\Component\HttpKernel\Attribute\ValueResolver;
486
487
+ class BookingController
488
+ {
489
+ public function index(#[ValueResolver('booking_id')] BookingId $id): Response
490
491
+ // ... do something with $id
492
+ }
493
494
495
.. versionadded:: 6.3
496
497
The ``controller.targeted_value_resolver`` tag and ``AsTargetedValueResolver``
0 commit comments