File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed
Config/Model/Config/Backend
WebapiSecurity/Model/Plugin Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ class Cache extends \Magento\Framework\App\Config\Value
22
22
/**
23
23
* Clean cache, value was changed
24
24
*
25
- * @return void
25
+ * @return $this
26
26
*/
27
27
public function afterSave ()
28
28
{
29
29
if ($ this ->isValueChanged ()) {
30
30
$ this ->_cacheManager ->clean ($ this ->_cacheTags );
31
31
}
32
+
33
+ return $ this ;
32
34
}
33
35
}
Original file line number Diff line number Diff line change 14
14
class Datashare extends \Magento \Framework \App \Config \Value
15
15
{
16
16
/**
17
- * @return void
17
+ * @return $this
18
18
*/
19
19
public function afterSave ()
20
20
{
21
+ return $ this ;
21
22
}
22
23
}
Original file line number Diff line number Diff line change 8
8
class IncludePrice extends \Magento \Framework \App \Config \Value
9
9
{
10
10
/**
11
- * @return void
11
+ * @return $this
12
12
*/
13
13
public function afterSave ()
14
14
{
15
- parent ::afterSave ();
15
+ $ result = parent ::afterSave ();
16
16
$ this ->_cacheManager ->clean (['checkout_quote ' ]);
17
+
18
+ return $ result ;
17
19
}
18
20
}
Original file line number Diff line number Diff line change @@ -26,17 +26,20 @@ public function __construct(\Magento\Framework\App\Cache\TypeListInterface $cach
26
26
* Invalidate WebApi cache if needed.
27
27
*
28
28
* @param \Magento\Framework\App\Config\Value $subject
29
+ * @param \Magento\Framework\App\Config\Value $result
29
30
* @return \Magento\Framework\App\Config\Value
30
31
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
31
32
*/
32
- public function afterAfterSave (\Magento \Framework \App \Config \Value $ subject )
33
- {
33
+ public function afterAfterSave (
34
+ \Magento \Framework \App \Config \Value $ subject ,
35
+ \Magento \Framework \App \Config \Value $ result
36
+ ) {
34
37
if ($ subject ->getPath () == \Magento \WebapiSecurity \Model \Plugin \AnonymousResourceSecurity::XML_ALLOW_INSECURE
35
38
&& $ subject ->isValueChanged ()
36
39
) {
37
40
$ this ->cacheTypeList ->invalidate (\Magento \Framework \App \Cache \Type \Webapi::TYPE_IDENTIFIER );
38
41
}
39
42
40
- return $ subject ;
43
+ return $ result ;
41
44
}
42
45
}
You can’t perform that action at this time.
0 commit comments