Right now I’m populating/setDefaults a zend_form like this from the controller:
$data = array('user' => $account->getUser(),
'password' => $account->getPassword(),
'name' => $account->getName());
$form->setDefaults($data);
It’s working but seams very manual the process. Is there a better way to do it?
The solution that I apply was to add this function to the entity:
And then just:
Also if you need to do it the other way arround (array to object) you can take a look here