<?php
namespace Products\NotificationsBundle\Form\Forms\Lists;
use App\Form\Forms\SearchForm;
use Products\NotificationsBundle\Model\Searching\ListSearch;
use Symfony\Component\Form\Extension\Core\Type\SearchType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
final class ListSearchForm extends SearchForm
{
protected const DATA_CLASS = ListSearch::class;
/**
* {@inheritDoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder
->add('lookup', SearchType::class, [
'required' => false,
'attr' => [
'placeholder' => 'Search lists...',
],
])
;
}
/**
* {@inheritDoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefault('search_filters_label_format', 'app.notifications.lists.filters.%s');
}
}