0
我有一個類包含類的數組的步驟和步驟包含多個類媒體。從多個類的Symfony2表格
想法是,一篇文章可以包含幾個步驟,每個步驟可以包含幾個圖像。
我需要實現一個表格,以方便上傳和持續與Doctrine。
我需要一些關於如何使用jQuery進行上傳的建議,可能會上傳出現在文章中的多個圖像並堅持Doctrine。
當我嘗試添加到形式:
->add('files','file',
array(
"label" => "Files",
"required" => FALSE,
"attr" => array(
"accept" => "image/*",
"multiple" => "multiple",
)
我收到一個錯誤:
Neither property "files" nor method "getFiles()" nor method "isFiles()" exists in class "Ift\DesignBundle\Entity\Article"
在實體文章我有
protected $steps;
即與類步驟關係(一對多)。 步驟是一個屬性:
protected $media;
即表示圖像,並且與步驟一對多關係。