11
11
use Magento \Eav \Model \Entity \Attribute ;
12
12
use Magento \Eav \Model \Entity \Setup \Context ;
13
13
use Magento \Eav \Model \Entity \Setup \PropertyMapperInterface ;
14
- use Magento \Eav \Model \ReservedAttributeChecker ;
14
+ use Magento \Eav \Model \ReservedAttributeCheckerInterface ;
15
15
use Magento \Eav \Model \ResourceModel \Entity \Attribute \Group \CollectionFactory ;
16
16
use Magento \Eav \Model \Validator \Attribute \Code ;
17
17
use Magento \Framework \App \CacheInterface ;
@@ -81,7 +81,7 @@ class EavSetup
81
81
private $ attributeCodeValidator ;
82
82
83
83
/**
84
- * @var ReservedAttributeChecker
84
+ * @var ReservedAttributeCheckerInterface
85
85
*/
86
86
private $ reservedAttributeChecker ;
87
87
@@ -104,7 +104,7 @@ class EavSetup
104
104
* @param CollectionFactory $attrGroupCollectionFactory
105
105
* @param Code|null $attributeCodeValidator
106
106
* @param AddOptionToAttribute|null $addAttributeOption
107
- * @param ReservedAttributeChecker |null $reservedAttributeChecker
107
+ * @param ReservedAttributeCheckerInterface |null $reservedAttributeChecker
108
108
* @param AttributeFactory|null $attributeFactory
109
109
* @param Config|null $eavConfig
110
110
* @SuppressWarnings(PHPMD.LongVariable)
@@ -116,7 +116,7 @@ public function __construct(
116
116
CollectionFactory $ attrGroupCollectionFactory ,
117
117
Code $ attributeCodeValidator = null ,
118
118
AddOptionToAttribute $ addAttributeOption = null ,
119
- ReservedAttributeChecker $ reservedAttributeChecker = null ,
119
+ ReservedAttributeCheckerInterface $ reservedAttributeChecker = null ,
120
120
AttributeFactory $ attributeFactory = null ,
121
121
Config $ eavConfig = null
122
122
) {
@@ -128,7 +128,7 @@ public function __construct(
128
128
?? ObjectManager::getInstance ()->get (AddOptionToAttribute::class);
129
129
$ this ->attributeCodeValidator = $ attributeCodeValidator ?? ObjectManager::getInstance ()->get (Code::class);
130
130
$ this ->reservedAttributeChecker = $ reservedAttributeChecker
131
- ?? ObjectManager::getInstance ()->get (ReservedAttributeChecker ::class);
131
+ ?? ObjectManager::getInstance ()->get (ReservedAttributeCheckerInterface ::class);
132
132
$ this ->attributeFactory = $ attributeFactory ?? ObjectManager::getInstance ()->get (AttributeFactory::class);
133
133
$ this ->eavConfig = $ eavConfig ?? ObjectManager::getInstance ()->get (Config::class);
134
134
}
@@ -250,6 +250,7 @@ public function addEntityType($code, array $params)
250
250
$ this ->addAttributeSet ($ code , $ this ->_defaultAttributeSetName );
251
251
}
252
252
$ this ->addAttributeGroup ($ code , $ this ->_defaultGroupName , $ this ->_generalGroupName );
253
+ $ this ->eavConfig ->clear ();
253
254
254
255
return $ this ;
255
256
}
@@ -1375,7 +1376,7 @@ public function installEntities($entities = null)
1375
1376
1376
1377
foreach ($ entities as $ entityName => $ entity ) {
1377
1378
$ this ->addEntityType ($ entityName , $ entity );
1378
- $ this -> eavConfig -> clear ();
1379
+
1379
1380
$ frontendPrefix = isset ($ entity ['frontend_prefix ' ]) ? $ entity ['frontend_prefix ' ] : '' ;
1380
1381
$ backendPrefix = isset ($ entity ['backend_prefix ' ]) ? $ entity ['backend_prefix ' ] : '' ;
1381
1382
$ sourcePrefix = isset ($ entity ['source_prefix ' ]) ? $ entity ['source_prefix ' ] : '' ;
0 commit comments