-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathPlugin.php
60 lines (54 loc) · 1.41 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 PKleindienst\BlogSearch;
use System\Classes\PluginBase;
/**
* blogSearch Plugin Information File
*/
class Plugin extends PluginBase
{
/**
* @var array Plugin dependencies
*/
public $require = ['RainLab.Blog'];
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'Blog Search',
'description' => 'Adds a search function to the blog',
'author' => 'Pascal Kleindienst',
'icon' => 'icon-search',
'homepage' => 'https://github.com/PascalKleindienst/october-blogsearch-extension'
];
}
/**
* @return array
*/
public function registerComponents()
{
return [
'PKleindienst\BlogSearch\Components\SearchForm' => 'searchForm',
'PKleindienst\BlogSearch\Components\SearchResult' => 'searchResult'
];
}
/**
* Register new Twig variables
* @return array
*/
public function registerMarkupTags()
{
// Check the translate plugin is installed
if (class_exists('RainLab\Translate\Behaviors\TranslatableModel')) {
return [];
}
return [
'filters' => [
'_' => ['Lang', 'get'],
'__' => ['Lang', 'choice']
]
];
}
}