/** * render a post read * * @param Post $post * @return Response */ private function renderPost(Post $post) { $response = $this->createResponse(); $response->setETag('post_' . $post->getIdentifier()); $response->setLastModified($post->getModified()); //response $request = $this->container->get('request'); if ($response->isNotModified($request)) { return $response; } //only render on not modified return $this->render($this->container->getParameter('madoqua.view.scripts.postread'), array('post' => $post), $response); //render post:read }