Trait Checked
Trait for classes:
- \MvcCore\Ext\Forms\Fields\Checkbox
Trait contains protected property checked with it's getter and setter
and public static method to recognize checked boolean automatically from
given field $value.
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
|
Properties summary
protected
boolean|null
|
$checked
If TRUE, field will be rendered as checked, FALSE otherwise.
If not set, checked flag will be automatically resolved by field value
with method static::GetCheckedByValue($checkbox->GetValue());
If TRUE, field will be rendered as checked, FALSE otherwise.
If not set, checked flag will be automatically resolved by field value
with method static::GetCheckedByValue($checkbox->GetValue());
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-checked
|
|