JobeetCategory:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
test: { type: string(255), notnull: true, unique: true }
JobeetJob:
actAs: { Timestampable: ~ }
columns:
category_id: { type: integer, notnull: true }
type: { type: string(255) }
company: { type: string(255), notnull: true }
relations:
JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: JobeetJobs }
管理生成的值在對應JobeetJobForm我增加:Symfony的1 - 從嵌入形式
$cat = new JobeetCategory();
$this->embedForm('category', $cat);
和我生成ADMIN。
現在我可以從這些窗體的所有小部件。我可以在generator.yml中更改它。有位形式
form:
display:
One: [category_id, type]
Two: [company, test] // test - not working
我有錯誤部件測試不存在。我如何在生成器中使用嵌入表單?
我嘗試:
form:
display:
One: [category_id, type]
Two: [company, JobeetCategory[test]]
但這也不能正常工作。
什麼是'測試'在你的情況?公司名稱? – j0k
這是JobetCategory –