Render a widget. More...
Static Public Member Functions | |
static | renderWidget (\Duf::Form $form, $template_engine, $widget_conf) |
Render the widget. More... | |
Render a widget.
Everything in a form is a widget. Widgets can render recursively nested widgets. Widgets can be form field, its label, error messages, static text, or layout.
$template_engine is external object usable for rendering which is passed by between widgets. Duf does not use it in any way but custom widgets can.
To render nested widget, call this:
$form->renderWidget($template_engine, $child_widget_conf);
Where $child_widget_conf
is subtree of $widget_conf
.
|
static |
Render the widget.
$form | is the Form. |
$template_engine | is templating engine which may be used for rendering (optional). |
$widget_conf | is configuration of the widget. It must contain `'#!'` key to determine next renderer. |
Implemented in ItemActions, SwitchWidget, CollectionActions, Tabular, AddToBasketWidget, Plain, SelectionCheckbox, Price, HtmlTemplate, GroupedList, Plain, Action, ActionLink, Heading, Slot, Text, DefaultTable, Fieldsets, NullLayout, and Table.