aboutsummaryrefslogtreecommitdiff
path: root/mod/test/start.php
blob: f406b8abbf437674f4115f72919f2741d1508e8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?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/");
			
			// Test menu item
				add_menu("Test plugin",$CONFIG->wwwroot . "mod/test/",array(
					menu_item("Main test plugin page",$CONFIG->wwwroot."mod/test/"),
												));
				
		}

	// Make sure test_init is called on initialisation
		register_event_handler('init','system','test_init');
		
?>