mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
move logic of context to different interfaces
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\DocGeneratorBundle\Form;
|
||||
|
||||
use Chill\DocGeneratorBundle\Context\ContextManager;
|
||||
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface;
|
||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||
use Chill\DocStoreBundle\Form\StoredObjectType;
|
||||
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
||||
@@ -44,7 +45,8 @@ class DocGeneratorTemplateType extends AbstractType
|
||||
'error_bubbling' => true,
|
||||
]);
|
||||
|
||||
if ($context->hasAdminForm()) {
|
||||
if ($context instanceof DocGeneratorContextWithAdminFormInterface
|
||||
&& $context->hasAdminForm()) {
|
||||
$sub = $builder
|
||||
->create('options', null, ['compound' => true])
|
||||
->addModelTransformer(new CallbackTransformer(
|
||||
|
Reference in New Issue
Block a user