File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ it in the view::
194
194
use Symfony\Component\Form\AbstractTypeExtension;
195
195
use Symfony\Component\Form\FormView;
196
196
use Symfony\Component\Form\FormInterface;
197
- use Symfony\Component\Form\Util\PropertyPath ;
197
+ use Symfony\Component\PropertyAccess\PropertyAccess ;
198
198
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
199
199
200
200
class ImageTypeExtension extends AbstractTypeExtension
@@ -232,8 +232,8 @@ it in the view::
232
232
$parentData = $form->getParent()->getData();
233
233
234
234
if (null !== $parentData) {
235
- $propertyPath = new PropertyPath($options['image_path'] );
236
- $imageUrl = $propertyPath ->getValue($parentData);
235
+ $accessor = PropertyAccess::getPropertyAccessor( );
236
+ $imageUrl = $accessor ->getValue($parentData, $options['image_path'] );
237
237
} else {
238
238
$imageUrl = null;
239
239
}
You can’t perform that action at this time.
0 commit comments