-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathelgg-plugin.php
157 lines (150 loc) · 4.38 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
use ColdTrick\ProfileManager\Bootstrap;
$composer_path = '';
if (is_dir(__DIR__ . '/vendor')) {
$composer_path = __DIR__ . '/';
}
require_once(dirname(__FILE__) . '/lib/functions.php');
return [
'plugin' => [
'version' => '22.0.3',
'dependencies' => [
'profile' => ['position' => 'after'],
],
],
'bootstrap' => Bootstrap::class,
'settings' => [
'generate_username_from_email' => 'no',
'show_account_hints' => 'no',
'profile_icon_on_register' => 'no',
'hide_profile_type_default' => 'no',
'simple_access_control' => 'no',
'edit_profile_mode' => 'list',
'profile_type_selection' => 'user',
'show_profile_type_on_profile' => 'no',
'display_categories' => 'plain',
'enable_profile_completeness_widget' => 'no',
],
'upgrades' => [
\ColdTrick\ProfileManager\Upgrades\MigrateOldFieldTypes::class,
],
'entities' => [
[
'type' => 'object',
'subtype' => 'custom_profile_field',
'class' => '\ColdTrick\ProfileManager\CustomProfileField',
'capabilities' => [
'commentable' => false,
],
],
[
'type' => 'object',
'subtype' => 'custom_group_field',
'class' => '\ColdTrick\ProfileManager\CustomGroupField',
'capabilities' => [
'commentable' => false,
],
],
[
'type' => 'object',
'subtype' => 'custom_profile_type',
'class' => '\ColdTrick\ProfileManager\CustomProfileType',
'capabilities' => [
'commentable' => false,
],
],
[
'type' => 'object',
'subtype' => 'custom_profile_field_category',
'class' => '\ColdTrick\ProfileManager\CustomFieldCategory',
'capabilities' => [
'commentable' => false,
],
],
],
'actions' => [
'profile_manager/change_category' => ['access' => 'admin'],
'profile_manager/import_existing' => ['access' => 'admin'],
'profile_manager/new' => ['access' => 'admin'],
'profile_manager/reorder' => ['access' => 'admin'],
'profile_manager/reset' => ['access' => 'admin'],
'profile_manager/toggle_option' => ['access' => 'admin'],
'profile_manager/configuration/backup' => ['access' => 'admin'],
'profile_manager/configuration/restore' => ['access' => 'admin'],
'profile_manager/categories/add' => ['access' => 'admin'],
'profile_manager/categories/reorder' => ['access' => 'admin'],
'profile_manager/profile_types/add' => ['access' => 'admin'],
],
'events' => [
'create' => [
'user' => [
'\ColdTrick\ProfileManager\Users::createUserByAdmin' => [],
'\ColdTrick\ProfileManager\Users::createUserByRegister' => [],
],
],
'fields' => [
'user:user' => [
'\ColdTrick\ProfileManager\ProfileFields::getFields' => [],
],
'group:group' => [
'\ColdTrick\ProfileManager\ProfileFields::getFields' => [],
],
],
'handlers' => [
'widgets' => [
'\ColdTrick\ProfileManager\Widgets::registerProfileCompleteness' => [],
],
],
'register' => [
'menu:admin_header' => [
'\ColdTrick\ProfileManager\Menus\AdminHeader::registerGroupFields' => [],
],
'menu:profile_fields' => [
'\ColdTrick\ProfileManager\Menus\ProfileFields::registerActions' => [],
],
],
'types:custom_group_field' => [
'profile_manager' => [
'\ColdTrick\ProfileManager\ProfileFields::registerGroupProfileFieldTypes' => [],
],
],
'types:custom_profile_field' => [
'profile_manager' => [
'\ColdTrick\ProfileManager\ProfileFields::registerUserProfileFieldTypes' => [],
],
],
],
'views' => [
'default' => [
'jquery/multiselect.mjs' => $composer_path . 'vendor/bower-asset/jquery-ui-multiselect-widget/src/jquery.multiselect.js',
'jquery/multiselect.css' => $composer_path . 'vendor/bower-asset/jquery-ui-multiselect-widget/css/jquery.multiselect.css',
],
],
'view_extensions' => [
'admin.css' => [
'profile_manager/admin.css' => [],
],
'elgg.css' => [
'profile_manager/site.css' => [],
],
'forms/register' => [
'profile_manager/register/free_text' => ['priority' => 400],
],
'input/multiselect.css' => [
'jquery/multiselect.css' => ['priority' => 100],
],
'forms/useradd' => [
'profile_manager/admin/useradd' => [],
],
'register/extend' => [
'profile_manager/register/fields' => [],
],
],
'view_options' => [
'forms/profile_manager/type' => ['ajax' => true],
'forms/profile_manager/category' => ['ajax' => true],
'forms/profile_manager/group_field' => ['ajax' => true],
'forms/profile_manager/profile_field' => ['ajax' => true],
'forms/profile_manager/restore_fields' => ['ajax' => true],
],
];