src/Form/Type/CheckDniType.php line 16
- <?php
- namespace App\Form\Type;
- use Symfony\Component\Form\AbstractType;
- use Symfony\Component\Form\FormBuilderInterface;
- use Symfony\Component\OptionsResolver\OptionsResolver;
- use Symfony\Component\Validator\Constraints as Assert;
- use Symfony\Component\Validator\Constraints\Positive;
- use Symfony\Component\Validator\Constraints\Callback;
- use Symfony\Component\Validator\Constraints\NotBlank;
- use Symfony\Component\Validator\Context\ExecutionContextInterface;
- use Symfony\Component\Form\Extension\Core\Type\TextType;
- use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
- use Symfony\Component\Form\Extension\Core\Type\NumberType;
- class CheckDniType extends AbstractType
- {
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder ->add('DNI', TextType::class,array(
- 'label' => false,
- 'attr' => array(
- 'placeholder' => $options['sm']->getValue('cart2.idnumber')
- )
- ));
- }
- public function configureOptions(OptionsResolver $resolver)
- {
- $resolver->setDefaults(
- [
- "opciones" => [],
- "sm" => null,
- "valores" => []
- ]);
- }
- public function getName()
- {
- return 'check_dni';
- }
- }