Skip to content

Commit

Permalink
Rename form_type index of translationsFieldsType options to field_type
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.pinciuc committed Nov 3, 2013
1 parent 2360a3f commit 3703954
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['form_type'];
unset($fieldConfig['form_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['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))) {
Expand Down

0 comments on commit 3703954

Please sign in to comment.