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 7aa22c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 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,
]
);
}
}
2 changes: 1 addition & 1 deletion Tests/travis.php.ini
Original file line number Diff line number Diff line change
@@ -1 +1 @@
memory_limit = 1536M
memory_limit = 2048M
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"symfony/monolog-bundle": "2.4.*",
"doctrine/doctrine-bundle": "1.4.*",
"jackalope/jackalope-doctrine-dbal": "^1.2.5",
"phpunit/phpunit": ">=4.8",
"phpunit/phpunit": ">=4.8, <6.0",

"php-task/task-bundle": "@dev",
"php-task/php-task": "@dev"
Expand Down

0 comments on commit 7aa22c9

Please sign in to comment.