File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
lib/internal/Magento/Framework/EntityManager Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 42
42
</event >
43
43
<event name =" magento_catalog_api_data_categorytreeinterface_save_after" >
44
44
<observer name =" legacy_categorytree_save_after" instance =" Magento\Framework\EntityManager\Observer\AfterEntitySave" />
45
- <observer name =" invalidate_cache_on_categorytree_design_change" instance =" Magento\Catalog\Observer\InvalidateCacheOnCategoryDesignChange" />
46
45
</event >
47
46
<event name =" magento_catalog_api_data_categorytreeinterface_delete_before" >
48
47
<observer name =" legacy_categorytree_delete_before" instance =" Magento\Framework\EntityManager\Observer\BeforeEntityDelete" />
Original file line number Diff line number Diff line change 21
21
/**
22
22
* User backend observer model for authentication
23
23
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
24
+ * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
24
25
*/
25
26
class AuthObserver implements ObserverInterface
26
27
{
@@ -184,6 +185,7 @@ private function _updateLockingInformation($user)
184
185
185
186
/**
186
187
* Check whether the latest password is expired
188
+ *
187
189
* Side-effect can be when passwords were changed with different lifetime configuration settings
188
190
*
189
191
* @param array $latestPassword
Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Framework \EntityManager ;
7
7
8
+ use Magento \Catalog \Model \Category ;
9
+
8
10
/**
9
11
* Resolves types.
10
12
*/
@@ -54,7 +56,7 @@ public function resolve($type)
54
56
$ interfaceNames = $ reflectionClass ->getInterfaceNames ();
55
57
$ dataInterfaces = [];
56
58
foreach ($ interfaceNames as $ interfaceName ) {
57
- if (strpos ($ interfaceName , ' \Api\Data \\' ) !== false ) {
59
+ if ($ this -> isDataInterface ($ interfaceName , $ type ) ) {
58
60
$ dataInterfaces [] = $ interfaceName ;
59
61
}
60
62
}
@@ -73,4 +75,17 @@ public function resolve($type)
73
75
}
74
76
return $ this ->typeMapping [$ className ];
75
77
}
78
+
79
+ /**
80
+ * Checks whether interface has Data type.
81
+ *
82
+ * @param string $interfaceName
83
+ * @param object $entityType
84
+ * @return bool
85
+ */
86
+ private function isDataInterface (string $ interfaceName , $ entityType ): bool
87
+ {
88
+ return strpos ($ interfaceName , '\Api\Data \\' ) !== false
89
+ && (!$ entityType instanceof Category || preg_match ('/Category(?!Tree)/ ' , $ interfaceName ));
90
+ }
76
91
}
You can’t perform that action at this time.
0 commit comments