Piwik\DataTable\Filter\
Deletes all rows for which a callback returns true.
Basic usage example
$labelsToRemove = array('label1', 'label2', 'label2');
$dataTable->filter('ColumnCallbackDeleteRow', array('label', function ($label) use ($labelsToRemove) {
return in_array($label, $labelsToRemove);
}));
The class defines the following methods:
__construct() — Constructor.filter() — Filters the given data tableenableRecursive() ash; Enables/Disables recursive filtering. Inherited from BaseFilterfilterSubTable() 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) —
$columnsToFilter (array|string) —
The column or array of columns that should be passed to the callback.
$function (Piwik\DataTable\Filter\callback) —
The callback that determines whether a row should be deleted or not. Should return true if the row should be deleted.$functionParams (array) —
deprecated - use an anonymous function instead.filter()Filters the given data table
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.