Column name 'revenue' causes different layout for this column


#1

I’m developing my own plugin, retrieving data from a external/foreign database.

The plugin retrieves revenue values from the external source and these values are stored in a column named “revenue”. In the controller the data are displayed with

$view = ViewDataTableFactory::build(‘table’, $apiAction, $controllerAction);
$view->config->columns_to_display = array(‘revenue’, …

return $view->render();

It seem that the name “revenue” is causing a very specific formating of this column. Renaming the column to eg. revenue123 leads to the default layout.

Is this behavior planned or a bug?
Are there more special column names?

Thanks in advance
Joachim


(Matthieu Aubry) #2

Good point, yes Revenue leads to special treatment. You can see other values with special treatment here: matomo/Metrics.php at master · matomo-org/matomo · GitHub