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 7a1a3ca

Browse filesBrowse files
committed
Add documentation to use AsTaggedItem for value resolver priority/name
1 parent 52cd979 commit 7a1a3ca
Copy full SHA for 7a1a3ca

File tree

1 file changed

+14
-0
lines changed
Filter options

1 file changed

+14
-0
lines changed

‎controller/value_resolver.rst

Copy file name to clipboardExpand all lines: controller/value_resolver.rst
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,20 @@ but you can set it yourself to change its ``priority`` or ``name`` attributes.
374374

375375
.. configuration-block::
376376

377+
.. code-block:: php-attributes
378+
379+
// src/ValueResolver/BookingIdValueResolver.php
380+
namespace App\ValueResolver;
381+
382+
use Symfony\Component\DependencyInjection\Attribute\AsTaggedItem;
383+
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
384+
385+
#[AsTaggedItem(name: 'booking_id', priority: 150)]
386+
class BookingIdValueResolver implements ValueResolverInterface
387+
{
388+
// ...
389+
}
390+
377391
.. code-block:: yaml
378392
379393
# config/services.yaml

0 commit comments

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