Interface WidgetInterface
Interface for input widgets.
Direct Implementers
- Cake\View\Widget\BasicWidget
- Cake\View\Widget\DateTimeWidget
- Cake\View\Widget\FileWidget
- Cake\View\Widget\LabelWidget
- Cake\View\Widget\MultiCheckboxWidget
- Cake\View\Widget\RadioWidget
Indirect Implementers
- Cake\View\Widget\ButtonWidget
- Cake\View\Widget\CheckboxWidget
- Cake\View\Widget\NestingLabelWidget
- Cake\View\Widget\SelectBoxWidget
- Cake\View\Widget\TextareaWidget
Method Summary
- render() publicConverts the $data into one or many HTML elements.
- secureFields() public
Returns a list of fields that need to be secured for this widget. Fields are in the form of Model[field][suffix]
Method Detail
render()source 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
stringGenerated HTML for the widget element.
secureFields()source public
secureFields( array $data )
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
arrayArray of fields to secure.
© 2005–2017 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/3.4/class-Cake.View.Widget.WidgetInterface.html