Skip to content

Commit

Permalink
Ref #215: add Bank entity
Browse files Browse the repository at this point in the history
  • Loading branch information
LucileDT committed Jul 11, 2020
1 parent 4c90c2d commit eeb7fee
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/Form/BankType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace App\Form;

use App\Entity\Bank;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class BankType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TextType::class, [
'label' => 'Nom de la banque',
'required' => true
])
;
}

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Bank::class,
]);
}
}

0 comments on commit eeb7fee

Please sign in to comment.