diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-03-19 00:48:07 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-03-19 00:48:07 +0300 |
commit | 199b7fe84c7b4093112427dfde170a002cffbf91 (patch) | |
tree | 11b229b2b4e8e6e558ca6c503a53c500ccf8d58d /core/DataTable.php | |
parent | bf56078002db6c9d1bd5653443486b9148af76b0 (diff) |
a summary row does not have a subtable, so we can simply get the rows without summary row and avoid creating many new arrays
Diffstat (limited to 'core/DataTable.php')
-rw-r--r-- | core/DataTable.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/DataTable.php b/core/DataTable.php index 96f136a158..2e94d5e89e 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -374,7 +374,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess usort($this->rows, $functionCallback); if ($this->isSortRecursiveEnabled()) { - foreach ($this->getRows() as $row) { + foreach ($this->getRowsWithoutSummaryRow() as $row) { $subTable = $row->getSubtable(); if ($subTable) { @@ -487,7 +487,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess */ public function filterSubtables($className, $parameters = array()) { - foreach ($this->getRows() as $row) { + foreach ($this->getRowsWithoutSummaryRow() as $row) { $subtable = $row->getSubtable(); if ($subtable) { $subtable->filter($className, $parameters); @@ -508,7 +508,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess */ public function queueFilterSubtables($className, $parameters = array()) { - foreach ($this->getRows() as $row) { + foreach ($this->getRowsWithoutSummaryRow() as $row) { $subtable = $row->getSubtable(); if ($subtable) { $subtable->queueFilter($className, $parameters); @@ -1601,7 +1601,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess public function mergeSubtables($labelColumn = false, $useMetadataColumn = false) { $result = new DataTable(); - foreach ($this->getRows() as $row) { + foreach ($this->getRowsWithoutSummaryRow() as $row) { $subtable = $row->getSubtable(); if ($subtable !== false) { $parentLabel = $row->getColumn('label'); |