Implement filtering functionality
This commit is contained in:
parent
d0feff7d74
commit
e52753446b
3 changed files with 77 additions and 2 deletions
31
src/Form/OfferFilterFormType.php
Normal file
31
src/Form/OfferFilterFormType.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class OfferFilterFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('zipCode', TextType::class, [
|
||||
'label' => 'ZIP',
|
||||
])
|
||||
->add('distance', NumberType::class, [
|
||||
'label' => 'Distance',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
// Configure your form options here
|
||||
]);
|
||||
}
|
||||
}
|
Reference in a new issue