src/Flowcode/ShopBundle/Controller/AdminProductController.php
/**
     * Displays a form to edit an existing Media entity.
     *
     * @Route("/{product}/media/{id}/{type}/edit", name="admin_product_media_edit")
     * @Method("GET")
     * @Template("FlowcodeShopBundle:AdminProduct:media_edit.html.twig")
     */
Displays a form to edit an existing Media entity.
Displays a form to edit an existing Media entity .
public function editMediaAction(Product $product, Media $entity, $type, Request $request)
    {
        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Media entity.');
        }
        $editForm = $this->mediaCreateEditForm($entity, $product, $type);
        return array(
            'entity' => $entity,
            'type' => $type,
            'product' => $product,
            'edit_form' => $editForm->createView(),
        );
    }
public function editMediaAction ( Product $ product , Media $ entity , $ type , Request $ request ) { if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Media entity.' ) ; } $ editForm = $ this -> mediaCreateEditForm ( $ entity , $ product , $ type ) ; return array ( 'entity' => $ entity , 'type' => $ type , 'product' => $ product , 'edit_form' => $ editForm -> createView ( ) , ) ; }
Displays a form to edit an existing Media entity.
Displays a form to edit an existing Media entity .