-
Notifications
You must be signed in to change notification settings - Fork 1
/
NotifierPlugin.php
52 lines (43 loc) · 1.06 KB
/
NotifierPlugin.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
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace Craft;
class NotifierPlugin extends BasePlugin
{
function init()
{
require CRAFT_PLUGINS_PATH .'/notifier/vendor/autoload.php';
parent::init();
}
function getName()
{
return Craft::t('Notifier');
}
function getVersion()
{
return '1.0';
}
function getDeveloper()
{
return 'Paramore | The digital agency';
}
function getDeveloperUrl()
{
return 'http://paramoredigital.com';
}
protected function defineSettings()
{
return array(
'defaultNotifier' => array(AttributeType::String),
'airbrakeApiEndpoint' => array(AttributeType::String),
'airbrakeApiKey' => array(AttributeType::String)
);
}
public function getSettingsHtml()
{
return craft()->templates->render('notifier/settings', array('settings' => $this->getSettings()));
}
public function sendToNotifier($message)
{
craft()->notifier->sendString($message);
}
}
/* End of NotifierPlugin.php */