Skip to content
PHP Ecosystem
Explore

FormControlInterface

API reference › HTML Contracts › Form › FormControlInterface

Implemented by 4 types

Defines the contract for form control elements (inputs, selects, textareas, etc.).

Combines rendering capability with attribute management, providing the minimal interface needed for field wrappers to configure and render form controls.

MethodDescriptionDefined by
addAttribute() abstractAdds or updates a single HTML attribute for the element.UIAwesome\Html\Contracts\Attribute\AttributesInterface
attributes() abstractAdds or updates the supplied HTML attributes, preserving all other attributes.UIAwesome\Html\Contracts\Attribute\AttributesInterface
class() abstractSets the class attribute.UIAwesome\Html\Contracts\Attribute\AttributesInterface
getAttribute() abstractReturns the value of a single HTML attribute.UIAwesome\Html\Contracts\Attribute\AttributesInterface
getAttributes() abstractReturns the array of HTML attributes for the element.UIAwesome\Html\Contracts\Attribute\AttributesInterface
removeAttribute() abstractRemoves a specific HTML attribute from the element.UIAwesome\Html\Contracts\Attribute\AttributesInterface
render() abstractRenders the object as an HTML string.UIAwesome\Html\Contracts\RenderableInterface