Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-07-28 15:51:51 +0300
committersgiehl <stefan@piwik.org>2015-10-06 18:25:24 +0300
commitccaf2c6b9665f238a61c9753f0b0e8c173557c77 (patch)
tree5b9617190c3743d6375f01304640a62db02e48e7 /core/Plugin/Report.php
parentb09be69058e7d3a62e00b985f5f4b8d96b070efa (diff)
added missing doc
Diffstat (limited to 'core/Plugin/Report.php')
-rw-r--r--core/Plugin/Report.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php
index 716bd92e31..c98d38e849 100644
--- a/core/Plugin/Report.php
+++ b/core/Plugin/Report.php
@@ -310,6 +310,25 @@ class Report
return $view->render();
}
+ /**
+ * Let's you add any amount of widgets for this report. If a report defines a {@link $categoryId} and a
+ * {@link $subcategoryId} a widget will be generated automatically.
+ *
+ * Example to add a widget manually by overwriting this method in your report:
+ * $widgetsList->addWidgetConfig($factory->createWidget());
+ *
+ * If you want to have the name and the order of the widget differently to the name and order of the report you can
+ * do the following:
+ * $widgetsList->addWidgetConfig($factory->createWidget()->setName('Custom')->setOrder(5));
+ *
+ * If you want to add a widget to any container defined by your plugin or by another plugin you can do
+ * this:
+ * $widgetsList->addToContainerWidget($containerId = 'Products', $factory->createWidget());
+ *
+ * @param WidgetsList $widgetsList
+ * @param ReportWidgetFactory $factory
+ * @api
+ */
public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory)
{
if ($this->categoryId && $this->subcategoryId) {