CanBeDisabled
API reference › HTML Attribute › CanBeDisabled
Used by 8 types
Provides an immutable API for the disabled attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/disabled.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
disabled() | Sets the disabled attribute. | CanBeDisabled |
Method details
Section titled “Method details”disabled()
Section titled “disabled() ”public function disabled(bool|null $value): staticSets the disabled attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool| | Disabled state. Use true to disable, false to enable, or null to remove the attribute. |
Returns
static: New instance with the updated disabled attribute.