mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
generate document with relatorio: config and driver
This commit is contained in:
@@ -12,14 +12,11 @@ declare(strict_types=1);
|
||||
namespace Chill\DocGeneratorBundle\Form;
|
||||
|
||||
use Chill\DocGeneratorBundle\Context\ContextManager;
|
||||
use Chill\DocGeneratorBundle\Context\DocGeneratorContextInterface;
|
||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||
use Chill\DocStoreBundle\Form\StoredObjectType;
|
||||
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -45,17 +42,16 @@ class DocGeneratorTemplateType extends AbstractType
|
||||
->add('description')
|
||||
->add('file', StoredObjectType::class, [
|
||||
'error_bubbling' => true,
|
||||
])
|
||||
;
|
||||
]);
|
||||
|
||||
if ($context->hasAdminForm()) {
|
||||
$sub = $builder
|
||||
->create('options', null, ['compound' => true])
|
||||
->addModelTransformer(new CallbackTransformer(
|
||||
function (array $data) use ($context) {
|
||||
static function (array $data) use ($context) {
|
||||
return $context->adminFormTransform($data);
|
||||
},
|
||||
function (array $data) use ($context) {
|
||||
static function (array $data) use ($context) {
|
||||
return $context->adminFormReverseTransform($data);
|
||||
}
|
||||
));
|
||||
|
Reference in New Issue
Block a user