aboutsummaryrefslogtreecommitdiff
path: root/app/class/modelhome.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-22 02:04:53 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-22 02:04:53 +0100
commit695908c7ab2a5d5f011f616d2af3368da7131a6f (patch)
treecbd6c2a43495e77863d3611e2f6b12985b1111d8 /app/class/modelhome.php
parenta8ed9070e7773f3147a33dbee7d45ce24bd8959d (diff)
downloadwcms-695908c7ab2a5d5f011f616d2af3368da7131a6f.tar.gz
wcms-695908c7ab2a5d5f011f616d2af3368da7131a6f.zip
home columns and download function added
Diffstat (limited to 'app/class/modelhome.php')
-rw-r--r--app/class/modelhome.php17
1 files changed, 17 insertions, 0 deletions
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;
+ }
}