@@ -27,11 +27,6 @@ class Blocks extends Repeater
27
27
*/
28
28
public string |array |null $ tags = null ;
29
29
30
- /**
31
- * List of inspector configs for the blocks.
32
- */
33
- public array $ inspectorConfigs = [];
34
-
35
30
/**
36
31
* Configuration stored with each index.
37
32
*/
@@ -212,10 +207,9 @@ protected function processGroupMode(): void
212
207
'name ' => array_get ($ config , 'name ' ),
213
208
'icon ' => array_get ($ config , 'icon ' , 'icon-square-o ' ),
214
209
'description ' => array_get ($ config , 'description ' ),
215
- 'fields ' => array_get ($ config , 'fields ' )
210
+ 'fields ' => array_get ($ config , 'fields ' ),
211
+ 'config ' => array_get ($ config , 'config ' , null ),
216
212
];
217
-
218
- $ this ->inspectorConfigs [$ code ] = array_get ($ config , 'config ' , null );
219
213
}
220
214
221
215
// Sort the builder blocks by translated name label
@@ -299,15 +293,15 @@ public function getGroupIcon(string $groupCode): ?string
299
293
*/
300
294
public function hasInspectorConfig (string $ groupCode ): bool
301
295
{
302
- return isset ($ this ->inspectorConfigs [$ groupCode ]);
296
+ return isset ($ this ->groupDefinitions [$ groupCode][ ' config ' ]);
303
297
}
304
298
305
299
/**
306
300
* Returns the Inspector config, as a JSON string, for the given group code.
307
301
*/
308
302
public function getInspectorConfig (string $ groupCode ): string
309
303
{
310
- return json_encode ($ this ->processInspectorConfig (array_get ($ this ->inspectorConfigs , $ groupCode , [])));
304
+ return json_encode ($ this ->processInspectorConfig (array_get ($ this ->groupDefinitions , $ groupCode . ' .config ' , [])));
311
305
}
312
306
313
307
/**
0 commit comments