PHP Class Piwik\API\DataTableGenericFilter

Show file Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
__construct ( $request, $report ) Constructor
areProcessedMetricsNeededFor ( $metrics )
disableFilters ( string[] $filterNames ) Makes sure a set of filters are not run.
filter ( DataTable $table ) Filters the given data table
getGenericFiltersInformation ( ) : array Returns an array containing the information of the generic Filter to be applied automatically to the data resulting from the API calls.

Protected Methods

Method Description
applyGenericFilters ( DataTable $datatable ) : boolean Apply generic filters to the DataTable object resulting from the API Call.

Private Methods

Method Description
containsProcessedMetric ( Piwik\Plugin\ProcessedMetric[] $metrics, string $name ) : boolean
getGenericFiltersHavingDefaultValues ( )

Method Details

__construct() public method

Constructor
public __construct ( $request, $report )
$request

applyGenericFilters() protected method

Disable this feature by setting the parameter disable_generic_filters to 1 in the API call request.
protected applyGenericFilters ( DataTable $datatable ) : boolean
$datatable Piwik\DataTable
return boolean

areProcessedMetricsNeededFor() public method

public areProcessedMetricsNeededFor ( $metrics )

disableFilters() public method

Makes sure a set of filters are not run.
public disableFilters ( string[] $filterNames )
$filterNames string[] The name of each filter to disable.

filter() public method

Filters the given data table
public filter ( DataTable $table )
$table Piwik\DataTable

getGenericFiltersInformation() public static method

Order to apply the filters: 1 - Filter that remove filtered rows 2 - Filter that sort the remaining rows 3 - Filter that keep only a subset of the results 4 - Presentation filters
public static getGenericFiltersInformation ( ) : array
return array See the code for spec