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 12:15:41 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2013-10-22 12:15:41 +0400
commitfe631813a815510a5a9a96a476deaab9444cb614 (patch)
tree8c22df40591a16448d0810ef95cdda88b0c31333 /core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
parentf3ff0cf91c2bfc4e1b6f52a81111aa84ce020952 (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/ColumnCallbackAddColumnPercentage.php')
-rw-r--r--core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php b/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
index 689a64a204..efbf00e92d 100644
--- a/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
+++ b/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
@@ -13,24 +13,24 @@ namespace Piwik\DataTable\Filter;
use Piwik\Piwik;
/**
- * Add a new column to the table which is a percentage based on the value resulting
- * from a callback function with the parameter being another column's value
+ * Calculates a percentage value for each row of a DataTable and adds the result
+ * to each row.
+ *
+ * See [ColumnCallbackAddColumnQuotient](#) for more information.
*
- * For example in the keywords table, we can create a "nb_visits_percentage" column
- * from the "nb_visits" column that will be nb_visits / $totalValueUsedToComputePercentage
- * You can also specify the precision of the percentage value to be displayed (defaults to 0, eg "11%")
- *
- * Usage:
- * $nbVisits = API::getInstance()->getVisits($idSite, $period, $date);
- * $dataTable->queueFilter('ColumnCallbackAddColumnPercentage', array('nb_visits', 'nb_visits_percentage', $nbVisits, 1));
+ * **Basic usage example**
+ *
+ * $nbVisits = // ... get the visits for a period ...
+ * $dataTable->queueFilter('ColumnCallbackAddColumnPercentage', array('nb_visits', 'nb_visits_percentage', $nbVisits, 1));
*
* @package Piwik
* @subpackage DataTable
+ * @api
*/
class ColumnCallbackAddColumnPercentage extends ColumnCallbackAddColumnQuotient
{
/**
- * Formats the given value
+ * Formats the given value as a percentage.
*
* @param number $value
* @param number $divisor