Class NTextBase
Implements the basic functionality common to text input controls.
- NObject
-
NComponent implements IComponent
-
NFormControl implements IFormControl
-
NTextBase
public
NTextBase
|
#
setValue(
string
$value
)
Sets control's value. Sets control's value. Parameters$value stringReturnsNTextBase provides a fluent interface
Implementation of |
public
string
|
#
getValue(
)
Returns control's value. |
public
NTextBase
|
#
setEmptyValue(
string
$value
)
Sets the special value which is treated as empty string. Sets the special value which is treated as empty string. Parameters$value stringReturnsNTextBase provides a fluent interface
|
final public
string
|
#
getEmptyValue(
)
Returns the special value which is treated as empty string. Returns the special value which is treated as empty string. |
public
NTextBase
|
#
addFilter(
callback
$filter
)
Appends input string filter callback. Appends input string filter callback. Parameters$filter callbackReturnsNTextBase provides a fluent interface
|
public
|
#
getControl(
)
|
public
|
#
notifyRule(
NRule
$rule
)
|
public static
bool
|
#
validateMinLength(
NTextBase
$control,
int
$length
)
Min-length validator: has control's value minimal length? Min-length validator: has control's value minimal length? Parameters$control NTextBase$length int length |
public static
bool
|
#
validateMaxLength(
NTextBase
$control,
int
$length
)
Max-length validator: is control's value length in limit? Max-length validator: is control's value length in limit? Parameters$control NTextBase$length int length |
public static
bool
|
#
validateLength(
NTextBase
$control,
array
$range
)
Length validator: is control's value length in range? Length validator: is control's value length in range? Parameters$control NTextBase$range array min and max length pair |
public static
bool
|
#
validateEmail(
NTextBase
$control
)
Email validator: is control's value valid email address? Email validator: is control's value valid email address? Parameters$control NTextBase |
public static
bool
|
#
validateUrl(
NTextBase
$control
)
URL validator: is control's value valid URL? URL validator: is control's value valid URL? Parameters$control NTextBase |
public static
bool
|
#
validateRegexp(
NTextBase
$control,
string
$regexp
)
Regular expression validator: matches control's value regular expression? Regular expression validator: matches control's value regular expression? Parameters$control NTextBase$regexp string |
public static
bool
|
#
validateInteger(
NTextBase
$control
)
Integer validator: is a control's value decimal number? Integer validator: is a control's value decimal number? Parameters$control NTextBase |
public static
bool
|
#
validateFloat(
NTextBase
$control
)
Float validator: is a control's value float number? Float validator: is a control's value float number? Parameters$control NTextBase |
public static
bool
|
#
validateRange(
NTextBase
$control,
array
$range
)
Rangle validator: is a control's value number in specified range? Rangle validator: is a control's value number in specified range? Parameters$control NTextBase$range array min and max value pair |
public static
string
|
#
filterFloat(
string
$s
)
Float string cleanup. Float string cleanup. Parameters$s string |
Methods Inherited From NFormControl
__construct(), attached(), getForm(), getHtmlName(), setHtmlId(), getHtmlId(), setAttribute(), setOption(), getOption(), getOptions(), setTranslator(), getTranslator(), translate(), setValue(), getValue(), setDefaultValue(), loadHttpData(), setDisabled(), isDisabled(), getControl(), getLabel(), getControlPrototype(), getLabelPrototype(), setRendered(), isRendered(), addRule(), addCondition(), addConditionOn(), getRules(), setRequired(), isRequired(), notifyRule(), validateEqual(), validateFilled(), validateValid(), addError(), getErrors(), hasErrors(), cleanErrors()
Methods Inherited From NComponent
__construct(), lookup(), lookupPath(), monitor(), unmonitor(), attached(), detached(), getName(), getParent(), setParent(), validateParent(), __clone(), __wakeup()
Methods Inherited From NObject
getReflection(), __call(), __callStatic(), extensionMethod(), __get(), __set(), __isset(), __unset()
Constants Inherited From NComponent
NAME_SEPARATOR
Properties Inherited From NFormControl
$idMask, $caption, $value, $control, $label