AbstractField
class AbstractField (View source)
The AbstractField class.
Methods
Constructor.
getInput
buildInput
prepareRenderInput
prepareAttributes
getLabel
renderView
render
getLabel
getId
validate
checkRequired
checkRule
filter
prepareStore
Method to get property Name
Method to set property name
Method to get property FieldName
Method to set property fieldName
Method to get property Group
Method to set property group
Method to get property Fieldset
Method to set property fieldset
Method to get property Value
Method to set property value
description
defaultValue
getDefaultValue
Method to get property Rule
Method to get property Filter
Method to get property Control
Method to set property control
label
required
disabled
readonly
class
labelClass
getAttribute
getAttribute
Get attribute. Alias of getAttribute()
.
set
append
prependAttribute
Method to convert some string like true
, 1
, yes
to boolean TRUE,
and no
, false
, disabled
, null
, none
, 0
string to boolean FALSE.
Just an alias of getBool()
but FALSE will return TRUE.
Get all attributes.
If this attribute not exists, use this value as default, or we use original value from xml.
Method to get property Type
Escape html string.
Details
at line line 166
__construct(string $name = null, string $label = null, array $attributes = array(), string $filter = null, string $validator = null)
Constructor.
at line line 192
string
renderInput()
getInput
at line line 211
mixed
buildInput(array $attrs)
buildInput
at line line 223
abstract array
prepare(array $attrs)
prepareRenderInput
at line line 230
array
prepareAttributes()
prepareAttributes
at line line 244
string
renderLabel()
getLabel
at line line 271
string
renderView()
renderView
at line line 281
string
render()
render
at line line 302
mixed
getLabel()
getLabel
at line line 312
string
getId()
getId
at line line 324
ValidateResult
validate()
validate
at line line 350
mixed
checkRequired()
checkRequired
at line line 367
mixed
checkRule()
checkRule
at line line 377
AbstractField
filter()
filter
at line line 398
void
prepareStore()
prepareStore
at line line 409
string
getName(bool $withGroup = false)
Method to get property Name
at line line 425
AbstractField
setName(null $name)
Method to set property name
at line line 441
string
getFieldName(bool $refresh = false)
Method to get property FieldName
at line line 475
AbstractField
setFieldName(null $fieldName)
Method to set property fieldName
at line line 487
null
getGroup()
Method to get property Group
at line line 499
AbstractField
setGroup(null $group)
Method to set property group
at line line 515
null
getFieldset()
Method to get property Fieldset
at line line 527
AbstractField
setFieldset(null $fieldset)
Method to set property fieldset
at line line 539
null
getValue()
Method to get property Value
at line line 551
AbstractField
setValue(null $value)
Method to set property value
at line line 565
AbstractField
description(string $desc)
description
at line line 579
AbstractField
defaultValue(string $value)
defaultValue
at line line 591
mixed
getDefaultValue()
getDefaultValue
at line line 603
AbstractField
setValidator(string|ValidatorInterface $validator)
Method to set property rule
at line line 615
ValidatorInterface
getValidator()
Method to get property Rule
at line line 632
AbstractField
setFilter(string|FilterInterface|callable $filter)
Method to set property filter
at line line 644
string|FilterInterface|callable
getFilter()
Method to get property Filter
at line line 698
string
getControl()
Method to get property Control
at line line 710
AbstractField
setControl(string $control)
Method to set property control
at line line 728
AbstractField
label(string $label)
label
at line line 742
AbstractField
required(bool $value = true)
required
at line line 758
AbstractField
disabled(bool $value = true)
disabled
at line line 772
AbstractField
readonly(bool $value = true)
readonly
at line line 786
AbstractField
setClass(string $value)
class
at line line 800
AbstractField
labelClass(string $value)
labelClass
at line line 815
mixed
getAttribute(string $name, mixed $default = null)
getAttribute
at line line 828
AbstractField
setAttribute(string $name, mixed $value)
getAttribute
at line line 844
mixed
get(string $attr, mixed $default = null)
Get attribute. Alias of getAttribute()
.
at line line 857
AbstractField
set(string $attr, mixed $value)
set
at line line 872
AbstractField
appendAttribute(string $attr, string $value)
append
at line line 887
AbstractField
prependAttribute(string $attr, string $value)
prependAttribute
at line line 903
mixed
getBool(string $attr, mixed $default = null)
Method to convert some string like true
, 1
, yes
to boolean TRUE,
and no
, false
, disabled
, null
, none
, 0
string to boolean FALSE.
at line line 923
mixed
getFalse(string $attr, mixed $default = null)
Just an alias of getBool()
but FALSE will return TRUE.
at line line 933
array
getAttributes()
Get all attributes.
at line line 946
void
def(string $attr, string $value)
If this attribute not exists, use this value as default, or we use original value from xml.
at line line 956
string
getType()
Method to get property Type
at line line 978
AbstractField
setForm(Form $form)
Method to set property form
at line line 994
string
escape(string $text)
Escape html string.