1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 23:17:46 +00:00
Files
Michal Kleiner 9a3ef94df6 [Coding Style] Enable rule PSR12.Files.FileHeader + unify file headers (#22132)
* [Coding Style] Enable rule PSR12.Files.FileHeader

* Apply CS

* Replace Piwik with Matomo in file headers

* Unify file headers (position, no. of lines, https links)

* Rebuild dist files

* Apply CS

* Fix system test that relies on line numbers in a file that had the file header updated

---------

Co-authored-by: Stefan Giehl <stefan@matomo.org>
2024-04-20 20:50:47 +02:00

71 خطوط
2.0 KiB
PHP

<?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
use Piwik\Common;
use Piwik\Config as PiwikConfig;
use Piwik\Metrics;
use Piwik\ViewDataTable\RequestConfig as VisualizationRequestConfig;
/**
* DataTable Visualization that derives from HtmlTable and sets show_extra_columns to true.
*/
class RequestConfig extends VisualizationRequestConfig
{
/**
* Controls whether the summary row is displayed on every page of the datatable view or not.
* If false, the summary row will be treated as the last row of the dataset and will only visible
* when viewing the last rows.
*
* Default value: false
*/
public $keep_summary_row = false;
/**
* Controls whether the totals row is displayed on every page of the datatable view or not.
*
* Default value: false
*/
public $keep_totals_row = false;
public function __construct()
{
$this->totals = true;
$this->filter_limit = PiwikConfig::getInstance()->General['datatable_default_limit'];
if (Common::getRequestVar('enable_filter_excludelowpop', false) == '1') {
if (Common::getRequestVar('flat', 0, 'int') === 1) {
$this->filter_excludelowpop = 'nb_visits';
} else {
$this->filter_excludelowpop = Metrics::INDEX_NB_VISITS;
}
$this->filter_excludelowpop_value = false;
}
$this->addPropertiesThatShouldBeAvailableClientSide(array(
'search_recursive',
'filter_limit',
'filter_offset',
'filter_sort_column',
'filter_sort_order',
'keep_summary_row',
'keep_totals_row',
'show_dimensions'
));
$this->addPropertiesThatCanBeOverwrittenByQueryParams(array(
'keep_summary_row',
'keep_totals_row',
'show_dimensions',
));
}
}