WidgetInterface
in
Interface for input widgets.
Table of Contents
Methods
- render() : string
- Converts the $data into one or many HTML elements.
- secureFields() : array<string|int, string>
- Returns a list of fields that need to be secured for this widget.
Methods
render()
Converts the $data into one or many HTML elements.
public
render(array<string, mixed> $data, ContextInterface $context) : string
Parameters
- $data : array<string, mixed>
-
The data to render.
- $context : ContextInterface
-
The current form context.
Return values
string —Generated HTML for the widget element.
secureFields()
Returns a list of fields that need to be secured for this widget.
public
secureFields(array<string, mixed> $data) : array<string|int, string>
Parameters
- $data : array<string, mixed>
-
The data to render.
Return values
array<string|int, string> —Array of fields to secure.