CheckboxField.php 605 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Symfony\Component\Form;
  3. /*
  4. * This file is part of the Symfony framework.
  5. *
  6. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. /**
  12. * A checkbox field for selecting boolean values.
  13. *
  14. * @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
  15. */
  16. class CheckboxField extends ToggleField
  17. {
  18. /**
  19. * {@inheritDoc}
  20. */
  21. protected function configure()
  22. {
  23. $this->addOption('value', '1');
  24. parent::configure();
  25. }
  26. }