/** * GET /media/images/products/{id} * @return \Nohex\Eix\Core\Responses\Http\Image */ protected function httpGetForImage() { $response = new \Nohex\Eix\Core\Responses\Http\Image($this->getRequest()); $id = $this->getRequest()->getParameter('id'); try { $image = ProductImages::getInstance()->findEntity($id); $response->setFileName($image->location); } catch (NotFoundException $exception) { $response->setFileName('../static/images/unknown-product.png'); } return $response; }
protected function getFactory() { return ProductImages::getInstance(); }