diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-01-29 06:48:23 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-02-13 08:23:10 +0300 |
commit | 8ef47c8e4a3fb0094b4b0c19df8ed18c58cf7a6f (patch) | |
tree | 162315afc7f5a5bc0c8840eff30251a76b665b6f /core/DataTable/Filter/AddSegmentValue.php | |
parent | ec8dc0f150d71b752188dac3d01d29950ae6f869 (diff) |
refs #4633 open segmented visitor log with one click on a row
Diffstat (limited to 'core/DataTable/Filter/AddSegmentValue.php')
-rw-r--r-- | core/DataTable/Filter/AddSegmentValue.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/core/DataTable/Filter/AddSegmentValue.php b/core/DataTable/Filter/AddSegmentValue.php new file mode 100644 index 0000000000..857bf02ce3 --- /dev/null +++ b/core/DataTable/Filter/AddSegmentValue.php @@ -0,0 +1,33 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ +namespace Piwik\DataTable\Filter; + +use Piwik\DataTable; + +/** + * Executes a filter for each row of a {@link DataTable} and generates a segment filter for each row. + * + * **Basic usage example** + * + * $dataTable->filter('AddSegmentValue', array()); + * $dataTable->filter('AddSegmentValue', array(function ($label) { + * $transformedValue = urldecode($transformedValue); + * return $transformedValue; + * }); + * + * @api + */ +class AddSegmentValue extends ColumnCallbackAddMetadata +{ + public function __construct($table, $callback = null) + { + parent::__construct($table, 'label', 'segmentValue', $callback, null, false); + } + +} |