* @Route("/product/{slug}", name="product")
*/
public function product(Product $product)
{
if (ProductHidden::HIDDEN_NO != $product->getHidden()) {
throw $this->createNotFoundException();
}
// $form3d = $this->createFormBuilder(null, ['attr'=>['id'=>'form_3d']])
// ->setAction($this->generateUrl('design_3d_new', ['product'=>$product->getId()]))
// ->add('json', HiddenType::class)
// ->getForm();
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
No log messages
NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Not Found at vendor/symfony/framework-bundle/Controller/ControllerTrait.php:294 at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createNotFoundException() (vendor/sfe/core-bundle/src/Controller/ProductController.php:74) at Sfe\CoreBundle\Controller\ProductController->product() (vendor/symfony/http-kernel/HttpKernel.php:158) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:80) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:25) |