Piwik\DataTable\Filter\
Executes a filter for each row of a DataTable and generates a segment filter for each row.
Basic usage example
$dataTable->filter('AddSegmentByLabel', array('segmentName'));
$dataTable->filter('AddSegmentByLabel', array(array('segmentName1', 'segment2'), ';');
The class defines the following methods:
__construct()
— Generates a segment filter based on the label column and the given segment namesfilter()
ash; See AddSegmentByLabel.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()
Generates a segment filter based on the label column and the given segment names
It accepts the following parameter(s):
$table
(DataTable
) —
$segmentOrSegments
(string
|array
) —
Either one segment or an array of segments. If more than one segment is given a delimter has to be defined.
$delimiter
(string
) —
The delimiter by which the label should be splitted.filter()
See AddSegmentByLabel.
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.