<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
Class FossildbSearchFormType extends AbstractType
{
private $router;
public function __construct(RouterInterface $router, TranslatorInterface $translator)
{
$this->router = $router;
$this->translator = $translator;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('taxanomy', TextType::class, [
'label' => $this->translator->trans('Fossielgroep'),
'required' => false
])
->add('location', TextType::class, [
'label' => $this->translator->trans('Locatie'),
'required' => false
])
->add('era', TextType::class, [
'label' => $this->translator->trans('Tijdperk'),
'required' => false
])
->add('id', IntegerType::class, [
'label' => $this->translator->trans('PaleonticaID'),
'required' => false
])
->add('user', TextType::class, [
'label' => $this->translator->trans('Gebruiker'),
'required' => false
])
->add('genus', TextType::class, [
'label' => $this->translator->trans('Genusnaam'),
'required' => false
])
->add('species', TextType::class, [
'label' => $this->translator->trans('Soortnaam'),
'required' => false
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
]);
}
}