summaryrefslogtreecommitdiff
path: root/src/web/core/model.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/core/model.php')
-rw-r--r--src/web/core/model.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/web/core/model.php b/src/web/core/model.php
new file mode 100644
index 0000000..8e105da
--- /dev/null
+++ b/src/web/core/model.php
@@ -0,0 +1,29 @@
+<?php /* Copyright (c) 2024 Freya Murphy */
+
+abstract class Model extends Component {
+
+ public static function get_base_data(?string $app = NULL): array
+ {
+ $data = array();
+ $data['title'] = lang('first_name');
+ $data['desc'] = lang('default_short_desc');
+ $data['css'] = array();
+
+ $style = $GLOBALS['style'];
+
+ if (!$app)
+ $app = CONTEXT['app'];
+
+ if (isset($style[$app])) {
+ $css = $style[$app];
+ if (!is_array($css))
+ $css = array($css);
+ else
+ $css = $style['app'];
+ $data['css'] = $css;
+ }
+
+ return $data;
+ }
+
+}