Method | Description | |
---|---|---|
__construct ( |
Generates a new report widget factory. | |
createContainerWidget ( string $containerId ) : |
Creates a new container widget based on the specified report in {@link construct()}. | |
createCustomWidget ( string $action ) : |
Creates a custom widget that doesn't use a viewDataTable to render the report but instead a custom controller action. Make sure the specified $action exists in the plugin's controller. Otherwise behaves as {@link createWidget()}. | |
createWidget ( ) : |
Creates a widget based on the specified report in {@link construct()}. |
public __construct ( |
||
$report | A report instance, widgets will be created based on the data provided by this report. |
public createContainerWidget ( string $containerId ) : |
||
$containerId | string | eg 'Products' or 'Contents' see {Piwik\Widget\WidgetContainerConfig::setId()}. Other reports or widgets will be able to add more widgets to this container. This is useful when you want to show for example multiple related widgets together. |
return |
public createCustomWidget ( string $action ) : |
||
$action | string | eg 'conversionReports' (requires a method `public function conversionReports()` in the plugin's controller). |
return |
public createWidget ( ) : |
||
return |