-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathelgg-plugin.php
101 lines (99 loc) · 2.46 KB
/
elgg-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
use Elgg\Router\Middleware\AjaxGatekeeper;
return [
'plugin' => [
'version' => '11.0.1',
'dependencies' => [
'search' => [
'position' => 'after',
],
'members' => [
'position' => 'after',
'must_be_active' => false,
],
],
],
'settings' => [
'combine_search_results' => 'no',
'query_required' => 'yes',
'enable_autocomplete' => 'yes',
'enable_autocomplete_content' => 'yes',
'enable_autocomplete_helpers' => 'yes',
],
'routes' => [
'autocomplete:search_advanced' => [
'path' => 'search_advanced/autocomplete',
'resource' => 'search_advanced/autocomplete',
'middleware' => [
AjaxGatekeeper::class,
],
],
],
'events' => [
'autocomplete' => [
'search_advanced' => [
'\ColdTrick\SearchAdvanced\Search::getAutocompleteUsers' => ['priority' => 100],
'\ColdTrick\SearchAdvanced\Search::getAutocompleteGroups' => ['priority' => 200],
],
],
'elgg.data' => [
'page' => [
'\ColdTrick\SearchAdvanced\Search::getAutocompleteHelpers' => [],
],
],
'index_entity_type_subtypes' => [
'opensearch' => [
'\ColdTrick\SearchAdvanced\Plugins\OpenSearch::unregisterPreventedSearchTypes' => [],
],
],
'ready' => [
'system' => [
'\ColdTrick\SearchAdvanced\Settings::disableSearchables' => [],
],
],
'search:config' => [
'search_types' => [
'\ColdTrick\SearchAdvanced\Search::getSearchTypes' => [],
],
],
'search:fields' => [
'group' => [
'\ColdTrick\SearchAdvanced\Search::cleanupGroupMetadataFields' => ['priority' => 999],
],
'user' => [
'\ColdTrick\SearchAdvanced\Search::cleanupUserMetadataFields' => ['priority' => 999],
],
],
'search:options' => [
'user' => [
'\ColdTrick\SearchAdvanced\Search::sanitizeProfileFieldFilter' => ['priority' => 1],
'\ColdTrick\SearchAdvanced\Search::searchUserProfileFilter' => [],
],
],
'search:params' => [
'all' => [
'\ColdTrick\SearchAdvanced\Search::allowEmptyQuery' => [],
'\ColdTrick\SearchAdvanced\Search::allowEmptyQueryWithProfileSearch' => ['priority' => 400],
],
],
'setting' => [
'plugin' => [
'\ColdTrick\SearchAdvanced\Settings::saveArrayTypeSetting' => [],
],
],
],
'widgets' => [
'search' => [
'context' => ['admin', 'profile', 'dashboard', 'index', 'groups'],
'multiple' => true,
],
'search_user' => [
'context' => ['admin', 'dashboard', 'index', 'groups'],
],
],
'view_extensions' => [
'elgg.css' => [
'css/search_advanced.css' => [],
],
],
];