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>2013-10-14 04:50:06 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-10-14 04:50:06 +0400
commitdd44370cd44d6475f4e22f931cdb045c00ffe0ea (patch)
tree2fdb13c110c19e821d0f968a9db33f8198c63e18 /plugins/ExampleVisualization
parent569150e52464e2f9656e774f1801352c32f3a2a6 (diff)
added interface for dataTable to be able to define the expected type in a function, maybe it makes sense to add/remove some methods from the interface?
Diffstat (limited to 'plugins/ExampleVisualization')
-rw-r--r--plugins/ExampleVisualization/SimpleTable.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/ExampleVisualization/SimpleTable.php b/plugins/ExampleVisualization/SimpleTable.php
index e38debf9c1..c6d40f3ecb 100644
--- a/plugins/ExampleVisualization/SimpleTable.php
+++ b/plugins/ExampleVisualization/SimpleTable.php
@@ -12,6 +12,7 @@
namespace Piwik\Plugins\ExampleVisualization;
use Piwik\DataTable;
+use Piwik\DataTable\DataTableInterface;
use Piwik\ViewDataTable\Visualization;
use Piwik\Visualization\Config;
use Piwik\Visualization\Request;
@@ -45,26 +46,21 @@ class SimpleTable extends Visualization
// $requestProperties->filter_sort_order = 'desc';
}
- public function beforeGenericFiltersAreAppliedToLoadedDataTable($dataTable, Config $properties, Request $request)
+ public function beforeGenericFiltersAreAppliedToLoadedDataTable(DataTableInterface $dataTable, Config $properties, Request $request)
{
// this hook is executed before generic filters like "filter_limit" and "filter_offset" are applied
// Usage:
// $dateTable->filter($nameOrClosure);
}
- public function afterGenericFiltersAreAppliedToLoadedDataTable($dataTable, Config $properties, Request $request)
+ public function afterGenericFiltersAreAppliedToLoadedDataTable(DataTableInterface $dataTable, Config $properties, Request $request)
{
// this hook is executed after generic filters like "filter_limit" and "filter_offset" are applied
// Usage:
// $dateTable->filter($nameOrClosure, $parameters);
}
- /**
- * @param DataTable|DataTable\Map $dataTable
- * @param \Piwik\Visualization\Config $properties
- * @param \Piwik\Visualization\Request $request
- */
- public function afterAllFilteresAreApplied($dataTable, Config $properties, Request $request)
+ public function afterAllFilteresAreApplied(DataTableInterface $dataTable, Config $properties, Request $request)
{
// this hook is executed after the data table is loaded and after all filteres are applied.
// format your data here that you want to pass to the view