src/Flowcode/ShopBundle/Controller/AdminProductController.php
/**
     * Finds and displays a Gallery entity.
     *
     * @Route("/{id}/gallery", name="admin_product_gallery_show")
     * @Method("GET")
     * @Template("FlowcodeShopBundle:AdminProduct:gallery_show.html.twig")
     */
Finds and displays a Gallery entity.
Finds and displays a Gallery entity .
public function showGalleryItemAction(Product $product)
    {
        $entity = $product->getMediaGallery();
        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Gallery entity.');
        }
        $deleteForm = $this->createDeleteForm($product->getId());
        return array(
            'entity' => $entity,
            'product' => $product,
            'delete_form' => $deleteForm->createView(),
        );
    }
public function showGalleryItemAction ( Product $ product ) { $ entity = $ product -> getMediaGallery ( ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Gallery entity.' ) ; } $ deleteForm = $ this -> createDeleteForm ( $ product -> getId ( ) ) ; return array ( 'entity' => $ entity , 'product' => $ product , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
Finds and displays a Gallery entity.
Finds and displays a Gallery entity .