diff options
author | sgiehl <stefangiehl@gmail.com> | 2012-05-28 21:29:23 +0400 |
---|---|---|
committer | sgiehl <stefangiehl@gmail.com> | 2012-05-28 21:29:23 +0400 |
commit | 06bb25eb436e6d17d79eb44b286a1d877328142d (patch) | |
tree | f92a56ad52588a20b8bf16eb466ce920c2a65c2b /core/DataTable/Filter/Limit.php | |
parent | 90ae9e10229fc517dd1c9f406736cc091b6cf970 (diff) |
added/fixed doc blocks
git-svn-id: http://dev.piwik.org/svn/trunk@6353 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/Limit.php')
-rw-r--r-- | core/DataTable/Filter/Limit.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/core/DataTable/Filter/Limit.php b/core/DataTable/Filter/Limit.php index f74eebf1ed..1590eb5350 100644 --- a/core/DataTable/Filter/Limit.php +++ b/core/DataTable/Filter/Limit.php @@ -21,10 +21,10 @@ class Piwik_DataTable_Filter_Limit extends Piwik_DataTable_Filter /** * Filter constructor. * - * @param Piwik_DataTable $table - * @param int $offset Starting row (indexed from 0) - * @param int $limit Number of rows to keep (specify -1 to keep all rows) - * @param bool $keepSummaryRow Whether to keep the summary row or not. + * @param Piwik_DataTable $table + * @param int $offset Starting row (indexed from 0) + * @param int $limit Number of rows to keep (specify -1 to keep all rows) + * @param bool $keepSummaryRow Whether to keep the summary row or not. */ public function __construct( $table, $offset, $limit = null, $keepSummaryRow = false ) { @@ -37,14 +37,17 @@ class Piwik_DataTable_Filter_Limit extends Piwik_DataTable_Filter } $this->limit = $limit; $this->keepSummaryRow = $keepSummaryRow; - } - + } + + /** + * Limits the given data table + * + * @param Piwik_DataTable $table + */ public function filter($table) { $table->setRowsCountBeforeLimitFilter(); - $rowsCount = $table->getRowsCount(); - if ($this->keepSummaryRow) { $summaryRow = $table->getRowFromId(Piwik_DataTable::ID_SUMMARY_ROW); |