summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-27 19:17:12 +0200
committerSimon Rettberg2016-10-27 19:17:12 +0200
commit18d4892a0cb1b24402829584cfd212a0e9898f2e (patch)
treeeaa3a679d4ddcf75c48c4fda2e74c6dc8e64bf81 /modules-available/locationinfo/page.inc.php
parent[sysconfig] Improve binddn parsing for AD wizard (diff)
downloadslx-admin-18d4892a0cb1b24402829584cfd212a0e9898f2e.tar.gz
slx-admin-18d4892a0cb1b24402829584cfd212a0e9898f2e.tar.xz
slx-admin-18d4892a0cb1b24402829584cfd212a0e9898f2e.zip
[locationinfo] Skeleton for new module
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
-rw-r--r--modules-available/locationinfo/page.inc.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
new file mode 100644
index 00000000..ff73107a
--- /dev/null
+++ b/modules-available/locationinfo/page.inc.php
@@ -0,0 +1,30 @@
+<?php
+
+class Page_LocationInfo extends Page
+{
+
+ /**
+ * Called before any page rendering happens - early hook to check parameters etc.
+ */
+ protected function doPreprocess()
+ {
+ User::load();
+
+ if (!User::isLoggedIn()) {
+ Message::addError('main.no-permission');
+ Util::redirect('?do=Main'); // does not return
+ }
+ }
+
+ /**
+ * Menu etc. has already been generated, now it's time to generate page content.
+ */
+ protected function doRender()
+ {
+ Render::addTemplate('_page', array(
+ 'foo' => 'bar',
+ 'now' => date('d.m.Y H:i:s')
+ ));
+ }
+
+}