PHP Класс Piwik\DataTable\Filter\ColumnDelete

This filter is used to handle the **hideColumn** and **showColumn** query parameters. **Basic usage example** $columnsToRemove = array('nb_hits', 'nb_pageviews'); $dataTable->filter('ColumnDelete', array($columnsToRemove)); $columnsToKeep = array('nb_visits'); $dataTable->filter('ColumnDelete', array(array(), $columnsToKeep));
Наследование: extends Piwik\DataTable\BaseFilter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( DataTable $table, array | string $columnsToRemove, array | string $columnsToKeep = [], boolean $deleteIfZeroOnly = false ) Constructor.
filter ( DataTable $table ) : DataTable See {@link ColumnDelete}.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( DataTable $table, array | string $columnsToRemove, array | string $columnsToKeep = [], boolean $deleteIfZeroOnly = false )
$table Piwik\DataTable The DataTable instance that will eventually be filtered.
$columnsToRemove array | string An array of column names or a comma-separated list of column names. These columns will be removed.
$columnsToKeep array | string An array of column names that should be kept or a comma-separated list of column names. Columns not in this list will be removed.
$deleteIfZeroOnly boolean If true, columns will be removed only if their value is 0.

filter() публичный Метод

See {@link ColumnDelete}.
public filter ( DataTable $table ) : DataTable
$table Piwik\DataTable
Результат Piwik\DataTable