Interface IChecked
Responsibility: define getters and setters for field property checked
and method GetCheckedByValue()
to automatically get checked
boolean from any field value.
Interface for classes:
- \MvcCore\Ext\Forms\Fields\Checkbox
Methods summary
public
MvcCore\Ext\Forms\Field
|
#
SetChecked( boolean $checked = TRUE )
Set TRUE to rendered field as checked, FALSE otherwise.
If not set, checked flag will be automatically resolved by field value
with method static::GetCheckedByValue($checkbox->GetValue());
Set TRUE to rendered field as checked, FALSE otherwise.
If not set, checked flag will be automatically resolved by field value
with method static::GetCheckedByValue($checkbox->GetValue());
Parameters
Returns
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-checked
|
public
boolean|null
|
#
GetChecked( )
Get TRUE if field is rendered as checked, FALSE otherwise.
If not set, checked flag will be automatically resolved by field value
with method static::GetCheckedByValue($checkbox->GetValue());
Get TRUE if field is rendered as checked, FALSE otherwise.
If not set, checked flag will be automatically resolved by field value
with method static::GetCheckedByValue($checkbox->GetValue());
Returns
boolean|null
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-checked
|
public static
boolean
|
#
GetCheckedByValue( mixed $value )
Return TRUE for any array , object , resource or unknown type ,
TRUE for boolean TRUE , for string not equal to no ,
for integer not equal to 0 and TRUE for float not equal to 0.0 .
Return TRUE for any array , object , resource or unknown type ,
TRUE for boolean TRUE , for string not equal to no ,
for integer not equal to 0 and TRUE for float not equal to 0.0 .
Parameters
Returns
boolean
|