From 52e5fab6151f724aaff8cf4e33f7ea909b7030df Mon Sep 17 00:00:00 2001 From: "daniel.pinciuc" Date: Sun, 3 Nov 2013 13:51:48 +0200 Subject: [PATCH 1/2] Change a2lix_translations form type configuration type index into form_type --- Form/Type/TranslationsFieldsType.php | 4 ++-- TranslationForm/TranslationForm.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Form/Type/TranslationsFieldsType.php b/Form/Type/TranslationsFieldsType.php index 643cdab..a537c5e 100644 --- a/Form/Type/TranslationsFieldsType.php +++ b/Form/Type/TranslationsFieldsType.php @@ -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['form_type']; + unset($fieldConfig['form_type']); $builder->add($fieldName, $fieldType, $fieldConfig); } diff --git a/TranslationForm/TranslationForm.php b/TranslationForm/TranslationForm.php index 7bda1b9..41b4521 100644 --- a/TranslationForm/TranslationForm.php +++ b/TranslationForm/TranslationForm.php @@ -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['form_type']) && ($typeGuess = $guesser->guessType($class, $property))) { + $options['form_type'] = $typeGuess->getType(); } if (!isset($options['pattern']) && ($patternGuess = $guesser->guessPattern($class, $property))) { From 3703954d199fc63678842517968d2b477a86553d Mon Sep 17 00:00:00 2001 From: "daniel.pinciuc" Date: Sun, 3 Nov 2013 17:37:56 +0200 Subject: [PATCH 2/2] Rename form_type index of translationsFieldsType options to field_type --- Form/Type/TranslationsFieldsType.php | 4 ++-- TranslationForm/TranslationForm.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Form/Type/TranslationsFieldsType.php b/Form/Type/TranslationsFieldsType.php index a537c5e..ba384df 100644 --- a/Form/Type/TranslationsFieldsType.php +++ b/Form/Type/TranslationsFieldsType.php @@ -16,8 +16,8 @@ class TranslationsFieldsType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { foreach ($options['fields'] as $fieldName => $fieldConfig) { - $fieldType = $fieldConfig['form_type']; - unset($fieldConfig['form_type']); + $fieldType = $fieldConfig['field_type']; + unset($fieldConfig['field_type']); $builder->add($fieldName, $fieldType, $fieldConfig); } diff --git a/TranslationForm/TranslationForm.php b/TranslationForm/TranslationForm.php index 41b4521..08382b5 100644 --- a/TranslationForm/TranslationForm.php +++ b/TranslationForm/TranslationForm.php @@ -80,8 +80,8 @@ public function getChildrenOptions($class, $options) */ public function guessMissingChildOptions($guesser, $class, $property, $options) { - if (!isset($options['form_type']) && ($typeGuess = $guesser->guessType($class, $property))) { - $options['form_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))) {