Creation of DocGenTemplate entity

This commit is contained in:
Marc Ducobu
2021-08-06 15:00:08 +02:00
parent 8207db4b45
commit 7dc501cbda
12 changed files with 291 additions and 11 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace Chill\DocGeneratorBundle\Form;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
class DocGeneratorTemplateType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TranslatableStringFormType::class, [
'label' => 'Nom'
])
->add('description')
->add('file')
;
}
/**
* @param OptionsResolver $resolver
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver
->setDefault('class', DocGeneratorTemplate::class)
;
}
}