diff options
Diffstat (limited to 'core/ViewDataTable/Config.php')
-rw-r--r-- | core/ViewDataTable/Config.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/ViewDataTable/Config.php b/core/ViewDataTable/Config.php index 2ccd975c7b..0eb99aa9f5 100644 --- a/core/ViewDataTable/Config.php +++ b/core/ViewDataTable/Config.php @@ -502,6 +502,7 @@ class Config $this->loadDocumentation(); $this->setShouldShowPivotBySubtable(); + $this->setShouldShowFlattener(); } /** Load documentation from the API */ @@ -755,6 +756,15 @@ class Config } } + private function setShouldShowFlattener() + { + $report = ReportsProvider::factory($this->controllerName, $this->controllerAction); + + if ($report && !$report->supportsFlatten()) { + $this->show_flatten_table = false; + } + } + public function disablePivotBySubtableIfTableHasNoSubtables(DataTable $table) { foreach ($table->getRows() as $row) { |