Skip to content

Commit

Permalink
Merge pull request #82 from daniel-pinciuc/master
Browse files Browse the repository at this point in the history
Fixed a2lix_translations form type and collection type config conflict
  • Loading branch information
webda2l committed Nov 7, 2013
2 parents 3412358 + 3703954 commit 9ef15ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Form/Type/TranslationsFieldsType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class TranslationsFieldsType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
foreach ($options['fields'] as $fieldName => $fieldConfig) {
$fieldType = $fieldConfig['type'];
unset($fieldConfig['type']);
$fieldType = $fieldConfig['field_type'];
unset($fieldConfig['field_type']);

$builder->add($fieldName, $fieldType, $fieldConfig);
}
Expand Down
4 changes: 2 additions & 2 deletions TranslationForm/TranslationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public function getChildrenOptions($class, $options)
*/
public function guessMissingChildOptions($guesser, $class, $property, $options)
{
if (!isset($options['type']) && ($typeGuess = $guesser->guessType($class, $property))) {
$options['type'] = $typeGuess->getType();
if (!isset($options['field_type']) && ($typeGuess = $guesser->guessType($class, $property))) {
$options['field_type'] = $typeGuess->getType();
}

if (!isset($options['pattern']) && ($patternGuess = $guesser->guessPattern($class, $property))) {
Expand Down

0 comments on commit 9ef15ed

Please sign in to comment.