Class NTextInput


Single line text input control.

NObject
   |
   --NComponent
      |
      --NFormControl
         |
         --NTextBase
            |
            --NTextInput
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Forms/Controls/TextInput.php (line 33)
Public Method Summary
NTextInput
__construct ([string $label = NULL], [string $cols = NULL], [int $maxLength = NULL], int 3)
NHtml
Generates control's HTML element.
void
notifyRule (NRule $rule)
NTextInput
setPasswordMode ([bool $mode = TRUE])
Sets or unsets the password mode.
Protected Method Summary
protected string
checkMaxLength ($value)
Filter: shortens value to control's max length.
Methods Inherited From NTextBase
addFilter(), filterFloat(), getEmptyValue(), getValue(), notifyRule(), setEmptyValue(), setValue(), validateEmail(), validateFloat(), validateInteger(), validateLength(), validateMaxLength(), validateMinLength(), validateRange(), validateRegexp(), validateUrl()
Methods Inherited From NFormControl
__construct(), addCondition(), addConditionOn(), addError(), addRule(), attached(), cleanErrors(), getControl(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), getValue(), hasErrors(), isDisabled(), isRendered(), isRequired(), loadHttpData(), notifyRule(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setParent(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From NComponent
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup()
Methods Inherited From NObject
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary

Method Details

line 42

__construct

public NTextInput __construct ([string $label = NULL], [string $cols = NULL], [int $maxLength = NULL], int 3)

Input
string $label control name
string $cols label
int $maxLength width of the control
int 3 maximum number of characters the user may enter
Output
NTextInput  

line 59

checkMaxLength

protected string checkMaxLength ($value)

Filter: shortens value to control's max length.

Input
$value
Output
string  

line 86

getControl

public NHtml getControl ()

Generates control's HTML element.

Output
NHtml  

line 97

notifyRule

public void notifyRule (NRule $rule)

Input
NRule $rule
Output
void  

line 74

setPasswordMode

public NTextInput setPasswordMode ([bool $mode = TRUE])

Sets or unsets the password mode.

Input
bool $mode
Output
NTextInput provides a fluent interface