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