PHP Class Piwik\Plugins\ExamplePlugin\Widgets\MyExampleWidget

To configure a widget simply call the corresponding methods as described in the API-Reference: http://developer.piwik.org/api-reference/Piwik/Plugin\Widget
Inheritance: extends Piwik\Widget\Widget
Mostra file Open project: piwik/piwik

Public Methods

Method Description
configure ( WidgetConfig $config )
render ( ) : string This method renders the widget. It's on you how to generate the content of the widget.

Method Details

configure() public static method

public static configure ( WidgetConfig $config )
$config Piwik\Widget\WidgetConfig

render() public method

As long as you return a string everything is fine. You can use for instance a "Piwik\View" to render a twig template. In such a case don't forget to create a twig template (eg. myViewTemplate.twig) in the "templates" directory of your plugin.
public render ( ) : string
return string