/** * Finds and displays a Gallery entity. * * @Route("/show/{id}", name="admin_gallery_show") * @Method("GET") * @ParamConverter("gallery", class="AppBundle:Gallery") */ public function showAction(Gallery $gallery) { $images = $this->getDoctrine()->getRepository('AppBundle:Image')->findByGallery($gallery->getId()); return $this->render('AppBundle:Admin\\Gallery:show.html.twig', ['gallery' => $gallery, 'images' => $images]); }
/** * {@inheritDoc} */ public function getId() { if ($this->__isInitialized__ === false) { return (int) parent::getId(); } $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); return parent::getId(); }