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