mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Chill\PersonBundle\Form;
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Chill\PersonBundle\Entity\MaritalStatus;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
|
/**
|
|
* Class MaritalStatusType
|
|
*
|
|
* @package Chill\PersonBundle\Form
|
|
*/
|
|
class MaritalStatusType extends AbstractType
|
|
{
|
|
|
|
/**
|
|
* @param FormBuilderInterface $builder
|
|
* @param array $options
|
|
*/
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
{
|
|
$builder
|
|
->add('id', TextType::class, [
|
|
'label' => 'Identifiant'
|
|
])
|
|
->add('name', TranslatableStringFormType::class, [
|
|
'label' => 'Nom'
|
|
])
|
|
;
|
|
}
|
|
|
|
/**
|
|
* @param OptionsResolver $resolver
|
|
*/
|
|
public function configureOptions(OptionsResolver $resolver)
|
|
{
|
|
$resolver
|
|
->setDefault('class', MaritalStatus::class)
|
|
;
|
|
}
|
|
} |