aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/test/start.php26
-rw-r--r--mod/test/views/default/testplugin/pageshell.php1
2 files changed, 27 insertions, 0 deletions
diff --git a/mod/test/start.php b/mod/test/start.php
new file mode 100644
index 000000000..2eedf6431
--- /dev/null
+++ b/mod/test/start.php
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Test plugin
+ *
+ * These parameters are required for the event API, but we won't use them:
+ *
+ * @param unknown_type $event
+ * @param unknown_type $object_type
+ * @param unknown_type $object
+ */
+
+ function test_init($event, $object_type, $object = null) {
+
+ global $CONFIG;
+
+ // Let's add to the pageshell view.
+ extend_view("pageshell", "testplugin/pageshell");
+ set_view_location("testplugin/pageshell",$CONFIG->pluginspath . "test/views/");
+
+ }
+
+ // Make sure test_init is called on initialisation
+ register_event_handler('init','system','test_init');
+
+?> \ No newline at end of file
diff --git a/mod/test/views/default/testplugin/pageshell.php b/mod/test/views/default/testplugin/pageshell.php
new file mode 100644
index 000000000..889fba661
--- /dev/null
+++ b/mod/test/views/default/testplugin/pageshell.php
@@ -0,0 +1 @@
+<p><i>Gosh! This view was added to!</i></p> \ No newline at end of file