private function getDeleteForm(AbstractAdmin $admin, $entity)
    {
        $translator = $this->getTranslator();

        return $this->createFormBuilder()
            ->setAction($this->getAdminRoutingHelper()->generateUrl($admin, 'delete', ['id' => $entity->getId()]))
            ->setMethod('DELETE')
            ->add(
                'submit',
                SubmitType::class,
                [
                    'label' => $translator->trans('crud.delete.action', [], 'ShuweeAdminBundle'),
                    'attr' => ['class' => 'btn-danger'],
                ]
            )
            ->getForm();
    }
private function getDeleteForm(AbstractAdmin $admin, $entity)
    {
        $translator = $this->getTranslator();

        return $this->createFormBuilder()
            ->setAction($this->getAdminRoutingHelper()->generateUrl($admin, 'delete', ['id' => $entity->getId()]))
            ->setMethod('DELETE')
            ->add(
                'submit',
                SubmitType::class,
                [
                    'label' => $translator->trans('crud.delete.action', [], 'ShuweeAdminBundle'),
                    'attr' => ['class' => 'btn-danger'],
                ]
            )
            ->getForm();
    }
private function getDeleteForm ( AbstractAdmin $ admin , $ entity ) { $ translator = $ this -> getTranslator ( ) ; return $ this -> createFormBuilder ( ) -> setAction ( $ this -> getAdminRoutingHelper ( ) -> generateUrl ( $ admin , 'delete' , [ 'id' => $ entity -> getId ( ) ] ) ) -> setMethod ( 'DELETE' ) -> add ( 'submit' , SubmitType :: class , [ 'label' => $ translator -> trans ( 'crud.delete.action' , [ ] , 'ShuweeAdminBundle' ) , 'attr' => [ 'class' => 'btn-danger' ] , ] ) -> getForm ( ) ; }
Get form to update an existing entity.

@param \Wanjee\Shuwee\AdminBundle\Admin\AbstractAdmin $admin
@param $entity

@return \Symfony\Component\Form\Form
Get form to update an existing entity .