PHP Class Nette\Forms\Controls\TextBase

Inheritance: extends BaseControl
Show file Open project: nette/forms Class Usage Examples

Protected Properties

Property Type Description
$emptyValue string
$rawValue unfiltered submitted value

Public Methods

Method Description
addFilter ( $filter ) : self Appends input string filter callback.
addRule ( $validator, $message = NULL, $arg = NULL )
getControl ( )
getEmptyValue ( ) : string Returns the special value which is treated as empty string.
getValue ( ) : string Returns control's value.
setEmptyValue ( $value ) : self Sets the special value which is treated as empty string.
setMaxLength ( $length ) : self Sets the maximum number of allowed characters.
setNullable ( $value = TRUE ) : self Sets whether getValue() returns NULL instead of empty string.
setValue ( $value ) : self Sets control's value.
validate ( ) : void Performs the server side validation.

Protected Methods

Method Description
getRenderedValue ( ) : string | null

Method Details

addFilter() public method

Appends input string filter callback.
public addFilter ( $filter ) : self
return self

addRule() public method

public addRule ( $validator, $message = NULL, $arg = NULL )

getControl() public method

public getControl ( )

getEmptyValue() public method

Returns the special value which is treated as empty string.
public getEmptyValue ( ) : string
return string

getRenderedValue() protected method

protected getRenderedValue ( ) : string | null
return string | null

getValue() public method

Returns control's value.
public getValue ( ) : string
return string

setEmptyValue() public method

Sets the special value which is treated as empty string.
public setEmptyValue ( $value ) : self
return self

setMaxLength() public method

Sets the maximum number of allowed characters.
public setMaxLength ( $length ) : self
return self

setNullable() public method

Sets whether getValue() returns NULL instead of empty string.
public setNullable ( $value = TRUE ) : self
return self

setValue() public method

Sets control's value.
public setValue ( $value ) : self
return self

validate() public method

Performs the server side validation.
public validate ( ) : void
return void

Property Details

$emptyValue protected property

protected string $emptyValue
return string

$rawValue protected property

unfiltered submitted value
protected $rawValue