Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • NButton
  • NCheckbox
  • NFormControl
  • NHiddenField
  • NImageButton
  • NMultiSelectBox
  • NRadioList
  • NSelectBox
  • NSubmitButton
  • NTextArea
  • NTextBase
  • NTextInput
  • NUploadControl
  • Overview
  • Package
  • Class
  • Tree

Class NTextBase

Implements the basic functionality common to text input controls.

NObject
Extended by NComponent implements IComponent
Extended by NFormControl implements IFormControl
Extended by NTextBase

Direct known subclasses

NTextArea, NTextInput
Abstract
Package: Nette\Forms\Controls
Author: David Grudl
Located at Forms/Controls/TextBase.php
Methods summary
public NTextBase
# setValue( string $value )

Sets control's value.

Sets control's value.

Parameters

$value
string

Returns

NTextBase
provides a fluent interface

Overrides

NFormControl::setValue

Implementation of

IFormControl::setValue
public string
# getValue( )

Returns control's value.

Returns control's value.

Returns

string

Overrides

NFormControl::getValue

Implementation of

IFormControl::getValue
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
string

Returns

NTextBase
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.

Returns

string
public NTextBase
# addFilter( callable $filter )

Appends input string filter callback.

Appends input string filter callback.

Parameters

$filter
callable

Returns

NTextBase
provides a fluent interface
public NHtml
# getControl( )

Generates control's HTML element.

Generates control's HTML element.

Returns

NHtml

Overrides

NFormControl::getControl
public NFormControl
# addRule( mixed $operation, string $message = NULL, mixed $arg = NULL )

Adds a validation rule.

Adds a validation rule.

Parameters

$operation
mixed
rule type
$message
string
message to display for invalid data
$arg
mixed
optional rule arguments

Returns

NFormControl
provides a fluent interface

Overrides

NFormControl::addRule
public static boolean
# validateMinLength( NTextBase $control, integer $length )

Min-length validator: has control's value minimal length?

Min-length validator: has control's value minimal length?

Parameters

$control
NTextBase
$length
integer
length

Returns

boolean
public static boolean
# validateMaxLength( NTextBase $control, integer $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
integer
length

Returns

boolean
public static boolean
# 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

Returns

boolean
public static boolean
# validateEmail( NTextBase $control )

Email validator: is control's value valid email address?

Email validator: is control's value valid email address?

Parameters

$control
NTextBase

Returns

boolean
public static boolean
# validateUrl( NTextBase $control )

URL validator: is control's value valid URL?

URL validator: is control's value valid URL?

Parameters

$control
NTextBase

Returns

boolean
public static boolean
# validatePattern( NTextBase $control, string $pattern )

Regular expression validator: matches control's value regular expression?

Regular expression validator: matches control's value regular expression?

Parameters

$control
NTextBase
$pattern
string

Returns

boolean
public static boolean
# validateInteger( NTextBase $control )

Integer validator: is a control's value decimal number?

Integer validator: is a control's value decimal number?

Parameters

$control
NTextBase

Returns

boolean
public static boolean
# validateFloat( NTextBase $control )

Float validator: is a control's value float number?

Float validator: is a control's value float number?

Parameters

$control
NTextBase

Returns

boolean
public static boolean
# 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

Returns

boolean
public static string
# filterFloat( string $s )

Float string cleanup.

Float string cleanup.

Parameters

$s
string

Returns

string
Methods inherited from NFormControl
__construct(), addCondition(), addConditionOn(), addError(), attached(), cleanErrors(), exportRules(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), hasErrors(), isDisabled(), isFilled(), isRequired(), loadHttpData(), setAttribute(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setRequired(), setTranslator(), translate(), validateEqual(), validateFilled(), validateValid()
Methods inherited from NComponent
__clone(), __sleep(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), unmonitor(), validateParent()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Methods inherited from IComponent
setParent()
Constants inherited from IComponent
NAME_SEPARATOR
Properties summary
protected string $emptyValue ''
#
protected array $filters array()
#
Properties inherited from NFormControl
$caption, $control, $idMask, $label, $value
Nette Framework 2.0.4 (for PHP 5.2, prefixed) API API documentation generated by ApiGen 2.7.0