How would You populate Zend_Form_Element_Select with options direct from Zend_Db_Table_Row?
For instance:
$select = new Zend_Form_Element_Select('user_id', array(
'required' => true
));
// fetching users for select
$userTable = new User_Model_DbTable_User();
$users = $userTable->fetchAll();
$select->addMultiOptions($users->toArray());
But this will not work to good. Let say I want to have object id as a option value and some object property as an select label.
I know I can run foreach thourgh the rowset and construct an array of options but maybe there is some kind of map function?