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

        $formType = $admin->getForm();

        $form = $this->createForm(
            $formType,
            $entity,
            [
                'action' => $this->getAdminRoutingHelper()->generateUrl($admin, 'create'),
                'method' => 'POST',
            ]
        );
        $form->add(
            'submit',
            SubmitType::class,
            [
                'label' => $translator->trans('crud.create.action', [], 'ShuweeAdminBundle'),
                'attr' => ['class' => 'btn-success'],
            ]
        );

        return $form;
    }
private function getCreateForm(AbstractAdmin $admin, $entity)
    {
        $translator = $this->getTranslator();

        $formType = $admin->getForm();

        $form = $this->createForm(
            $formType,
            $entity,
            [
                'action' => $this->getAdminRoutingHelper()->generateUrl($admin, 'create'),
                'method' => 'POST',
            ]
        );
        $form->add(
            'submit',
            SubmitType::class,
            [
                'label' => $translator->trans('crud.create.action', [], 'ShuweeAdminBundle'),
                'attr' => ['class' => 'btn-success'],
            ]
        );

        return $form;
    }
private function getCreateForm ( AbstractAdmin $ admin , $ entity ) { $ translator = $ this -> getTranslator ( ) ; $ formType = $ admin -> getForm ( ) ; $ form = $ this -> createForm ( $ formType , $ entity , [ 'action' => $ this -> getAdminRoutingHelper ( ) -> generateUrl ( $ admin , 'create' ) , 'method' => 'POST' , ] ) ; $ form -> add ( 'submit' , SubmitType :: class , [ 'label' => $ translator -> trans ( 'crud.create.action' , [ ] , 'ShuweeAdminBundle' ) , 'attr' => [ 'class' => 'btn-success' ] , ] ) ; return $ form ; }
Get form to create a new entity.

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

@return \Symfony\Component\Form\Form
Get form to create a new entity .