private function removeEmptyColumns(&$columns, &$reportMetadata, $dataTable)
    {
        $emptyColumns = $dataTable->getMetadata(DataTable::EMPTY_COLUMNS_METADATA_NAME);

        if (!is_array($emptyColumns)) {
            return;
        }

        $columnsToRemove = $this->getColumnsToRemove();
        $columnsToKeep   = $this->getColumnsToKeep();

        $columns = $this->hideShowMetricsWithParams($columns, $columnsToRemove, $columnsToKeep, $emptyColumns);

        if (isset($reportMetadata['metrics'])) {
            $reportMetadata['metrics'] = $this->hideShowMetricsWithParams($reportMetadata['metrics'], $columnsToRemove, $columnsToKeep, $emptyColumns);
        }

        if (isset($reportMetadata['metricsDocumentation'])) {
            $reportMetadata['metricsDocumentation'] = $this->hideShowMetricsWithParams($reportMetadata['metricsDocumentation'], $columnsToRemove, $columnsToKeep, $emptyColumns);
        }
    }
private function removeEmptyColumns(&$columns, &$reportMetadata, $dataTable)
    {
        $emptyColumns = $dataTable->getMetadata(DataTable::EMPTY_COLUMNS_METADATA_NAME);

        if (!is_array($emptyColumns)) {
            return;
        }

        $columnsToRemove = $this->getColumnsToRemove();
        $columnsToKeep   = $this->getColumnsToKeep();

        $columns = $this->hideShowMetricsWithParams($columns, $columnsToRemove, $columnsToKeep, $emptyColumns);

        if (isset($reportMetadata['metrics'])) {
            $reportMetadata['metrics'] = $this->hideShowMetricsWithParams($reportMetadata['metrics'], $columnsToRemove, $columnsToKeep, $emptyColumns);
        }

        if (isset($reportMetadata['metricsDocumentation'])) {
            $reportMetadata['metricsDocumentation'] = $this->hideShowMetricsWithParams($reportMetadata['metricsDocumentation'], $columnsToRemove, $columnsToKeep, $emptyColumns);
        }
    }
private function removeEmptyColumns ( & $ columns , & $ reportMetadata , $ dataTable ) { $ emptyColumns = $ dataTable -> getMetadata ( DataTable :: EMPTY_COLUMNS_METADATA_NAME ) ; if ( ! is_array ( $ emptyColumns ) ) { return ; } $ columnsToRemove = $ this -> getColumnsToRemove ( ) ; $ columnsToKeep = $ this -> getColumnsToKeep ( ) ; $ columns = $ this -> hideShowMetricsWithParams ( $ columns , $ columnsToRemove , $ columnsToKeep , $ emptyColumns ) ; if ( isset ( $ reportMetadata [ 'metrics' ] ) ) { $ reportMetadata [ 'metrics' ] = $ this -> hideShowMetricsWithParams ( $ reportMetadata [ 'metrics' ] , $ columnsToRemove , $ columnsToKeep , $ emptyColumns ) ; } if ( isset ( $ reportMetadata [ 'metricsDocumentation' ] ) ) { $ reportMetadata [ 'metricsDocumentation' ] = $ this -> hideShowMetricsWithParams ( $ reportMetadata [ 'metricsDocumentation' ] , $ columnsToRemove , $ columnsToKeep , $ emptyColumns ) ; } }
Removes metrics from the list of columns and the report meta data if they are marked empty
in the data table meta data.
Removes metrics from the list of columns and the report meta data if they are marked empty in the data table meta data .