Interface WidgetInterface

Interface for input widgets.

Namespace: Cake\View\Widget

Method Summary

  • render() public

    Converts the $data into one or many HTML elements.

  • secureFields() public

    Returns a list of fields that need to be secured for this widget.

Method Detail

render() public

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

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() public

secureFields(array $data)

Returns a list of fields that need to be secured for this widget.

Parameters

array $data

The data to render.

Returns

string[]

Array of fields to secure.

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/interface-Cake.View.Widget.WidgetInterface.html