Piwik\DataTable\Filter\
Adds a summary row to DataTables that contains the sum of all other table rows.
Basic usage example
$dataTable->filter('AddSummaryRow');
// use a human readable label for the summary row (instead of '-1')
$dataTable->filter('AddSummaryRow', array($labelSummaryRow = Piwik::translate('General_Total')));
The class defines the following methods:
__construct()
— Constructor.filter()
— Executes the filter.enableRecursive()
ash; Enables/Disables recursive filtering. Inherited from BaseFilter
filterSubTable()
ash; Filters a row's subtable, if one exists and is loaded in memory. Inherited from BaseFilter
__construct()
Constructor.
It accepts the following parameter(s):
$table
(DataTable
) —
$labelSummaryRow
(int
) —
The value of the label column for the new row.
filter()
Executes the filter. See AddSummaryRow.
It accepts the following parameter(s):
$table
(DataTable
) —It does not return anything or a mixed result.
enableRecursive()
Enables/Disables recursive filtering. Whether this property is actually used is up to the derived BaseFilter class.
It accepts the following parameter(s):
$enable
(bool
) —It does not return anything or a mixed result.
filterSubTable()
Filters a row's subtable, if one exists and is loaded in memory.
$row
(Row
) —
The row whose subtable should be filter.