29 lines
700 B
PHP
29 lines
700 B
PHP
<?php
|
|
|
|
namespace App\Form;
|
|
|
|
use App\Entity\BillVendor;
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
|
|
|
class BillVendorType extends AbstractType
|
|
{
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
{
|
|
$builder->add('label', null, [
|
|
'constraints' => [
|
|
new NotBlank(),
|
|
],
|
|
]);
|
|
}
|
|
|
|
public function configureOptions(OptionsResolver $resolver): void
|
|
{
|
|
$resolver->setDefaults([
|
|
'data_class' => BillVendor::class,
|
|
]);
|
|
}
|
|
}
|