DocGeneratorTemplate use StoredObject for storign the template

This commit is contained in:
Marc Ducobu
2021-11-05 14:53:51 +01:00
committed by marcu
parent a3da9c538c
commit 7fe2172f05
6 changed files with 84 additions and 8 deletions

View File

@@ -14,8 +14,10 @@ namespace Chill\DocGeneratorBundle\Form;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\DocStoreBundle\Form\StoredObjectType;
class DocGeneratorTemplateType extends AbstractType
{
@@ -25,8 +27,18 @@ class DocGeneratorTemplateType extends AbstractType
->add('name', TranslatableStringFormType::class, [
'label' => 'Nom',
])
->add('context')
->add('entities', ChoiceType::class, [
'multiple' => true,
'choices' => [
'AccompanyingPeriod' => 'Chill\PersonBundle\Entity\AccompanyingPeriod',
'SocialWork\SocialAction' => 'Chill\PersonBundle\Entity\SocialWork\SocialAction'
]])
->add('description')
->add('file');
->add('file', StoredObjectType::class, [
'error_bubbling' => true
])
;
}
public function configureOptions(OptionsResolver $resolver)