add('submit', SubmitType::class,[ "label" => "Valider", "attr" => ["class" => "btn btn-success"], ] ); $builder->add('label', TextType::class, [ "label" =>"Label", ] ); // Si masteridentity = LDAP alors on demande le filtre des utilisateurs qui appartiennent à ce groupe if($options["appMasteridentity"]=="LDAP"||$options["appSynchro"]=="LDAP2NINE") { $builder->add("fgassocldap", ChoiceType::class,[ "mapped" => false, "label" => $options["appNiveau01label"]." associé à l'annuaire ?", "choices" => ["non" => "0","oui" => "1"], ] ); $builder->add('ldapfilter', TextType::class, [ "label" => "Filtre LDAP du ".$options["appNiveau01label"], "label_attr" => ["id" => "label_group_ldapfilter"], "required" => false, ] ); } if($options["appMasteridentity"]=="SSO") { $builder->add("fgassocsso", ChoiceType::class,[ "mapped" => false, "label" => $options["appNiveau01label"]." associé à des attributs SSO ?", "choices" => ["non" => "0","oui" => "1"], ] ); $builder->add('attributes', TextareaType::class, [ "label" => "Attributs SSO du ".$options["appNiveau01label"], "label_attr" => ["id" => "label_group_attributes"], "required" => false, "attr" => ["rows" => 10] ] ); } } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'App\Entity\Niveau01', 'mode' => "string", 'appMasteridentity' => "string", "appSynchro" => "string", 'appNiveau01label' => "string" )); } }