\Cake\View\WidgetWidgetInterface

Interface for input widgets.

Summary

Methods
Constants
render()
secureFields()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

render()

render(array  $data, \Cake\View\Form\ContextInterface  $context) : string

Converts the $data into one or many HTML elements.

Parameters

array $data

The data to render.

\Cake\View\Form\ContextInterface $context

The current form context.

Returns

string —

Generated HTML for the widget element.

secureFields()

secureFields(array  $data) : array

Returns a list of fields that need to be secured for this widget. Fields are in the form of Model[field][suffix]

Parameters

array $data

The data to render.

Returns

array —

Array of fields to secure.