Skip to content

Commit

Permalink
Merge pull request #78 from lexik/fix_symfony3
Browse files Browse the repository at this point in the history
fix issues with Symfony3 (twig.class not found, deprecated, ..)
  • Loading branch information
sdieunidou authored Sep 27, 2016
2 parents 02d34ee + 9d6f366 commit 43d53ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Form/Type/EmailType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 3 additions & 1 deletion Form/Type/LayoutType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
))
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</service>

<!-- Template -->
<service id="lexik_mailer.templating" class="%twig.class%" public="false" >
<service id="lexik_mailer.templating" class="Twig_Environnement" public="false" >
<argument type="service" id="lexik_mailer.templating.loader_chain" />
<argument>%lexik_mailer.templating.default_options%</argument>
<call method="addExtension">
Expand Down

0 comments on commit 43d53ef

Please sign in to comment.