File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
app/code/Magento/PageBuilder/Component/Form/Element Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ class Wysiwyg extends \Magento\Ui\Component\Form\Element\Wysiwyg
39
39
* @param array $config
40
40
* @param PageBuilderConfig|null $pageBuilderConfig
41
41
* @param bool $overrideSnapshot
42
+ * @suppresswarnings(PHPMD.ExcessiveParameterList)
42
43
*/
43
44
public function __construct (
44
45
ContextInterface $ context ,
@@ -54,17 +55,20 @@ public function __construct(
54
55
bool $ overrideSnapshot = false
55
56
) {
56
57
$ wysiwygConfigData = isset ($ config ['wysiwygConfigData ' ]) ? $ config ['wysiwygConfigData ' ] : [];
58
+
57
59
// If a dataType is present we're dealing with an attribute
58
60
if (isset ($ config ['dataType ' ])) {
59
61
try {
60
62
$ attribute = $ attrRepository ->get ($ data ['name ' ]);
63
+
61
64
if ($ attribute ) {
62
65
$ config ['wysiwyg ' ] = (bool )$ attribute ->getIsWysiwygEnabled ();
63
66
}
64
67
} catch (NoSuchEntityException $ e ) {
65
68
// This model is used by non product attributes
66
69
}
67
70
}
71
+
68
72
$ isEnablePageBuilder = isset ($ wysiwygConfigData ['is_pagebuilder_enabled ' ])
69
73
&& !$ wysiwygConfigData ['is_pagebuilder_enabled ' ]
70
74
|| false ;
You can’t perform that action at this time.
0 commit comments