ZF-2564: Add createElement() method to Zend_Form

Issue Type: Improvement Created: 2008-02-04T15:18:03.000+0000 Last Updated: 2008-03-21T16:25:14.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:


Currently, addElement() returns the Zend_Form object, which makes creating and returning a new element in a single step non-intuitive:

<pre class="highlight">
$element = $form->addElement('text', 'foo')->foo;

Please add a createElement() method that mimics addElement() but instead returns the element itself.


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.