src/Form/Registration/SecondaireRegistrationStudentPreRegistrationType.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Form\Registration;
  3. use App\Entity\RegistrationStudent;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. use Vich\UploaderBundle\Form\Type\VichImageType;
  7. use App\Entity\RegistrationStudentPreRegistration;
  8. use Symfony\Component\OptionsResolver\OptionsResolver;
  9. use Symfony\Component\Form\Extension\Core\Type\DateType;
  10. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  11. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  12. class SecondaireRegistrationStudentPreRegistrationType extends AbstractType
  13. {
  14.     public function buildForm(FormBuilderInterface $builder, array $options): void
  15.     {
  16.         $builder
  17.             /* ->add('is_affected', ChoiceType::class,[
  18.                 'choices' => [
  19.                     'OUI' => true,
  20.                     'NON' => false
  21.                 ]
  22.             ]) */
  23.             ->add('last_school_attended')
  24.             ->add('last_school_attended_type'ChoiceType::class,[
  25.                 'choices' => RegistrationStudent::LAST_ETS_TYPE
  26.             ])
  27.             ->add('is_redoubling'ChoiceType::class,[
  28.                 'choices' => [
  29.                     'OUI' => true,
  30.                     'NON' => false
  31.                 ]
  32.             ])
  33.             ->add('registration_number')
  34.             ->add('lv1'ChoiceType::class,[
  35.                 'choices' => RegistrationStudent::LV1
  36.             ])
  37.             ->add('lv2'ChoiceType::class,[
  38.                 'choices' => RegistrationStudent::LV2
  39.             ])
  40.             ->add('where_resides'ChoiceType::class,[
  41.                 'choices' => RegistrationStudent::WHER_RESIDE,
  42.                 'required' => true
  43.             ])
  44.             ->add('parent_status'ChoiceType::class,[
  45.                 'choices' => RegistrationStudent::PARENT_STATUS,
  46.                 'required' => true
  47.             ])
  48.             
  49.             ->add('num_cmu')
  50.             ->add('last_name')
  51.             ->add('first_name')
  52.             ->add('location')
  53.             ->add('gender'ChoiceType::class,[
  54.                 'choices' => RegistrationStudent::GENDER
  55.             ])
  56.             ->add('birth_location')
  57.             ->add('nationality')
  58.             ->add('birthday'DateType::class, [
  59.                 'widget' => 'single_text',
  60.                 'html5' => true,
  61.                 'input' => 'datetime_immutable'
  62.             ])
  63.             ->add('birth_certificate_number')
  64.             ->add('imageFile'VichImageType::class, [
  65.                 'required' => false,
  66.                 'allow_delete' => true,
  67.                 'delete_label' => 'Supprimer',
  68.                 'download_label' => '',
  69.             ])
  70.             //La famille - Pere
  71.             ->add('is_parntal_authority_father'ChoiceType::class,[
  72.                 'choices' => [
  73.                     'OUI' => true,
  74.                     'NON' => false
  75.                 ]
  76.             ])
  77.             ->add('father_last_name')
  78.             ->add('father_first_name')
  79.             ->add('father_address')
  80.             ->add('father_phone_number')
  81.             ->add('father_post')
  82.             ->add('father_location')
  83.             ->add('father_email')
  84.             //Mere
  85.             ->add('is_parntal_authority_mother'ChoiceType::class,[
  86.                 'choices' => [
  87.                     'OUI' => true,
  88.                     'NON' => false
  89.                 ]
  90.             ])
  91.             ->add('is_father_call_to_emergency')
  92.             ->add('mother_last_name')
  93.             ->add('mother_first_name')
  94.             ->add('mother_address')
  95.             ->add('mother_phone_number')
  96.             ->add('mother_post')
  97.             ->add('mother_location')
  98.             ->add('mother_email')
  99.             ->add('is_mother_call_to_emergency')
  100.             ->add('responsible_of_schooling'ChoiceType::class,[
  101.                 'choices' => RegistrationStudent::RESPONSIBLE_OF_SCHOOLING,
  102.                 'required' => true
  103.             ])
  104.             ->add('responsible_of_schooling_last_name')
  105.             ->add('responsible_of_schooling_first_name')
  106.             ->add('responsible_of_schooling_address')
  107.             ->add('responsible_of_schooling_phone_number')
  108.             ->add('responsible_of_schooling_post')
  109.             ->add('responsible_of_schooling_location')
  110.             ->add('agree_parent_engagement'CheckboxType::class,[
  111.                 'mapped' => false,
  112.                 'required' => true
  113.             ])
  114.             ->add('agree_internal_rules'CheckboxType::class,[
  115.                 'mapped' => false,
  116.                 'required' => true
  117.             ])
  118.             //->add('is_need_canteen')
  119.             ->add('is_need_transport')
  120.             //->add('is_need_keep')
  121.             ->add('is_need_extrat_activity')
  122.             ->add('accompanying_person_name')
  123.             ->add('accompanying_person_phone_number')
  124.             ->add('accompanying_person_name_2')
  125.             ->add('accompanying_person_phone_number_2')
  126.             ->add('accompanying_person_name_3')
  127.             ->add('accompanying_person_phone_number_3')
  128.             ->add('notification_phone_number')
  129.             ->add('notification_name')
  130.             ->add('notification_watsapp_number')
  131.             ->add('observation')
  132.             ->add('schoolYear')
  133.         ;
  134.     }
  135.     public function configureOptions(OptionsResolver $resolver): void
  136.     {
  137.         $resolver->setDefaults([
  138.             'data_class' => RegistrationStudentPreRegistration::class,
  139.         ]);
  140.     }
  141. }