ZF-2564: Add createElement() method to Zend_Form
Description
Currently, addElement() returns the Zend_Form object, which makes creating and returning a new element in a single step non-intuitive:
$element = $form->addElement('text', 'foo')->foo;
Please add a createElement() method that mimics addElement() but instead returns the element itself.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-06T09:34:59.000+0000
Added in r7822. addElement() now calls this internally when creating elements as a factory as well.