diff --git a/Form/Type/EmailType.php b/Form/Type/EmailType.php index 2393be4..8ca334a 100644 --- a/Form/Type/EmailType.php +++ b/Form/Type/EmailType.php @@ -24,19 +24,21 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('reference', null, array( - 'read_only' => $options['edit'], + 'attr' => [ + 'read_only' => $options['edit'], + ], 'property_path' => 'entity.reference', 'label' => 'lexik_mailer.email.reference', )) ->add('layout', EntityType::class, array( 'required' => false, - 'empty_value' => '', + 'empty_data ' => '', 'class' => $options['layout_entity'], 'property_path' => 'entity.layout', 'label' => 'lexik_mailer.email.layout', )) ->add('headers', CollectionType::class, array( - 'type' => HeaderType::class, + 'entry_type' => HeaderType::class, 'allow_add' => true, 'allow_delete' => true, 'property_path' => 'entity.headers', diff --git a/Form/Type/LayoutType.php b/Form/Type/LayoutType.php index e053570..f6ddabb 100644 --- a/Form/Type/LayoutType.php +++ b/Form/Type/LayoutType.php @@ -20,7 +20,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('reference', TextType::class, array( - 'read_only' => $options['edit'], + 'attr' => [ + 'read_only' => $options['edit'], + ], 'property_path' => 'entity.reference', 'label' => 'lexik_mailer.layout.reference', )) diff --git a/Resources/config/services.xml b/Resources/config/services.xml index 0b71195..0fc2580 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -55,7 +55,7 @@ - + %lexik_mailer.templating.default_options%