Преглед на файлове

[Form] Renamed ObjectMapper to PropertyPathMapper

Bernhard Schussek преди 14 години
родител
ревизия
b5656f1290
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      src/Symfony/Component/Form/DataMapper/ObjectMapper.php
  2. 2 2
      src/Symfony/Component/Form/Type/FormType.php

+ 1 - 1
src/Symfony/Component/Form/DataMapper/ObjectMapper.php

@@ -16,7 +16,7 @@ use Symfony\Component\Form\FormInterface;
 use Symfony\Component\Form\RecursiveFieldIterator;
 use Symfony\Component\Form\Exception\FormException;
 
-class ObjectMapper implements DataMapperInterface
+class PropertyPathMapper implements DataMapperInterface
 {
     /**
      * Stores the class that the data of this form must be instances of

+ 2 - 2
src/Symfony/Component/Form/Type/FormType.php

@@ -15,7 +15,7 @@ use Symfony\Component\Form\FieldBuilder;
 use Symfony\Component\Form\FormBuilder;
 use Symfony\Component\Form\Renderer\Theme\ThemeInterface;
 use Symfony\Component\Form\CsrfProvider\CsrfProviderInterface;
-use Symfony\Component\Form\DataMapper\ObjectMapper;
+use Symfony\Component\Form\DataMapper\PropertyPathMapper;
 use Symfony\Component\Form\Renderer\Plugin\FormPlugin;
 use Symfony\Component\EventDispatcher\EventDispatcher;
 
@@ -33,7 +33,7 @@ class FormType extends AbstractType
         $builder->setAttribute('virtual', $options['virtual'])
             ->addRendererPlugin(new FormPlugin())
             ->setDataClass($options['data_class'])
-            ->setDataMapper(new ObjectMapper(
+            ->setDataMapper(new PropertyPathMapper(
                 $options['data_class'],
                 $options['data_constructor']
             ));