Skip to content

Commit

Permalink
added options to allow extra fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Feb 21, 2017
1 parent bcd4348 commit 26fb325
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Document/Form/ArticleDocumentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Sulu\Bundle\ContentBundle\Form\Type\AbstractStructureBehaviorType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Form-type for article mapping.
Expand All @@ -36,4 +37,16 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add('navigationContexts', TextType::class, ['mapped' => false]);
$builder->add('shadowLocaleEnabled', TextType::class, ['mapped' => false]);
}

/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(
[
'allow_extra_fields' => true,
]
);
}
}

0 comments on commit 26fb325

Please sign in to comment.