2017-06-24 16 views
0

Sonta Admin FrontendとSonata_Form_Collectionでマルチプル画像をアップロードします。Symfony3、Doctrine 2、Sonata Admin Bundleによる画像アップロードの問題

アップロードはログに次のエラーである。また、

https://pastebin.com/e0myy9b9

:ここに私のキャンプ場エンティティ

[2017-06-24 13:06:19] request.CRITICAL: Uncaught PHP Exception Symfony\Component\PropertyAccess\Exception\InvalidArgumentException: "Expected argument of type "AppBundle\Entity\Picture", "array" given" at /Users/Christian/Sites/zeltplatz/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php line 275 {"exception":"[object] (Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException(code: 0): Expected argument of type \"AppBundle\\Entity\\Picture\", \"array\" given at /Users/Christian/Sites/zeltplatz/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php:275)"} [] 

https://pastebin.com/VWxRY9yq

とマイピクチャエンティティ私のソナタキャンプグランド・管理:

https://pastebin.com/q3xnu6Ts

とソナタピクチャー管理者:

https://pastebin.com/sJwaNUdi

の目標は、私はキャンプ場のために複数の画像を保存することができるということです。あなたは、データ型に問題があるのフィードバックやアイデアここ

答えて

0

ため

おかげで、あなたは画像のインスタンスを必要とします(私は考えて絵の)配列を与えます。たぶん、ループ内で次々と写真を追加してみてください。