src/Form/Type/Frontend/BudgetType.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Form\Type\Frontend;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\TextType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. class BudgetType extends AbstractType
  7. {
  8.     public function buildForm(FormBuilderInterface $builder, array $options): void
  9.     {
  10.         $builder
  11.             ->add('min'TextType::class, [
  12.                 'label' => 'frontend.search.form.budget.min',
  13.                 'attr' => [
  14.                     'class' => 'small range min',
  15.                     // 'placeholder' => '1000 €',
  16.                     'data-field' => 'budgetMin',
  17.                 ],
  18.             ])
  19.             ->add('max'TextType::class, [
  20.                 'label' => 'frontend.search.form.budget.max',
  21.                 'attr' => [
  22.                     'class' => 'small range max',
  23.                     // 'placeholder' => '10000 €',
  24.                     'data-field' => 'budgetMax',
  25.                 ],
  26.             ])
  27.         ;
  28.     }
  29.     public function getBlockPrefix()
  30.     {
  31.         return 'budget';
  32.     }
  33. }