src/Flowcode/ShopBundle/Controller/AdminProductController.php
/**
     * Creates a form to delete a Product entity by id.
     *
     * @param mixed $id The entity id
     *
     * @return Form The form
     */
Creates a form to delete a Product entity by id.
@param mixed $id The entity id

@return Form The form
Creates a form to delete a Product entity by id . @param mixed $id The entity id @return Form The form
private function createDeleteForm($id)
    {
        return $this->createFormBuilder()
            ->setAction($this->generateUrl('admin_product_delete', array('id' => $id)))
            ->setMethod('DELETE')
            ->add('submit', 'submit', array('label' => 'Delete',
                'attr' => array(
                    'onclick' => 'return confirm("Estás seguro?")'
                )))
            ->getForm();
    }
private function createDeleteForm ( $ id ) { return $ this -> createFormBuilder ( ) -> setAction ( $ this -> generateUrl ( 'admin_product_delete' , array ( 'id' => $ id ) ) ) -> setMethod ( 'DELETE' ) -> add ( 'submit' , 'submit' , array ( 'label' => 'Delete' , 'attr' => array ( 'onclick' => 'return confirm("Estás seguro?")' ) ) ) -> getForm ( ) ; }
Creates a form to delete a Product entity by id.
Creates a form to delete a Product entity by id .