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-03-10 02:24:04 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-03-11 04:34:47 +0300
commit2a1dcbd35ec0fd8dd8a384fe00671bf37ec7fd3e (patch)
tree9e73d85aa8bd9f354bb695c5d5484655f77d46f3 /core/DataTable.php
parent3db2044b94b411ac7c13e417582d06cd9c760acf (diff)
Made for reports faster when flat=1 is used.
Also replaceColumnNames is now queued again which should bring a performance boost in general.
Diffstat (limited to 'core/DataTable.php')
-rw-r--r--core/DataTable.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/DataTable.php b/core/DataTable.php
index 0b0d9845f0..935ee34bfa 100644
--- a/core/DataTable.php
+++ b/core/DataTable.php
@@ -489,6 +489,25 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess
}
/**
+ * Applies a filter to all subtables but not to this datatable.
+ *
+ * @param string|Closure $className Class name, eg. `"Sort"` or "Piwik\DataTable\Filters\Sort"`. If no
+ * namespace is supplied, `Piwik\DataTable\BaseFilter` is assumed. This parameter
+ * can also be a closure that takes a DataTable as its first parameter.
+ * @param array $parameters Array of extra parameters to pass to the filter.
+ */
+ public function queueFilterSubtables($className, $parameters = array())
+ {
+ foreach ($this->getRows() as $row) {
+ $subtable = $row->getSubtable();
+ if ($subtable) {
+ $subtable->queueFilter($className, $parameters);
+ $subtable->queueFilterSubtables($className, $parameters);
+ }
+ }
+ }
+
+ /**
* Adds a filter and a list of parameters to the list of queued filters. These filters will be
* executed when {@link applyQueuedFilters()} is called.
*