Are there any custom Widget tutorials

XboxUnlimited

Active member
Hi,

Does anyone know if there are any widget creation tutorials? I have a custom add-on which I was looking to create a widget for but not sure where to start, any advice would be appreciated.

Thanks
 
The add-on demo in the dev docs includes a widget, so that should provide a good starting point.
It doesn't explain a php callback widget.
I understand that I put there class and method name. but this part is a little bit Chinese to me:

Callback arguments:

\XF\Widget\AbstractWidget $widget
callback arguments means mymethod (\XF\Widget\AbstractWidget $widget){} ?

This widget. From this you can access the WidgetConfig object and the \XF\App object in order to fetch data and render a template by returning the $widget->renderer() object.

and this means that the method will return not a view(template name, viewparams[]) but return $widget->renderer(template name/vewparams[]) ?

as you can understand I'm a guru in development )))
 
Back
Top Bottom