/** * Adds single-line text input control used for sensitive input such as passwords. * @param string control name * @param string label * @param int width of the control * @param int maximum number of characters the user may enter * @return TextInput */ public function addPassword($name, $label, $cols = NULL, $maxLength = NULL) { $control = new TextInput($label, $cols, $maxLength); $control->setPasswordMode(TRUE); $this->addComponent($control, $name); return $control; }
function addPassword($name, $label = NULL, $cols = NULL, $maxLength = NULL) { $control = new TextInput($label, $cols, $maxLength); $control->setPasswordMode(TRUE); return $this[$name] = $control; }