diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-22 17:01:58 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-23 02:40:12 +0400 |
commit | ad1e01757ebb3c44caec98117b75e6f7179ff198 (patch) | |
tree | b058f479ca104bac1cf5beb94abcdace715b7f29 /core/DataTable/Filter/Sort.php | |
parent | 0550fb10e93cfa4b116b28b7853e06d37733c392 (diff) |
Refs #4200, document rest of DataTable filters.
Diffstat (limited to 'core/DataTable/Filter/Sort.php')
-rw-r--r-- | core/DataTable/Filter/Sort.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php index 9078c65f08..2bf4c0ba41 100644 --- a/core/DataTable/Filter/Sort.php +++ b/core/DataTable/Filter/Sort.php @@ -17,11 +17,12 @@ use Piwik\DataTable; use Piwik\Metrics; /** - * Sort the DataTable based on the value of column $columnToSort ordered by $order. + * Sorts a DataTable based on the value of a specific column. * Possible to specify a natural sorting (see php.net/natsort for details) * * @package Piwik * @subpackage DataTable + * @api */ class Sort extends Filter { @@ -29,11 +30,13 @@ class Sort extends Filter protected $order; /** - * @param DataTable $table - * @param string $columnToSort name of the column to sort by - * @param string $order order (asc|desc) - * @param bool $naturalSort use natural sort? - * @param bool $recursiveSort sort recursively? + * Constructor. + * + * @param DataTable $table The table to eventually filter. + * @param string $columnToSort The name of the column to sort by. + * @param string $order order `'asc'` or `'desc'`. + * @param bool $naturalSort Whether to use a natural sort or not (see [http://php.net/natsort](#http://php.net/natsort)). + * @param bool $recursiveSort Whether to sort all subtables or not. */ public function __construct($table, $columnToSort, $order = 'desc', $naturalSort = true, $recursiveSort = false) { @@ -218,4 +221,4 @@ class Sort extends Filter } $table->sort(array($this, $methodToUse), $this->columnToSort); } -} +}
\ No newline at end of file |