PHP Class Formo_Core_Driver

ファイルを表示 Open project: bmidget/kohana-formo

Public Methods

Method Description
added ( array $array ) : void Event that's run directly after a field is added
can_be_empty ( ) : boolean Return whether a field can post nothing (ie, checkboxes post nothing if not checked)
close ( array $array ) : string Allow for any special closing tags that don't fit the norm (ie, datalist)
get_attr ( array $array ) : array Allow any pre-configured attributes for a field or form
get_label ( array $array ) : string Return a formatted label
get_opts ( array $array ) : array Configure and return any option fields (ie select, radios and checkboxes fields)
get_opts_template ( array $array ) : string Retrieve a template that renders options for a field
get_tag ( ) : string Return a field's tag name. Has to be set for every field.
get_template ( array $array ) : void Return a field's template used with $field->render()
get_title ( array $array ) : string Get special title (used mostly for groups of fields like checkboxes and radios)
get_val ( array $array ) : mixed Return a field's value
get_validation_values ( array $array ) : void Find values that will be added to the field's validation object
is_a_parent ( ) : boolean Return whether this is usually a parent containing multiple fields
load ( array $array ) : void Driver actually sets a field's value from Formo::load()
name ( array $array ) : name Return a field's 'name' attribute
new_val ( array $array ) : mixed Take a raw new value in and return what the field should interpret the value to be
open ( array $array ) : string Return field's open tag
pre_validate ( array $array ) : void Event run before validation. Allows pre-configured rules to be added

Method Details

added() public static method

Event that's run directly after a field is added
public static added ( array $array ) : void
$array array
return void

can_be_empty() public static method

Return whether a field can post nothing (ie, checkboxes post nothing if not checked)
public static can_be_empty ( ) : boolean
return boolean

close() public static method

Allow for any special closing tags that don't fit the norm (ie, datalist)
public static close ( array $array ) : string
$array array
return string

get_attr() public static method

Allow any pre-configured attributes for a field or form
public static get_attr ( array $array ) : array
$array array
return array

get_label() public static method

Return a formatted label
public static get_label ( array $array ) : string
$array array
return string

get_opts() public static method

Configure and return any option fields (ie select, radios and checkboxes fields)
public static get_opts ( array $array ) : array
$array array
return array

get_opts_template() public static method

Retrieve a template that renders options for a field
public static get_opts_template ( array $array ) : string
$array array
return string

get_tag() public static method

Return a field's tag name. Has to be set for every field.
public static get_tag ( ) : string
return string

get_template() public static method

Return a field's template used with $field->render()
public static get_template ( array $array ) : void
$array array
return void

get_title() public static method

Get special title (used mostly for groups of fields like checkboxes and radios)
public static get_title ( array $array ) : string
$array array
return string

get_val() public static method

Return a field's value
public static get_val ( array $array ) : mixed
$array array
return mixed

get_validation_values() public static method

Find values that will be added to the field's validation object
public static get_validation_values ( array $array ) : void
$array array
return void

is_a_parent() public static method

Return whether this is usually a parent containing multiple fields
public static is_a_parent ( ) : boolean
return boolean

load() public static method

Driver actually sets a field's value from Formo::load()
public static load ( array $array ) : void
$array array
return void

name() public static method

Return a field's 'name' attribute
public static name ( array $array ) : name
$array array
return name

new_val() public static method

Take a raw new value in and return what the field should interpret the value to be
public static new_val ( array $array ) : mixed
$array array
return mixed

open() public static method

Return field's open tag
public static open ( array $array ) : string
$array array
return string

pre_validate() public static method

Event run before validation. Allows pre-configured rules to be added
public static pre_validate ( array $array ) : void
$array array
return void