PHP 클래스 Gregwar\Formidable\Form

저자: Grégoire Passault ([email protected])
파일 보기 프로젝트 열기: gregwar/formidable 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$isCached Is the form cached?

보호된 프로퍼티들

프로퍼티 타입 설명
$accessor Property accessor
$cache * Cache system
$constraints Form constraints
$content HTML contents of the form
$factory Factory
$originalParserData Parser raw data
$parserData
$path File path
$position Current position for iterator
$variables File variables

공개 메소드들

메소드 설명
__construct ( $pathOrContent = '', $variables = null, $cache = false, $factory = null )
__get ( $name ) Get a field's value
__set ( $var, $val ) Set a field value
__toString ( ) Convert to HTML
addConstraint ( $name, $closure = null ) Add a constraint on a field
check ( ) Error checking
getAttribute ( $name, $attribute ) Get a field attribute
getContent ( ) Get the form contents
getData ( $entity = [] ) Gets the data using mapping
getFactory ( )
getField ( $name ) Get a field
getFields ( )
getHtml ( ) Convert to HTML
getJs ( ) Get the JavaScript code to embed
getParserData ( ) Gets the parser data
getPostIndicator ( ) Get the CSRF manager
getToken ( ) Gets the post indicator
getValue ( $name ) Gets a field value
getValues ( ) Get all the values
handle ( $callback = null, $errorsCallback = null ) Check a form, helper function
hookNames ( Closure $hook )
posted ( $method = 'post' ) Check if the form was posted
reset ( ) Resets the form
setAttribute ( $name, $attribute, $value ) Defines an attribute value
setData ( $entity ) Define the values using mapping
setLanguage ( Language $language ) Sets the language
setOptionClass ( $select, $val, $class ) Sets the class of an option field
setPlaceholder ( $name, $value ) Defines a placeholder value
setValue ( $name, $value ) Defines a field value
setValues ( $values, array $files = [] ) Define the values
source ( $source, $data ) Values sourcing

보호된 메소드들

메소드 설명
parse ( ) Parses the form contents to build objects
pushLanguage ( ) Push the language to all the fields

메소드 상세

__construct() 공개 메소드

public __construct ( $pathOrContent = '', $variables = null, $cache = false, $factory = null )

__get() 공개 메소드

Get a field's value
public __get ( $name )

__set() 공개 메소드

Set a field value
public __set ( $var, $val )

__toString() 공개 메소드

Convert to HTML
public __toString ( )

addConstraint() 공개 메소드

Add a constraint on a field
public addConstraint ( $name, $closure = null )

check() 공개 메소드

Error checking
public check ( )

getAttribute() 공개 메소드

Get a field attribute
public getAttribute ( $name, $attribute )

getContent() 공개 메소드

Get the form contents
public getContent ( )

getData() 공개 메소드

Gets the data using mapping
public getData ( $entity = [] )

getFactory() 공개 메소드

public getFactory ( )

getField() 공개 메소드

Get a field
public getField ( $name )

getFields() 공개 메소드

public getFields ( )

getHtml() 공개 메소드

Convert to HTML
public getHtml ( )

getJs() 공개 메소드

Get the JavaScript code to embed
public getJs ( )

getParserData() 공개 메소드

Gets the parser data
public getParserData ( )

getPostIndicator() 공개 메소드

Get the CSRF manager
public getPostIndicator ( )

getToken() 공개 메소드

Gets the post indicator
public getToken ( )

getValue() 공개 메소드

Gets a field value
public getValue ( $name )

getValues() 공개 메소드

Get all the values
public getValues ( )

handle() 공개 메소드

Check a form, helper function
public handle ( $callback = null, $errorsCallback = null )

hookNames() 공개 메소드

public hookNames ( Closure $hook )
$hook Closure

parse() 보호된 메소드

Parses the form contents to build objects
protected parse ( )

posted() 공개 메소드

Check if the form was posted
public posted ( $method = 'post' )

pushLanguage() 보호된 메소드

Push the language to all the fields
protected pushLanguage ( )

reset() 공개 메소드

Resets the form
public reset ( )

setAttribute() 공개 메소드

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

setData() 공개 메소드

Define the values using mapping
public setData ( $entity )

setLanguage() 공개 메소드

Sets the language
public setLanguage ( Language $language )
$language Gregwar\Formidable\Language\Language

setOptionClass() 공개 메소드

Sets the class of an option field
public setOptionClass ( $select, $val, $class )

setPlaceholder() 공개 메소드

Defines a placeholder value
public setPlaceholder ( $name, $value )

setValue() 공개 메소드

Defines a field value
public setValue ( $name, $value )

setValues() 공개 메소드

Define the values
public setValues ( $values, array $files = [] )
$files array

source() 공개 메소드

Values sourcing
public source ( $source, $data )

프로퍼티 상세

$accessor 보호되어 있는 프로퍼티

Property accessor
protected $accessor

$cache 보호되어 있는 프로퍼티

* Cache system
protected $cache

$constraints 보호되어 있는 프로퍼티

Form constraints
protected $constraints

$content 보호되어 있는 프로퍼티

HTML contents of the form
protected $content

$factory 보호되어 있는 프로퍼티

Factory
protected $factory

$isCached 공개적으로 프로퍼티

Is the form cached?
public $isCached

$originalParserData 보호되어 있는 프로퍼티

Parser raw data
protected $originalParserData

$parserData 보호되어 있는 프로퍼티

protected $parserData

$path 보호되어 있는 프로퍼티

File path
protected $path

$position 보호되어 있는 프로퍼티

Current position for iterator
protected $position

$variables 보호되어 있는 프로퍼티

File variables
protected $variables