Issues

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

Added in r7822. addElement() now calls this internally when creating elements as a factory as well.