app/Customize/Form/Type/Front/AgreementType.php line 9

Open in your IDE?
  1. <?php
  2. namespace Customize\Form\Type\Front;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. class AgreementType extends AbstractType
  7. {
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  11.     public function buildForm(FormBuilderInterface $builder, array $options)
  12.     {
  13.         $builder
  14.             ->add('agreement'CheckboxType::class, [
  15.                 'required' => false,
  16.                 'label' => '約款に同意します',
  17.                 'value' => '1',
  18.                 ]);
  19.     }
  20.     /**
  21.      * {@inheritdoc}
  22.      */
  23.     public function getBlockPrefix()
  24.     {
  25.         return 'agreement_type';
  26.     }
  27. }