src/Eccube/Form/Type/Master/SexType.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of EC-CUBE
  4. *
  5. * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6. *
  7. * http://www.ec-cube.co.jp/
  8. *
  9. * For the full copyright and license information, please view the LICENSE
  10. * file that was distributed with this source code.
  11. */
  12. namespace Eccube\Form\Type\Master;
  13. use Eccube\Form\Type\MasterType;
  14. use Symfony\Component\Form\AbstractType;
  15. use Symfony\Component\Form\FormBuilderInterface;
  16. use Symfony\Component\OptionsResolver\OptionsResolver;
  17. class SexType extends AbstractType
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function buildForm(FormBuilderInterface $builder, array $options)
  23. {
  24. $options['sex_options']['required'] = $options['required'];
  25. }
  26. public function configureOptions(OptionsResolver $resolver)
  27. {
  28. $resolver->setDefaults([
  29. 'class' => 'Eccube\Entity\Master\Sex',
  30. 'expanded' => true,
  31. 'placeholder' => false,
  32. ]);
  33. }
  34. public function getParent()
  35. {
  36. return MasterType::class;
  37. }
  38. public function getBlockPrefix()
  39. {
  40. return 'sex';
  41. }
  42. }