diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-22 12:15:41 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-22 12:15:41 +0400 |
commit | fe631813a815510a5a9a96a476deaab9444cb614 (patch) | |
tree | 8c22df40591a16448d0810ef95cdda88b0c31333 /core/DataTable/Filter/BeautifyTimeRangeLabels.php | |
parent | f3ff0cf91c2bfc4e1b6f52a81111aa84ce020952 (diff) |
Refs #4200, documented many more filters and modified ColumnCallbackDeleteRow so filter supplied returns true if the row should be deleted (as opposed to the other way around).
Diffstat (limited to 'core/DataTable/Filter/BeautifyTimeRangeLabels.php')
-rw-r--r-- | core/DataTable/Filter/BeautifyTimeRangeLabels.php | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/core/DataTable/Filter/BeautifyTimeRangeLabels.php b/core/DataTable/Filter/BeautifyTimeRangeLabels.php index b86c7d398d..4aae3caede 100644 --- a/core/DataTable/Filter/BeautifyTimeRangeLabels.php +++ b/core/DataTable/Filter/BeautifyTimeRangeLabels.php @@ -13,12 +13,20 @@ namespace Piwik\DataTable\Filter; use Piwik\DataTable; /** - * A DataTable filter replaces range labels that are in seconds with + * A DataTable filter that replaces range labels whose values are in seconds with * prettier, human-friendlier versions. * - * This filter customizes the behavior of the BeautifyRangeLabels filter - * so range values that span values that are less than one minute are - * displayed in seconds but other ranges are displayed in minutes. + * This filter customizes the behavior of the [BeautifyRangeLabels](#) filter + * so range values that are less than one minute are displayed in seconds but + * other ranges are displayed in minutes. + * + * **Basic usage** + * + * $dataTable->filter('BeautifyTimeRangeLabels', array("%1$s-%2$s min", "1 min", "%s min")); + * + * @package Piwik + * @subpackage DataTable + * @api */ class BeautifyTimeRangeLabels extends BeautifyRangeLabels { @@ -36,13 +44,13 @@ class BeautifyTimeRangeLabels extends BeautifyRangeLabels * * @param DataTable $table The DataTable this filter will run over. * @param string $labelSecondsPlural A string to use when beautifying range labels - * whose lower bound is between 0 and 60. Must be - * a format string that takes two numeric params. + * whose lower bound is between 0 and 60. Must be + * a format string that takes two numeric params. * @param string $labelMinutesSingular A string to use when replacing a range that - * equals 60-60 (or 1 minute - 1 minute). + * equals 60-60 (or 1 minute - 1 minute). * @param string $labelMinutesPlural A string to use when replacing a range that - * spans multiple minutes. This must be a - * format string that takes one string parameter. + * spans multiple minutes. This must be a + * format string that takes one string parameter. */ public function __construct($table, $labelSecondsPlural, $labelMinutesSingular, $labelMinutesPlural) { @@ -114,4 +122,4 @@ class BeautifyTimeRangeLabels extends BeautifyRangeLabels return sprintf($this->labelPlural, "" . floor($lowerBound / 60) . urlencode('+')); } } -} +}
\ No newline at end of file |