9
9
*/
10
10
namespace Magento \Store \Model ;
11
11
12
- use Magento \Config \Model \ResourceModel \Config \Data ;
13
- use Magento \Framework \Api \AttributeValueFactory ;
14
- use Magento \Framework \Api \ExtensionAttributesFactory ;
15
- use Magento \Framework \App \Cache \TypeListInterface ;
16
12
use Magento \Framework \App \ObjectManager ;
17
- use Magento \Framework \Data \Collection \AbstractDb ;
18
- use Magento \Framework \Event \ManagerInterface ;
19
13
use Magento \Framework \MessageQueue \PoisonPill \PoisonPillPutInterface ;
20
- use Magento \Framework \Model \Context ;
21
- use Magento \Framework \Model \ResourceModel \AbstractResource ;
22
- use Magento \Framework \Registry ;
23
- use Magento \PageCache \Model \Cache \Type ;
24
- use Magento \Store \Model \ResourceModel \Store \CollectionFactory ;
25
14
use Magento \Store \Model \Validation \StoreValidator ;
26
15
27
16
/**
@@ -126,25 +115,19 @@ class Group extends \Magento\Framework\Model\AbstractExtensibleModel implements
126
115
private $ modelValidator ;
127
116
128
117
/**
129
- * @var TypeListInterface
130
- */
131
- private TypeListInterface $ typeList ;
132
-
133
- /**
134
- * @param Context $context
135
- * @param Registry $registry
136
- * @param ExtensionAttributesFactory $extensionFactory
137
- * @param AttributeValueFactory $customAttributeFactory
138
- * @param Data $configDataResource
139
- * @param CollectionFactory $storeListFactory
118
+ * @param \Magento\Framework\Model\Context $context
119
+ * @param \Magento\Framework\Registry $registry
120
+ * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
121
+ * @param \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory
122
+ * @param \Magento\Config\Model\ResourceModel\Config\Data $configDataResource
123
+ * @param ResourceModel\Store\CollectionFactory $storeListFactory
140
124
* @param StoreManagerInterface $storeManager
141
- * @param AbstractResource|null $resource
142
- * @param AbstractDb|null $resourceCollection
125
+ * @param \Magento\Framework\Model\ResourceModel\ AbstractResource|null $resource
126
+ * @param \Magento\Framework\Data\Collection\ AbstractDb|null $resourceCollection
143
127
* @param array $data
144
- * @param ManagerInterface|null $eventManager
128
+ * @param \Magento\Framework\Event\ ManagerInterface|null $eventManager
145
129
* @param PoisonPillPutInterface|null $pillPut
146
130
* @param StoreValidator|null $modelValidator
147
- * @param TypeListInterface|null $typeList
148
131
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
149
132
*/
150
133
public function __construct (
@@ -160,8 +143,7 @@ public function __construct(
160
143
array $ data = [],
161
144
\Magento \Framework \Event \ManagerInterface $ eventManager = null ,
162
145
PoisonPillPutInterface $ pillPut = null ,
163
- StoreValidator $ modelValidator = null ,
164
- TypeListInterface $ typeList = null
146
+ StoreValidator $ modelValidator = null
165
147
) {
166
148
$ this ->_configDataResource = $ configDataResource ;
167
149
$ this ->_storeListFactory = $ storeListFactory ;
@@ -181,7 +163,6 @@ public function __construct(
181
163
$ resourceCollection ,
182
164
$ data
183
165
);
184
- $ this ->typeList = $ typeList ?: ObjectManager::getInstance ()->get (TypeListInterface::class);
185
166
}
186
167
187
168
/**
@@ -476,7 +457,6 @@ public function afterDelete()
476
457
$ this ->_storeManager ->reinitStores ();
477
458
$ this ->eventManager ->dispatch ($ this ->_eventPrefix . '_delete ' , ['group ' => $ group ]);
478
459
});
479
- $ this ->typeList ->cleanType (Type::TYPE_IDENTIFIER );
480
460
$ result = parent ::afterDelete ();
481
461
482
462
if ($ this ->getId () === $ this ->getWebsite ()->getDefaultGroupId ()) {
@@ -504,9 +484,6 @@ public function afterSave()
504
484
$ this ->_storeManager ->reinitStores ();
505
485
$ this ->eventManager ->dispatch ($ this ->_eventPrefix . '_save ' , ['group ' => $ group ]);
506
486
});
507
- if (!$ this ->isObjectNew ()) {
508
- $ this ->typeList ->invalidate ([Type::TYPE_IDENTIFIER ]);
509
- }
510
487
$ this ->pillPut ->put ();
511
488
return parent ::afterSave ();
512
489
}
0 commit comments