2022-09-30 10:49:02 -04:00
|
|
|
<?php declare(strict_types=1);
|
2022-09-29 20:09:31 -04:00
|
|
|
|
|
|
|
namespace App\Form;
|
|
|
|
|
|
|
|
use App\Entity\GpuCore;
|
2022-09-30 10:49:02 -04:00
|
|
|
use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
|
2022-09-29 20:09:31 -04:00
|
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
|
|
|
|
|
class GPUCoreType extends AbstractType
|
|
|
|
{
|
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
|
|
{
|
|
|
|
$builder
|
2022-09-30 10:49:02 -04:00
|
|
|
->add('brand')
|
2022-09-29 20:09:31 -04:00
|
|
|
->add('name')
|
|
|
|
->add('variant')
|
|
|
|
->add('architecture')
|
|
|
|
->add('architectureLink')
|
2022-09-30 10:49:02 -04:00
|
|
|
->add('generationName')
|
|
|
|
->add('processNode');
|
2022-09-29 20:09:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function configureOptions(OptionsResolver $resolver): void
|
|
|
|
{
|
|
|
|
$resolver->setDefaults([
|
|
|
|
'data_class' => GpuCore::class,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|