27
27
*/
28
28
class CommunityAdmin extends Admin
29
29
{
30
- public const BLACKLIST_ITEM_SECURITY_CONTEXT = 'sulu.community.blacklist_items ' ;
31
- public const BLACKLIST_ITEM_LIST_VIEW = 'sulu_community.blacklist_item ' ;
32
- public const BLACKLIST_ITEM_ADD_FORM_VIEW = 'sulu_community.blacklist_item .add_form ' ;
33
- public const BLACKLIST_ITEM_EDIT_FORM_VIEW = 'sulu_community.blacklist_item .edit_form ' ;
30
+ public const REGISTRATION_RULE_ITEM_SECURITY_CONTEXT = 'sulu.community.registration_rule_items ' ;
31
+ public const REGISTRATION_RULE_ITEM_LIST_VIEW = 'sulu_community.registration_rule_item ' ;
32
+ public const REGISTRATION_RULE_ITEM_ADD_FORM_VIEW = 'sulu_community.registration_rule_item .add_form ' ;
33
+ public const REGISTRATION_RULE_ITEM_EDIT_FORM_VIEW = 'sulu_community.registration_rule_item .edit_form ' ;
34
34
35
35
/**
36
36
* @var SecurityCheckerInterface
@@ -69,10 +69,10 @@ public function __construct(
69
69
70
70
public function configureNavigationItems (NavigationItemCollection $ navigationItemCollection ): void
71
71
{
72
- if ($ this ->securityChecker ->hasPermission (static ::BLACKLIST_ITEM_SECURITY_CONTEXT , PermissionTypes::VIEW )) {
73
- $ tags = new NavigationItem ('sulu_community.blacklist ' );
72
+ if ($ this ->securityChecker ->hasPermission (static ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT , PermissionTypes::VIEW )) {
73
+ $ tags = new NavigationItem ('sulu_community.registration_rule ' );
74
74
$ tags ->setPosition (40 );
75
- $ tags ->setView (static ::BLACKLIST_ITEM_LIST_VIEW );
75
+ $ tags ->setView (static ::REGISTRATION_RULE_ITEM_LIST_VIEW );
76
76
77
77
$ navigationItemCollection ->get (Admin::SETTINGS_NAVIGATION_ITEM )->addChild ($ tags );
78
78
}
@@ -83,61 +83,61 @@ public function configureViews(ViewCollection $viewCollection): void
83
83
$ formToolbarActions = [];
84
84
$ listToolbarActions = [];
85
85
86
- if ($ this ->securityChecker ->hasPermission (static ::BLACKLIST_ITEM_SECURITY_CONTEXT , PermissionTypes::ADD )) {
86
+ if ($ this ->securityChecker ->hasPermission (static ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT , PermissionTypes::ADD )) {
87
87
$ listToolbarActions [] = new ToolbarAction ('sulu_admin.add ' );
88
88
}
89
89
90
- if ($ this ->securityChecker ->hasPermission (static ::BLACKLIST_ITEM_SECURITY_CONTEXT , PermissionTypes::EDIT )) {
90
+ if ($ this ->securityChecker ->hasPermission (static ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT , PermissionTypes::EDIT )) {
91
91
$ formToolbarActions [] = new ToolbarAction ('sulu_admin.save ' );
92
92
}
93
93
94
- if ($ this ->securityChecker ->hasPermission (static ::BLACKLIST_ITEM_SECURITY_CONTEXT , PermissionTypes::DELETE )) {
94
+ if ($ this ->securityChecker ->hasPermission (static ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT , PermissionTypes::DELETE )) {
95
95
$ formToolbarActions [] = new ToolbarAction ('sulu_admin.delete ' );
96
96
$ listToolbarActions [] = new ToolbarAction ('sulu_admin.delete ' );
97
97
}
98
98
99
- if ($ this ->securityChecker ->hasPermission (static ::BLACKLIST_ITEM_SECURITY_CONTEXT , PermissionTypes::VIEW )) {
99
+ if ($ this ->securityChecker ->hasPermission (static ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT , PermissionTypes::VIEW )) {
100
100
$ listToolbarActions [] = new ToolbarAction ('sulu_admin.export ' );
101
101
}
102
102
103
- if ($ this ->securityChecker ->hasPermission (static ::BLACKLIST_ITEM_SECURITY_CONTEXT , PermissionTypes::EDIT )) {
103
+ if ($ this ->securityChecker ->hasPermission (static ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT , PermissionTypes::EDIT )) {
104
104
$ viewCollection ->add (
105
- $ this ->viewBuilderFactory ->createListViewBuilder (static ::BLACKLIST_ITEM_LIST_VIEW , '/blacklist ' )
106
- ->setResourceKey ('blacklist_items ' )
107
- ->setListKey ('blacklist_items ' )
105
+ $ this ->viewBuilderFactory ->createListViewBuilder (static ::REGISTRATION_RULE_ITEM_LIST_VIEW , '/blacklist ' )
106
+ ->setResourceKey ('registration_rule_items ' )
107
+ ->setListKey ('registration_rule_items ' )
108
108
->setTitle ('sulu_community.blacklist ' )
109
109
->addListAdapters (['table ' ])
110
- ->setAddView (static ::BLACKLIST_ITEM_ADD_FORM_VIEW )
111
- ->setEditView (static ::BLACKLIST_ITEM_EDIT_FORM_VIEW )
110
+ ->setAddView (static ::REGISTRATION_RULE_ITEM_ADD_FORM_VIEW )
111
+ ->setEditView (static ::REGISTRATION_RULE_ITEM_EDIT_FORM_VIEW )
112
112
->addToolbarActions ($ listToolbarActions )
113
113
);
114
114
$ viewCollection ->add (
115
- $ this ->viewBuilderFactory ->createResourceTabViewBuilder (static ::BLACKLIST_ITEM_ADD_FORM_VIEW , '/blacklist/add ' )
116
- ->setResourceKey ('blacklist_items ' )
117
- ->setBackView (static ::BLACKLIST_ITEM_LIST_VIEW )
115
+ $ this ->viewBuilderFactory ->createResourceTabViewBuilder (static ::REGISTRATION_RULE_ITEM_ADD_FORM_VIEW , '/blacklist/add ' )
116
+ ->setResourceKey ('registration_rule_items ' )
117
+ ->setBackView (static ::REGISTRATION_RULE_ITEM_LIST_VIEW )
118
118
);
119
119
$ viewCollection ->add (
120
- $ this ->viewBuilderFactory ->createFormViewBuilder (static ::BLACKLIST_ITEM_ADD_FORM_VIEW . '.details ' , '/details ' )
121
- ->setResourceKey ('blacklist_items ' )
122
- ->setFormKey ('blacklist_item_details ' )
120
+ $ this ->viewBuilderFactory ->createFormViewBuilder (static ::REGISTRATION_RULE_ITEM_ADD_FORM_VIEW . '.details ' , '/details ' )
121
+ ->setResourceKey ('registration_rule_items ' )
122
+ ->setFormKey ('registration_rule_item_details ' )
123
123
->setTabTitle ('sulu_admin.details ' )
124
- ->setEditView (static ::BLACKLIST_ITEM_EDIT_FORM_VIEW )
124
+ ->setEditView (static ::REGISTRATION_RULE_ITEM_EDIT_FORM_VIEW )
125
125
->addToolbarActions ($ formToolbarActions )
126
- ->setParent (static ::BLACKLIST_ITEM_ADD_FORM_VIEW )
126
+ ->setParent (static ::REGISTRATION_RULE_ITEM_ADD_FORM_VIEW )
127
127
);
128
128
$ viewCollection ->add (
129
- $ this ->viewBuilderFactory ->createResourceTabViewBuilder (static ::BLACKLIST_ITEM_EDIT_FORM_VIEW , '/blacklist/:id ' )
130
- ->setResourceKey ('blacklist_items ' )
131
- ->setBackView (static ::BLACKLIST_ITEM_LIST_VIEW )
129
+ $ this ->viewBuilderFactory ->createResourceTabViewBuilder (static ::REGISTRATION_RULE_ITEM_EDIT_FORM_VIEW , '/blacklist/:id ' )
130
+ ->setResourceKey ('registration-rule-items ' )
131
+ ->setBackView (static ::REGISTRATION_RULE_ITEM_LIST_VIEW )
132
132
->setTitleProperty ('name ' )
133
133
);
134
134
$ viewCollection ->add (
135
- $ this ->viewBuilderFactory ->createFormViewBuilder (static ::BLACKLIST_ITEM_EDIT_FORM_VIEW . '.details ' , '/details ' )
136
- ->setResourceKey ('blacklist_items ' )
135
+ $ this ->viewBuilderFactory ->createFormViewBuilder (static ::REGISTRATION_RULE_ITEM_EDIT_FORM_VIEW . '.details ' , '/details ' )
136
+ ->setResourceKey ('registration-rule-items ' )
137
137
->setFormKey ('blacklist_item_details ' )
138
138
->setTabTitle ('sulu_admin.details ' )
139
139
->addToolbarActions ($ formToolbarActions )
140
- ->setParent (static ::BLACKLIST_ITEM_EDIT_FORM_VIEW )
140
+ ->setParent (static ::REGISTRATION_RULE_ITEM_EDIT_FORM_VIEW )
141
141
);
142
142
}
143
143
}
@@ -173,7 +173,7 @@ public function getSecurityContexts()
173
173
[
174
174
'Sulu ' => [
175
175
'Settings ' => [
176
- self ::BLACKLIST_ITEM_SECURITY_CONTEXT => [
176
+ self ::REGISTRATION_RULE_ITEM_SECURITY_CONTEXT => [
177
177
PermissionTypes::VIEW ,
178
178
PermissionTypes::ADD ,
179
179
PermissionTypes::EDIT ,
0 commit comments