src/Form/RegisterType.php line 15
<?phpnamespace App\Form;use App\Entity\User;use Symfony\Component\Form\AbstractType;use Symfony\Component\Form\FormBuilderInterface;use Symfony\Component\Validator\Constraints\IsTrue;use Symfony\Component\OptionsResolver\OptionsResolver;use Symfony\Component\Form\Extension\Core\Type\TextType;use Symfony\Component\Form\Extension\Core\Type\EmailType;use Symfony\Component\Form\Extension\Core\Type\CheckboxType;use Symfony\Component\Form\Extension\Core\Type\PasswordType;class RegisterType extends AbstractType{/*** Fonction permettant d'avoir un minimum de config automatique* @param $label* @param $placeholder*/public function getConfig($label, $placeholder){return ['label' => $label,'attr' => ["placeholder" => $placeholder]];}public function buildForm(FormBuilderInterface $builder, array $options): void{$builder->add('denomination', TextType::class, $this->getConfig("Dénomination", "Nom de l'entreprise"))->add('contactEntreprise', TextType::class, $this->getConfig("Contact", "Contact de l'entreprise"))->add('emailEntreprise', EmailType::class, $this->getConfig("Email", "Adresse email de l'entreprise"))->add('adresse', TextType::class, $this->getConfig("Adresse", "Ex: Deux Plateaux Macaci Abidjan"))->add('nomPrenom', TextType::class, $this->getConfig("Nom & Prénom", "Nom & prénom "))->add('contactInterlocuteur', TextType::class, $this->getConfig("Contact", "Contact"))->add('fonction', TextType::class, $this->getConfig("Fonction", "Fonction"))->add('email', EmailType::class, $this->getConfig("Adresse email", "Adresse email "))->add('password', PasswordType::class, $this->getConfig("Mot de passe", "Choisissez votre mot de passe..."))->add('passwordConfirm', PasswordType::class, $this->getConfig("Confirmation de mot de passe", "Confirmation de mot de passe"))// ->add('denomination')// ->add('contactEntreprise')// ->add('emailEntreprise')// ->add('nomPrenom')// ->add('contactInterlocuteur')// ->add('fonction')// ->add('email')// ->add('password')// ->add('slug')// ->add('createdAt')// ->add('adresse')// ->add('active')// ->add('roles')// ->add('isVerified')// ->add('typesUser');}public function configureOptions(OptionsResolver $resolver): void{$resolver->setDefaults(['data_class' => User::class,]);}}