1
我在TWIG的下一個對象:TWIG無法訪問對象屬性
{{dump(profile.profileTagOne)}}
Tag {#2306 ▼
+__isInitialized__: true
#id: 1
#name: "This is my name"
#slug: "this-is-my-name"
#native: true
#perfil: PersistentCollection {#2307 ▶}
…4
}
如果我告訴了var profile.profileTagOne我的名字,但如果我嘗試訪問的id我得到的錯誤:不可能通過profile.profileTagOne.id
任何想法來訪問一個NULL變量(「」)的屬性(「ID」)在...,我想訪問?
你確定沒有一些'{%for%}'看看周圍,你想要訪問一些其他的對象嗎? –