Zend Framework 2 - Doctrine 2 Model Forms

六眼飞鱼酱① 提交于 2019-12-08 11:19:49

问题


Is there a way to autocreate forms based on the models I defined within Doctrine?

In Django its a basic feature. I found some old sources where someone had tried to implement it by himself... but nothing up-to-date or official-looking

These model forms save loads of time. I do ask myself why people don't complain about this (possibly) missing feature...


回答1:


Zend 2 cannot create a form from the Entity itself. Doctrine 2 is not even part of the framework or tied to it as close as to Symfony 2.

You may use annotations in your entity to hint all necessary information for creating a form from it using the annotation builder.

For a deeper understanding how this works I would suggest you to look it up in the Zend 2 Documentation.



来源:https://stackoverflow.com/questions/13953220/zend-framework-2-doctrine-2-model-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!