Skip to content
PHP Ecosystem
Explore

CheckedStateInterface

API reference › HTML Contracts › Form › CheckedStateInterface

interfaceUIAwesome\Html\Contracts\Form\CheckedStateInterface
Sourcesrc/Form/CheckedStateInterface.php
Implemented by 3 types

Defines the contract for form controls that expose the checked attribute.

Applies to checkbox and radio controls, where the supplied value is matched against the control value to resolve the checked state.

MethodDescriptionDefined by
checked() abstractSets the checked attribute.CheckedStateInterface
abstract public function checked(mixed[]|bool|float|int|string|Stringable|UnitEnum|null $value): static

Sets the checked attribute.

Parameters

ParameterTypeDescription
$valuemixed[]|bool|float|int|string|Stringable|UnitEnum|nullValue matched against the control value to resolve the checked state, or null to remove the attribute.

Returns

static: New instance with the updated checked attribute.