/** * Creates a new form element of the given type. * * This method accepts variable number of parameters, their * meaning and count depending on $elementType * * @param string $elementType type of element to add (text, textarea, file...) * @since 1.0 * @access public * @return HTML_QuickForm_Element * @throws HTML_QuickForm_Error */ function &createElement($elementType) { $args = func_get_args(); $element =& HTML_QuickForm::_loadElement('createElement', $elementType, array_slice($args, 1)); return $element; }
/** * Creates a new form element of the given type. * * This method accepts variable number of parameters, their * meaning and count depending on $elementType * * @param string $elementType type of element to add (text, textarea, file...) * @since 1.0 * @access public * @return HTML_QuickForm_Element * @throws HTML_QuickForm_Error */ static function &createElement($elementType) { $args = func_get_args(); $HTML_QuickForm = new HTML_QuickForm(); $element = $HTML_QuickForm->_loadElement('createElement', $elementType, array_slice($args, 1)); return $element; }