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
Post a Comment