-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.php
41 lines (33 loc) · 886 Bytes
/
init.php
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
32
33
34
35
36
37
38
39
40
41
<?php defined('SYSPATH') OR die('No direct script access');
/**
* Hook class for the MASAS plugin
*
* PHP version 5
* @author Matthew Griffiths
* @package Swiftriver_Masas
* @copyright None
* @licence MIT
*/
class Masas_Init {
public function __construct()
{
// Register the plugin for sql running
Swiftriver_Plugins::register("masas", Masas::install());
// Hook into the settings page
Swiftriver_Event::add('swiftriver.settings.nav', array($this, 'settings_nav'));
}
/**
* Display link in the settings navigation
*
* @return void
*/
public function settings_nav()
{
$active = Swiftriver_Event::$data;
echo '<li '.(($active == 'masas') ? 'class="active"' : '').'>'.
HTML::anchor(URL::site('settings/masas'), __('MASAS Settings & Log')).
'</li>';
}
}
new Masas_Init;
?>