src/Flowcode/ShopBundle/Controller/AdminProductController.php
/**
     * Displays a form to edit an existing GalleryItem entity.
     *
     * @Route("/{product}/galleryitem/{id}/edit", name="admin_product_gallery_edit")
     * @Method("GET")
     * @Template("FlowcodeShopBundle:AdminProduct:gallery_edit_item.html.twig")
     */
Displays a form to edit an existing GalleryItem entity.
Displays a form to edit an existing GalleryItem entity .
public function editGalleryItemAction(GalleryItem $entity, Product $product, Request $request)
    {
        if (!$entity) {
            throw $this->createNotFoundException('Unable to find GalleryItem entity.');
        }
        $editForm = $this->createEditGalleryItemForm($entity, $product);
        $deleteForm = $this->createDeleteGalleryItemForm($entity->getId());
        return array(
            'entity' => $entity,
            'product' => $product,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function editGalleryItemAction ( GalleryItem $ entity , Product $ product , Request $ request ) { if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find GalleryItem entity.' ) ; } $ editForm = $ this -> createEditGalleryItemForm ( $ entity , $ product ) ; $ deleteForm = $ this -> createDeleteGalleryItemForm ( $ entity -> getId ( ) ) ; return array ( 'entity' => $ entity , 'product' => $ product , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
Displays a form to edit an existing GalleryItem entity.
Displays a form to edit an existing GalleryItem entity .