File tree Expand file tree Collapse file tree 1 file changed +29
-26
lines changed
app/code/Magento/Cms/Ui/Component Expand file tree Collapse file tree 1 file changed +29
-26
lines changed Original file line number Diff line number Diff line change 16
16
use Magento \Ui \Component \Container ;
17
17
18
18
/**
19
- * DataProvider for cms ui .
19
+ * DataProvider for cms blocks and pages listing ui components .
20
20
*/
21
21
class DataProvider extends \Magento \Framework \View \Element \UiComponent \DataProvider \DataProvider
22
22
{
@@ -107,38 +107,41 @@ public function prepareMetadata()
107
107
{
108
108
$ metadata = [];
109
109
110
- if (!$ this ->getAuthorizationInstance ()->isAllowed ('Magento_Cms::save ' )) {
111
- $ metadata = [
112
- 'cms_page_columns ' => [
113
- 'arguments ' => [
114
- 'data ' => [
115
- 'config ' => [
116
- 'editorConfig ' => [
117
- 'enabled ' => false
118
- ],
119
- 'componentType ' => Container::NAME
110
+ if ($ this ->name === 'cms_page_listing_data_source ' ) {
111
+
112
+ if (!$ this ->getAuthorizationInstance ()->isAllowed ('Magento_Cms::save ' )) {
113
+ $ metadata = [
114
+ 'cms_page_columns ' => [
115
+ 'arguments ' => [
116
+ 'data ' => [
117
+ 'config ' => [
118
+ 'editorConfig ' => [
119
+ 'enabled ' => false
120
+ ],
121
+ 'componentType ' => Container::NAME
122
+ ]
120
123
]
121
124
]
122
125
]
123
- ]
124
- ];
125
- }
126
+ ];
127
+ }
126
128
127
- if (!$ this ->getAuthorizationInstance ()->isAllowed ('Magento_Cms::save_design ' )) {
129
+ if (!$ this ->getAuthorizationInstance ()->isAllowed ('Magento_Cms::save_design ' )) {
128
130
129
- foreach ($ this ->pageLayoutColumns as $ column ) {
130
- $ metadata ['cms_page_columns ' ]['children ' ][$ column ] = [
131
- 'arguments ' => [
132
- 'data ' => [
133
- 'config ' => [
134
- 'editor ' => [
135
- 'editorType ' => false
136
- ],
137
- 'componentType ' => Container::NAME
131
+ foreach ($ this ->pageLayoutColumns as $ column ) {
132
+ $ metadata ['cms_page_columns ' ]['children ' ][$ column ] = [
133
+ 'arguments ' => [
134
+ 'data ' => [
135
+ 'config ' => [
136
+ 'editor ' => [
137
+ 'editorType ' => false
138
+ ],
139
+ 'componentType ' => Container::NAME
140
+ ]
138
141
]
139
142
]
140
- ]
141
- ];
143
+ ];
144
+ }
142
145
}
143
146
}
144
147
You can’t perform that action at this time.
0 commit comments