php - Using ParamConverter from a $_POST request (not from URL) -


is possible tu use @paramconverter annotation in symfony2 convert parameter send via $_post request entity?

all examples given in symfony2 documentation convert entities parameter defined in route.

setting that:

/**  * @route("/")  * @paramconverter("user", class="bvstandardservicebundle:user", options={"id" = "userid"})  */ public function useraction(user $user) { } 

if call route id in userid $_post param, results in:

unable guess how doctrine instance request information.

the paramconverter of symfony run request param url unfortunately : paramconverter specification

framework work directly url param search association between param url , paramconverter. if don't use param url, engine symfony don't search association paramconverter.

you can view kernel.event need request work : class : paramconverterlistener.php


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -