aboutsummaryrefslogtreecommitdiff
path: root/app/class/modelhome.php
diff options
context:
space:
mode:
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;
+ }
}