On Wed, Dec 5, 2012 at 11:43 AM, Javier Garcia <[email protected]> wrote: > I need to create a form that shows the attributes of an object to edit them. > > I used symfony these last months and I had to do something like this: > > // retrieve the object $user from the database and then > $form = new UserForm($user); > > What should i do in zf 1? create a constructor? is somethig already made > about this?
There are no facilities to do this in ZF1. In ZF2, however, you can bind() an object to a form. Additionally, you can use annotations in a bound object in order to _define_ a form. However, as noted, this is ZF2 functionality only. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
