PHP Class Gregwar\Formidable\Fields\Field

Author: Grégoire Passault ([email protected])
Inheritance: extends Gregwar\Formidable\Language\LanguageAware
Show file Open project: gregwar/formidable Class Usage Examples

Protected Properties

Property Type Description
$attributes HTML attributes
$constraints Constraints on the field
$hook
$index
$mapping Data for the mapping
$maxlength
$minlength Text size
$name Field name
$prettyname Pretty name, for error messages
$readonly Is this field read only?
$regex Regular expression
$required Is this field required ?
$type Field type for the HTML code
$value Field value
$valueChanged Is the value changed?

Public Methods

Method Description
__sleep ( )
__toString ( )
addConstraint ( $closure )
check ( ) Constraints check
getAttribute ( $name ) Get an attribute
getBaseName ( )
getHtml ( )
getIndex ( )
getMappingName ( )
getMappingValue ( )
getName ( )
getSource ( )
getValue ( )
hasAttribute ( $name ) Does this has the attribute $name ?
hookName ( Closure $hook )
needJs ( )
printName ( )
push ( $name, $value = null ) Function called by the dispatcher
readOnly ( )
setAttribute ( $name, $value ) Define an attribute
setName ( $name )
setValue ( $value, $default = false ) Définition de la valeur
source ( $values )
unsetAttribute ( $name ) Remove the attribute $name

Method Details

__sleep() public method

public __sleep ( )

__toString() public method

public __toString ( )

addConstraint() public method

public addConstraint ( $closure )

check() public method

Constraints check
public check ( )

getAttribute() public method

Get an attribute
public getAttribute ( $name )

getBaseName() public method

public getBaseName ( )

getHtml() public method

public getHtml ( )

getIndex() public method

public getIndex ( )

getMappingName() public method

public getMappingName ( )

getMappingValue() public method

public getMappingValue ( )

getName() public method

public getName ( )

getSource() public method

public getSource ( )

getValue() public method

public getValue ( )

hasAttribute() public method

Does this has the attribute $name ?
public hasAttribute ( $name )

hookName() public method

public hookName ( Closure $hook )
$hook Closure

needJs() public method

public needJs ( )

printName() public method

public printName ( )

push() public method

Function called by the dispatcher
public push ( $name, $value = null )

readOnly() public method

public readOnly ( )

setAttribute() public method

Define an attribute
public setAttribute ( $name, $value )

setName() public method

public setName ( $name )

setValue() public method

Définition de la valeur
public setValue ( $value, $default = false )

source() public method

public source ( $values )

unsetAttribute() public method

Remove the attribute $name
public unsetAttribute ( $name )

Property Details

$attributes protected property

HTML attributes
protected $attributes

$constraints protected property

Constraints on the field
protected $constraints

$hook protected property

protected $hook

$index protected property

protected $index

$mapping protected property

Data for the mapping
protected $mapping

$maxlength protected property

protected $maxlength

$minlength protected property

Text size
protected $minlength

$name protected property

Field name
protected $name

$prettyname protected property

Pretty name, for error messages
protected $prettyname

$readonly protected property

Is this field read only?
protected $readonly

$regex protected property

Regular expression
protected $regex

$required protected property

Is this field required ?
protected $required

$type protected property

Field type for the HTML code
protected $type

$value protected property

Field value
protected $value

$valueChanged protected property

Is the value changed?
protected $valueChanged