Guesses the template name to render and its variables and adds them to
the request object.
public onKernelController ( |
||
$event | A FilterControllerEvent instance |
/** * Guesses the template name to render and its variables and adds them to * the request object. * * @param FilterControllerEvent $event */ public function onKernelController(FilterControllerEvent $event) { $request = $event->getRequest(); if ($configuration = $request->attributes->get('_view')) { $request->attributes->set('_template', $configuration); } parent::onKernelController($event); }
/** * Guesses the template name to render and its variables and adds them to * the request object. * * @param FilterControllerEvent $event */ public function onKernelController(FilterControllerEvent $event) { $request = $event->getRequest(); if (!$request->attributes->get(FOSRestBundle::ZONE_ATTRIBUTE, true)) { return; } if ($configuration = $request->attributes->get('_view')) { $request->attributes->set('_template', $configuration); } parent::onKernelController($event); }