2018-07-18 11:35:27 -04:00
|
|
|
<?php declare(strict_types=1);
|
2018-02-15 09:48:57 -05:00
|
|
|
|
|
|
|
namespace App\Form;
|
|
|
|
|
|
|
|
use App\Entity\Film;
|
2018-07-23 09:52:00 -04:00
|
|
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
2022-03-03 11:15:12 -05:00
|
|
|
use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
|
2018-02-15 09:48:57 -05:00
|
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
|
|
|
|
|
class FilmType extends AbstractType
|
|
|
|
{
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
|
|
|
{
|
|
|
|
$builder->add('brand')
|
|
|
|
->add('productLine')
|
|
|
|
->add('filmName')
|
|
|
|
->add('filmAlias')
|
|
|
|
->add('filmSpeedAsa')
|
|
|
|
->add('filmSpeedDin')
|
|
|
|
->add('filmFormat', ChoiceType::class, [
|
|
|
|
'choices' => [
|
|
|
|
'Small Format' => [
|
|
|
|
'35mm' => '135',
|
|
|
|
'110' => '110',
|
|
|
|
],
|
|
|
|
'Medium Format' => [
|
|
|
|
'120' => '120',
|
|
|
|
'127' => '127',
|
|
|
|
'620' => '620',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
])
|
|
|
|
->add('filmBase', ChoiceType::class, [
|
|
|
|
'choices' => [
|
|
|
|
'Cellulose Triacetate' => 'Cellulose Triacetate',
|
|
|
|
'Polyester' => 'Polyester',
|
|
|
|
'Polyethylene Naphtalate' => 'Polyethylene Naphtalate',
|
|
|
|
],
|
|
|
|
])
|
|
|
|
->add('unusedRolls')
|
|
|
|
->add('rollsInCamera')
|
|
|
|
->add('developedRolls')
|
|
|
|
->add('chemistry', ChoiceType::class, [
|
|
|
|
'choices' => [
|
|
|
|
'B & W' => 'B & W',
|
|
|
|
'C-41' => 'C-41',
|
|
|
|
'E-6' => 'E-6',
|
|
|
|
'Other' => 'Other',
|
|
|
|
],
|
|
|
|
])
|
|
|
|
->add('notes');
|
|
|
|
}
|
2018-02-15 09:48:57 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function configureOptions(OptionsResolver $resolver): void
|
|
|
|
{
|
|
|
|
$resolver->setDefaults([
|
|
|
|
'data_class' => Film::class,
|
|
|
|
]);
|
|
|
|
}
|
2018-02-15 09:48:57 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function getBlockPrefix(): string
|
|
|
|
{
|
|
|
|
return 'camerabundle_film';
|
|
|
|
}
|
2018-02-15 09:48:57 -05:00
|
|
|
}
|