summaryrefslogtreecommitdiffstats
path: root/doc/main_page_warnings
diff options
context:
space:
mode:
authorChristian Klinger2016-06-15 16:43:17 +0200
committerChristian Klinger2016-06-15 16:43:17 +0200
commit2b18d0d0c49c3a75bd221ab86b7315f7bae98008 (patch)
tree7d44e103224c1a79e8ccdd5d0313f76180847303 /doc/main_page_warnings
parentsmall style changes (diff)
parent[sysconfignew] Move css from global file to module specific one (diff)
downloadslx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.tar.gz
slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.tar.xz
slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.zip
Merge branch 'modularization' of git.openslx.org:openslx-ng/slx-admin into modularization
Conflicts: install/content.sql install/schema.sql
Diffstat (limited to 'doc/main_page_warnings')
-rw-r--r--doc/main_page_warnings17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/main_page_warnings b/doc/main_page_warnings
new file mode 100644
index 00000000..e69a6125
--- /dev/null
+++ b/doc/main_page_warnings
@@ -0,0 +1,17 @@
+The warning messages that can appear on the main site (after logging in)
+can be added by hooks now, too, so the page.inc.php of the "main" module
+doesn't contain code specific to a dozen other modules.
+
+If you want to add a hook, create a file in your module:
+./modules/<module>/hooks/main-warning.inc.php
+The file contains flat code, no classes or functions. You should
+do your checks, and then call Message::addError (or the likes).
+You could also render your own template if you feel fancy.
+Remember you're running in the context of the main module, so your
+message ID should use the full syntax module.id, or add your
+module's name to the Render::addTemplate call.
+
+If you also want to enable the "configuration incomplete" global
+warning, set $needSetup to true.
+
+See modules "vmstore", "minilinux" or "sysconfig" for an example.