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