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:
authordiosmosis <benakamoorthi@fastmail.fm>2013-10-22 14:07:30 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2013-10-22 14:07:30 +0400
commit28d107b0d05f607a2ac9038cd0b52d8d223f098b (patch)
tree11727b009f6de233817edf254bed9e6e02e07702 /core/DataTable/Filter/ColumnDelete.php
parentfe631813a815510a5a9a96a476deaab9444cb614 (diff)
Refs #4200, removed Null filter and documented many more filters.
Diffstat (limited to 'core/DataTable/Filter/ColumnDelete.php')
-rw-r--r--core/DataTable/Filter/ColumnDelete.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/core/DataTable/Filter/ColumnDelete.php b/core/DataTable/Filter/ColumnDelete.php
index 040862ddbf..540c7c783a 100644
--- a/core/DataTable/Filter/ColumnDelete.php
+++ b/core/DataTable/Filter/ColumnDelete.php
@@ -17,8 +17,20 @@ use Piwik\DataTable\Filter;
* Filter that will remove columns from a DataTable using either a blacklist,
* whitelist or both.
*
+ * This filter is used to handle the **hideColumn** and **showColumn** query parameters.
+ *
+ * **Basic usage example**
+ *
+ * $columnsToRemove = array('nb_hits', 'nb_pageviews');
+ * $dataTable->filter('ColumnDelete', array($columnsToRemove));
+ *
+ * $columnsToKeep = array('nb_visits');
+ * $dataTable->filter('ColumnDelete', array(array(), $columnsToKeep));
+ *
+ *
* @package Piwik
* @subpackage DataTable
+ * @api
*/
class ColumnDelete extends Filter
{
@@ -55,13 +67,13 @@ class ColumnDelete extends Filter
/**
* Constructor.
*
- * @param DataTable $table
+ * @param DataTable $table The DataTable instance that will eventually be filtered.
* @param array|string $columnsToRemove An array of column names or a comma-separated list of
- * column names. These columns will be removed.
+ * column names. These columns will be removed.
* @param array|string $columnsToKeep An array of column names that should be kept or a
- * comma-separated list of column names. Columns not in
- * this list will be removed.
- * @param bool $deleteIfZeroOnly
+ * comma-separated list of column names. Columns not in
+ * this list will be removed.
+ * @param bool $deleteIfZeroOnly If true, columns will be removed only if their value is 0.
*/
public function __construct($table, $columnsToRemove, $columnsToKeep = array(), $deleteIfZeroOnly = false)
{
@@ -141,4 +153,4 @@ class ColumnDelete extends Filter
}
}
}
-}
+} \ No newline at end of file