abstract class TextBase extends BaseControl

Implements the basic functionality common to text input controls.

Properties

protected string $emptyValue
protected mixed $rawValue

Methods

setValue($value)

Sets control's value.

mixed
getValue()

Returns control's value.

setNullable($value = true)

Sets whether getValue() returns null instead of empty string.

setEmptyValue($value)

Sets the special value which is treated as empty string.

string
getEmptyValue()

Returns the special value which is treated as empty string.

setMaxLength($length)

Sets the maximum number of allowed characters.

addFilter($filter)

Appends input string filter callback.

Html|string
getControl()

Generates control's HTML element.

string|null
getRenderedValue()

No description

addRule($validator, $errorMessage = null, $arg = null)

No description

Details

at line 35
IControl setValue($value)

internal  
 

Sets control's value.

Parameters

$value

Return Value

IControl

at line 52
mixed getValue()

Returns control's value.

Return Value

mixed

at line 64
TextBase setNullable($value = true)

Sets whether getValue() returns null instead of empty string.

Parameters

$value

Return Value

TextBase

at line 76
TextBase setEmptyValue($value)

Sets the special value which is treated as empty string.

Parameters

$value

Return Value

TextBase

at line 87
string getEmptyValue()

Returns the special value which is treated as empty string.

Return Value

string

at line 98
TextBase setMaxLength($length)

Sets the maximum number of allowed characters.

Parameters

$length

Return Value

TextBase

at line 110
TextBase addFilter($filter)

Appends input string filter callback.

Parameters

$filter

Return Value

TextBase

at line 117
Html|string getControl()

Generates control's HTML element.

Return Value

Html|string

at line 133
protected string|null getRenderedValue()

No description

Return Value

string|null

at line 144
BaseControl addRule($validator, $errorMessage = null, $arg = null)

No description

Parameters

$validator
$errorMessage
$arg

Return Value

BaseControl