Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions controller/argument_value_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ in order to be recognized. This is done via the
creating and registering custom argument value resolvers, you can extend this
functionality.

.. tip::

A custom ``ParamConverter`` can also create the object for a type-hinted class.
This functionality is similar to an ``ArgumentResolver``. However
``ParamConverter`` are executed first and usually use request parameters to
create the object.

See :ref:`ParamConverter <https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html#creating-a-converter>`
for more information.

Functionality Shipped with the HttpKernel
-----------------------------------------

Expand Down Expand Up @@ -87,7 +97,9 @@ retrieved from the token storage::
namespace AppBundle\ArgumentResolver;

use AppBundle\Entity\User;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;

class UserValueResolver implements ArgumentValueResolverInterface
Expand Down