File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -39,23 +39,24 @@ public function __construct(
39
39
* we set a different page variation, and the FPC stores a different cached page)
40
40
*
41
41
* @param HttpContext $subject
42
+ * @param string[] $data
42
43
*
43
44
* @return array
44
45
*/
45
- public function beforeGetVaryString (HttpContext $ subject )
46
+ public function afterGetData (HttpContext $ subject, $ data )
46
47
{
47
48
$ storeId = $ this ->storeManager ->getStore ()->getId ();
48
- if (! ($ this ->request ->getControllerName () === 'category '
49
- && $ this ->configHelper ->replaceCategories ($ storeId ) === true )) {
50
- return [] ;
49
+ if (!($ this ->request ->getControllerName () === 'category '
50
+ && $ this ->configHelper ->replaceCategories ($ storeId ) === true )) {
51
+ return $ data ;
51
52
}
52
53
53
54
$ context = $ this ->configHelper ->preventBackendRendering () ?
54
55
self ::RENDERING_WITHOUT_BACKEND :
55
56
self ::RENDERING_WITH_BACKEND ;
56
57
57
- $ subject -> setValue ( self ::RENDERING_CONTEXT , $ context, self :: RENDERING_WITH_BACKEND ) ;
58
+ $ data [ self ::RENDERING_CONTEXT ] = $ context ;
58
59
59
- return [] ;
60
+ return $ data ;
60
61
}
61
62
}
You can’t perform that action at this time.
0 commit comments