-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.php
executable file
·60 lines (53 loc) · 1.59 KB
/
Plugin.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
53
54
55
56
57
58
59
60
<?php
namespace MoonWalkerz\Contact;
use System\Classes\PluginBase;
use System\Classes\MailManager;
class Plugin extends PluginBase
{
public $require = ['RainLab.Translate'];
public function registerComponents()
{
return [
'MoonWalkerz\Contact\Components\ContactForm' => 'contactform',
// 'MoonWalkerz\Contact\Components\NewsletterForm' => 'newsletterform',
];
}
public function registerPageSnippets()
{
return [
'MoonWalkerz\Contact\Components\ContactForm' => 'contactform',
// 'MoonWalkerz\Contact\Components\NewsletterForm' => 'newsletterform',
];
}
/**
* registerMailer templates
*/
public function register()
{
MailManager::registerCallback(function ($manager) {
$manager->registerMailTemplates([
'moonwalkerz.contact::mail.message',
]);
});
}
/**
* Registers any back-end settings.
*
* @return array
*/
public function registerSettings()
{
return [
'config' => [
'label' => 'moonwalkerz.contact::lang.plugin.name',
'description' => 'moonwalkerz.contact::lang.plugin.manage_settings',
'category' => 'system::lang.system.categories.cms',
'icon' => 'icon-envelope',
'class' => 'MoonWalkerz\Contact\Models\Settings',
'order' => 500,
'keywords' => 'search',
'permissions' => ['moonwalkerz.contact.manage_settings'],
],
];
}
}