File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/PageBuilder/Component/Form/Element Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \PageBuilder \Component \Form \Element ;
9
9
10
+ use Magento \Catalog \Setup \CategorySetup ;
10
11
use Magento \Framework \App \ObjectManager ;
11
12
use Magento \Framework \Data \FormFactory ;
12
13
use Magento \Framework \View \Asset \Repository ;
17
18
use Magento \PageBuilder \Model \Config as PageBuilderConfig ;
18
19
use Magento \PageBuilder \Model \State as PageBuilderState ;
19
20
use Magento \PageBuilder \Model \Stage \Config as Config ;
20
- use Magento \Framework \View \ConfigInterface as ViewConfigInterface ;
21
21
22
22
/**
23
23
* Updates wysiwyg element with Page Builder specific config
@@ -68,11 +68,11 @@ public function __construct(
68
68
$ wysiwygConfigData = $ config ['wysiwygConfigData ' ] ?? [];
69
69
70
70
// If a dataType is present we're dealing with an attribute
71
- if (isset ($ config ['dataType ' ]) && $ context -> getNamespace () === ' category_form ' ) {
71
+ if (isset ($ config ['dataType ' ])) {
72
72
try {
73
73
$ attribute = $ attrRepository ->get ($ data ['name ' ]);
74
74
75
- if ($ attribute ) {
75
+ if ($ attribute && $ attribute -> getEntityTypeId () === CategorySetup:: CATEGORY_ENTITY_TYPE_ID ) {
76
76
$ config ['wysiwyg ' ] = (bool )$ attribute ->getIsWysiwygEnabled ();
77
77
}
78
78
} catch (NoSuchEntityException $ e ) {
You can’t perform that action at this time.
0 commit comments