collection-crud/src/Form/PreviouslyOwnedLensesType.php

61 lines
1.5 KiB
PHP

<?php declare(strict_types=1);
namespace App\Form;
use App\Entity\PreviouslyOwnedLenses;
use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver;
class PreviouslyOwnedLensesType extends AbstractType
{
/**
* {@inheritDoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('brand')
->add('coatings')
->add('productLine')
->add('model')
->add('minFStop')
->add('maxFStop')
->add('minFocalLength')
->add('maxFocalLength')
->add('serial')
->add('purchasePrice')
->add('notes')
->add('mount')
->add('imageSize')
->add('received')
->add('formerlyOwned')
->add('frontFilterSize')
->add('rearFilterSize')
->add('isTeleconverter')
->add('designElements')
->add('designGroups')
->add('apertureBlades');
}
/**
* {@inheritDoc}
*
* @throws AccessException
*/
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => PreviouslyOwnedLenses::class,
]);
}
/**
* {@inheritDoc}
*/
public function getBlockPrefix(): string
{
return 'camerabundle_previouslyownedlenses';
}
}