PHP 클래스 Piwik\Report\ReportWidgetFactory

.. When creating a widget from a report these values will be automatically specified so that ideally $factory->createWidget() is all one has to do in order to create a new widget.
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Report $report ) Generates a new report widget factory.
createContainerWidget ( string $containerId ) : WidgetContainerConfig Creates a new container widget based on the specified report in {@link construct()}.
createCustomWidget ( string $action ) : ReportWidgetConfig 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 ( ) : ReportWidgetConfig Creates a widget based on the specified report in {@link construct()}.

메소드 상세

__construct() 공개 메소드

Generates a new report widget factory.
public __construct ( Report $report )
$report Piwik\Plugin\Report A report instance, widgets will be created based on the data provided by this report.

createContainerWidget() 공개 메소드

It will automatically use the report's categoryId, subcategoryId (if specified) and order in order to create the container.
public createContainerWidget ( string $containerId ) : WidgetContainerConfig
$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.
리턴 Piwik\Widget\WidgetContainerConfig

createCustomWidget() 공개 메소드

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()}.
public createCustomWidget ( string $action ) : ReportWidgetConfig
$action string eg 'conversionReports' (requires a method `public function conversionReports()` in the plugin's controller).
리턴 ReportWidgetConfig

createWidget() 공개 메소드

It will automatically use the report's name, categoryId, subcategoryId (if specified), defaultViewDataTable, module, action, order and parameters in order to create the widget.
public createWidget ( ) : ReportWidgetConfig
리턴 ReportWidgetConfig