From 695908c7ab2a5d5f011f616d2af3368da7131a6f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 22 Jan 2019 02:04:53 +0100 Subject: home columns and download function added --- app/class/modelhome.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app/class/modelhome.php') diff --git a/app/class/modelhome.php b/app/class/modelhome.php index 2efdef4..78e51ba 100644 --- a/app/class/modelhome.php +++ b/app/class/modelhome.php @@ -51,6 +51,23 @@ class Modelhome extends Modelart return $table2; } + + /** + * @var array array of the columns to show from the user + * + * @return array assoc each key columns to a boolean value to show or not + */ + public function setcolumns(array $columns) : array + { + foreach (Model::COLUMNS as $col) { + if(in_array($col, $columns)) { + $showcols[$col] = true; + } else { + $showcols[$col] = false; + } + } + return $showcols; + } } -- cgit v1.2.3